# List of Global Functions - Panda 1.4.2

_createContainerLeak | genericReadDatagram | pause
_createGarbage | genericWriteDatagram | pdir
_getcode | getAnnounceGenerateTime | piratesAvatarShadow
_has_keywordargs | getBase | pivotScalar
_is_variadic | getBlend | pkgfinder
_leakMessengerObject | getClassLineage | place
_locate | GetCompiled | planeIntersect
_locatepython | getConfigExpress | print_exc_plus
_pdir | getConfigShowbase | printListEnum
_test_dir | getCrankAngle | printNumberedTyped
_varnames | getDefaultClickSound | printProfile
addFullscreenTestsize | getDefaultCoordinateSystem | printStack
addListsByValue | getDefaultDialogGeom | printThisCall
AddPackagePath | getDefaultDrawOrder | printVerboseStack
adjust | getDefaultFont | profile
appendStr | getDefaultPanel | profiled
arbitraryShadow | getDefaultRolloverSound | qSlerp
autoBind | getFileData | queryFullscreenTestresult
avatarShadow | getfullnameof | quickProfile
average | getImports | rad2Deg
binaryRepr | getImports1 | randFloat
boolEqual | getImports2 | randHash
bound | getinstalldir | randInt32
calcHeight | getLargeBlobPath | randUint31
calldownEnforced | getloader | randUint32
callerInfo | getModelPath | rebindClass
checkAdler | getNearProjectionPoint | recordCreationStack
checkCrc | getNetworkError | reduceAngle
choice | getNumberedTypedSortedString | relHpr
CLAMP | getNumberedTypedSortedStringWithReferrers | remove_task
clampScalar | getNumberedTypedSortedStringWithReferrersGen | replace
cleanupAsyncRequests | getNumberedTypedString | replaceAIRFunc
cleanupDialog | getParticlePath | replaceCRFunc
closestDestAngle | getpath | replaceIvalFunc
closestDestAngle2 | getPaths | replaceMessengerFunc
composeMatrix | getScreenXY | replaceStateFunc
composeMatrixNewHpr | getSetter | replaceTaskMgrFunc
composeMatrixOldHpr | getSetterName | report
contains | getSoundPath | resetSequence
copyFile | getTexturePath | resetVariableDict
copyFuncs | getTkColorString | resetWidgetDict
CopyIcons | getTotalAnnounceTime | rgbPanel
CopyIcons_FromIco | getWriteError | rgbPanel
createBounce | globalActivateSmoothing | rotateTo
createClusterClient | handleSocketError | ROUND_INT
createHBounce | hashPrcVariables | ROUND_TO
createHeightCode | headsUp | run
createPBounce | identify | runtestFullscreenSizes
createRBounce | idtype | safeRepr
createScaleXBounce | indent | sameElements
createScaleYBounce | initializeInspectorMap | sequence
createScaleZBounce | inspect | serialNum
createXBounce | inspect | setDefaultClickSound
createYBounce | inspectorFor | setDefaultDialogGeom
createZBounce | install_with | setDefaultDrawOrder
decomposeMatrix | installCArchive | setDefaultFont
decomposeMatrixNewHpr | intersection | setDefaultFontFunc
decomposeMatrixOldHpr | invert | setDefaultPanel
decryptString | invertDict | setDefaultRolloverSound
deCygwinify | invertDictLossless | setGuiGridSpacing
deg2Rad | isDefaultValue | SetStrafe
Dependencies | ispackage | setupMirror
Dependencies | itype | showFrustum
describeException | lerp | solveQuadratic
difference | lerpBackgroundColor | spawnNewTask
disjoint | lightRGBPanel | spawnTkLoop
DNAClassEqual | lineInfo | squeeze
DNAGetBaselineString | lineTag | stackEntryInfo
DNAGetChild | lineupPos | startProfile
DNAGetChildOfClass | list2dict | superFlattenShip
DNAGetChildRecursive | loadEggData | tagRepr
DNAGetChildren | loadEggFile | tagWithCaller
DNAGetClassType | loadPrcFile | taskCallback
DNAGetWallHeights | loadPrcFileData | test
DNAIsDerivedFrom | logMethodCalls | throwNewFrame
DNARemoveAllChildrenOfClass | lookAt | tkLoop
DNARemoveChildOfClass | loop | toggleGuiGridSnap
DNARemoveChildren | loopGen | ToggleStrafe
DNASetBaselineString | main | trace
doc | make_loop | traceFunctionCall
doTest | make_sequence | traceParentCall
encryptString | makefilter | transpose
ensure | makeFlywheelGen | troff
enumerate | makeList | tron
errorToText | makeresource | union
exceptionLogged | makeTarget | unique
expand | makeTuple | uniqueElements
explore | mostDerivedLast | uniqueName
fastRepr | newimport | unloadPrcFile
findClass | newToOldHpr | usage
findDialog | nonRepeatingRandomList | useDirectRenderStyle
findPythonModule | normalDistrib | verify
fitDestAngle2Src | notNone | weightedChoice
fitSrcAngle2Dest | nullGen | weightedRand
flywheel | oldToNewHpr | writeFsmTree
formatElapsedSeconds | operator * |
gcDebugOn | passwordHash |

_createContainerLeak def _createContainerLeak() Undocumented function.

_createGarbage def _createGarbage(num=1) Undocumented function.

_getcode def _getcode(f) _getcode(f) This function returns the name and function object of a callable object.

_has_keywordargs def _has_keywordargs(function) Undocumented function.

_is_variadic def _is_variadic(function) Undocumented function.

_leakMessengerObject def _leakMessengerObject() Undocumented function.

_locate def _locate(nm, xtrapath=None, base=None) Find a file / directory named NM in likely places. XTRAPATH is a list of paths to prepend to BASE. If BASE is None, sys.path (as extended by packages) is used.

_locatepython def _locatepython(name, xtrapath=None) Locate a Python resource named NAME. All of the standard file extensions will be tried. XTRAPATH is prepended to sys.path.

_pdir def _pdir(obj, str=None, width=None, fTruncate=1, lineWidth=75, wantPrivate=0) Print out a formatted list of members and methods of an instance or class

_test_dir def _test_dir() Debug/test function to create DirectoryImporters from sys.path.

_varnames def _varnames(function) Undocumented function.

addFullscreenTestsize void add_fullscreen_testsize(int xsize, int ysize); klunky interface since we cant pass array from python->C++

addListsByValue def addListsByValue(a, b) returns a new array containing the sums of the two array arguments (c[0] = a[0 + b[0], etc.)

AddPackagePath def AddPackagePath(packagename, path) Undocumented function.

adjust def adjust(command=None, dim=1, parent=None, **kw) adjust(command = None, parent = None, **kw) Popup and entry scale to adjust a parameter Accepts any Slider keyword argument. Typical arguments include: command: The one argument command to execute min: The min value of the slider max: The max value of the slider resolution: The resolution of the slider text: The label on the slider These values can be accessed and/or changed after the fact >>> vg = adjust() >>> vg['min'] 0.0 >>> vg['min'] = 10.0 >>> vg['min'] 10.0

appendStr def appendStr(obj, st) adds a string onto the __str__ output of an instance

arbitraryShadow def arbitraryShadow(node) Undocumented function.

autoBind void auto_bind(PandaNode *root_node, AnimControlCollection &controls, int hierarchy_match_flags = (0)); Description: Walks the scene graph or subgraph beginning at the indicated node, and attempts to bind any AnimBundles found to their matching PartBundles, when possible. The list of all resulting AnimControls created is filled into controls.

avatarShadow def avatarShadow() Undocumented function.

average def average(*args) returns simple average of list of values

binaryRepr def binaryRepr(number, max_length=32) Undocumented function.

boolEqual def boolEqual(a, b) returns true if a and b are both true or both false. returns false otherwise (a.k.a. xnor -- eXclusive Not OR).

bound def bound(value, bound1, bound2) returns value if value is between bound1 and bound2 otherwise returns bound that is closer to value

calcHeight def calcHeight(heightList) Undocumented function.

calldownEnforced def calldownEnforced(f) Use this decorator to ensure that derived classes that override this method call down to the base class method.

callerInfo def callerInfo(baseFileName=1, howFarBack=0) returns the sourcefilename, line number, and function name of the caller of the function that called this function (answers the question: 'hey callerInfo, who called me?') see stackEntryInfo, above, for info on 'baseFileName' and return types

checkAdler unsigned long int check_adler(Filename name); Undocumented function.

checkCrc unsigned long int check_crc(Filename name); Undocumented function.

choice def choice(condition, ifTrue, ifFalse) Undocumented function.

CLAMP def CLAMP(val, minVal, maxVal) Undocumented function.

clampScalar def clampScalar(value, a, b) Undocumented function.

cleanupAsyncRequests def cleanupAsyncRequests() Only call this when the application is shuting down.

cleanupDialog def cleanupDialog(uniqueName) cleanupPanel(string uniqueName) Cleans up (removes) the panel with the given uniqueName. This may be useful when some panels know about each other and know that opening panel A should automatically close panel B, for instance.

closestDestAngle def closestDestAngle(src, dest) Undocumented function.

closestDestAngle2 def closestDestAngle2(src, dest) Undocumented function.

composeMatrix void compose_matrix(LMatrix3f &mat, LVecBase3f const &scale, LVecBase3f const &shear, LVecBase3f const &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

composeMatrixNewHpr void compose_matrix_new_hpr(LMatrix3f &mat, LVecBase3f const &scale, LVecBase3f const &shear, LVecBase3f const &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

composeMatrixOldHpr void compose_matrix_old_hpr(LMatrix3f &mat, LVecBase3f const &scale, LVecBase3f const &shear, LVecBase3f const &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

contains def contains(whole, sub) Return 1 if whole contains sub, 0 otherwise

copyFile def copyFile(srcFiles, destFile, append=0) Copy one or more files to another file. If srcFiles is a list, then all will be concatenated together to destFile. The append flag is also valid for single file copies. destFile will have the mode, ownership and timestamp of the last file copied/appended.

copyFuncs def copyFuncs(fromClass, toClass) Undocumented function.

CopyIcons def CopyIcons(dstpath, srcpath) Undocumented function.

CopyIcons_FromIco def CopyIcons_FromIco(dstpath, srcpath) Undocumented function.

createBounce def createBounce(nodeObj, numBounces, startValues, totalTime, amplitude, bounceType=SZ_BOUNCE) createBounce: create and return a list of intervals to make a given nodePath bounce a given number of times over a give total time.

createClusterClient def createClusterClient() Undocumented function.

createHBounce def createHBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createHeightCode def createHeightCode(heightList) Undocumented function.

createPBounce def createPBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createRBounce def createRBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createScaleXBounce def createScaleXBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createScaleYBounce def createScaleYBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createScaleZBounce def createScaleZBounce(nodeObj, numBounces, startValue, totalTime, amplitude) Undocumented function.

createXBounce def createXBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createYBounce def createYBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

createZBounce def createZBounce(nodeObj, numBounces, startValues, totalTime, amplitude) Undocumented function.

decomposeMatrix bool decompose_matrix(LMatrix3f const &mat, LVecBase3f &scale, LVecBase3f &shear, LVecBase3f &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

decomposeMatrixNewHpr bool decompose_matrix_new_hpr(LMatrix3f const &mat, LVecBase3f &scale, LVecBase3f &shear, LVecBase3f &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

decomposeMatrixOldHpr bool decompose_matrix_old_hpr(LMatrix3f const &mat, LVecBase3f &scale, LVecBase3f &shear, LVecBase3f &hpr, CoordinateSystem cs = (CS_default)); Undocumented function.

decryptString string decrypt_string(string const &source, string const &password); Undocumented function.

deCygwinify def deCygwinify(path) Undocumented function.

deg2Rad double deg_2_rad(double f); Undocumented function.

Dependencies def Dependencies(lTOC) Expand LTOC to include all the closure of binary dependencies. LTOC is a logical table of contents, ie, a seq of tuples (name, path). Return LTOC expanded by all the binary dependencies of the entries in LTOC, except those listed in the module global EXCLUDES

Dependencies def Dependencies(lTOC) Expand LTOC to include all the closure of binary dependencies. LTOC is a logical table of contents, ie, a seq of tuples (name, path). Return LTOC expanded by all the binary dependencies of the entries in LTOC, except those listed in the module global EXCLUDES

describeException def describeException(backTrace=4) Undocumented function.

difference def difference(a, b) difference(list, list):

disjoint def disjoint(L1, L2) returns non-zero if L1 and L2 have no common elements

DNAClassEqual def DNAClassEqual(dnaObject, classType) Undocumented function.

DNAGetBaselineString def DNAGetBaselineString(baseline) Undocumented function.

DNAGetChild def DNAGetChild(dnaObject, type=DNA_NODE, childNum=0) Undocumented function.

DNAGetChildOfClass def DNAGetChildOfClass(dnaNode, classType) Undocumented function.

DNAGetChildRecursive def DNAGetChildRecursive(dnaObject, type=DNA_NODE, childNum=0) Undocumented function.

DNAGetChildren def DNAGetChildren(dnaNode, classType=None) Return the objects of that type

DNAGetClassType def DNAGetClassType(dnaObject) Undocumented function.

DNAGetWallHeights def DNAGetWallHeights(aDNAFlatBuilding) Get a list of wall heights for a given flat building

DNAIsDerivedFrom def DNAIsDerivedFrom(dnaObject, classType) Undocumented function.

DNARemoveAllChildrenOfClass def DNARemoveAllChildrenOfClass(dnaNode, classType) Remove the objects of that type

DNARemoveChildOfClass def DNARemoveChildOfClass(dnaNode, classType, childNum=0) Remove the nth object of that type you come across

DNARemoveChildren def DNARemoveChildren(dnaObject) Utility function to delete all the children of a DNANode

DNASetBaselineString def DNASetBaselineString(baseline, text) Undocumented function.

doc def doc(obj) Undocumented function.

doTest def doTest() Undocumented function.

encryptString string encrypt_string(string const &source, string const &password); Undocumented function.

ensure def ensure(dirct) Undocumented function.

enumerate def enumerate(L) Returns (0, L[0]), (1, L[1]), etc., allowing this syntax: for i, item in enumerate(L): ... enumerate is a built-in feature in Python 2.3, which implements it using an iterator. For now, we can use this quick & dirty implementation that returns a list of tuples that is completely constructed every time enumerate() is called.

errorToText string error_to_text(ErrorUtilCode err); Undocumented function.

exceptionLogged def exceptionLogged(append=True) decorator that outputs the function name and all arguments if an exception passes back through the stack frame if append is true, string is appended to the __str__ output of the exception. if append is false, string is printed to the log directly. If the output will take up many lines, it's recommended to set append to False so that the exception stack is not hidden by the output of this decorator.

expand def expand(plist) expand a list of paths (like sys.path) to include all the directories that qualify as packages

explore def explore(nodePath=render) Undocumented function.

fastRepr def fastRepr(obj, maxLen=200, strFactor=10, _visitedIds=None) caps the length of iterable types, so very large objects will print faster. also prevents infinite recursion

findClass def findClass(className) Look in sys.modules dictionary for a module that defines a class with this className.

findDialog def findDialog(uniqueName) findPanel(string uniqueName) Returns the panel whose uniqueName is given. This is mainly useful for debugging, to get a pointer to the current onscreen panel of a particular type.

findPythonModule def findPythonModule(module) Undocumented function.

fitDestAngle2Src def fitDestAngle2Src(src, dest) given a src and destination angle, returns an equivalent dest angle that is within [-180..180) of src examples: fitDestAngle2Src(30, 60) == 60 fitDestAngle2Src(60, 30) == 30 fitDestAngle2Src(0, 180) == -180 fitDestAngle2Src(1, 180) == 180

fitSrcAngle2Dest def fitSrcAngle2Dest(src, dest) given a src and destination angle, returns an equivalent src angle that is within [-180..180) of dest examples: fitSrcAngle2Dest(30, 60) == 30 fitSrcAngle2Dest(60, 30) == 60 fitSrcAngle2Dest(0, 180) == 0 fitSrcAngle2Dest(-1, 180) == 359 fitSrcAngle2Dest(-180, 180) == 180

flywheel def flywheel(*args, **kArgs) >>> for i in flywheel([1,2,3], countList=[10, 5, 1]): ... print i, ... 1 2 3 1 2 1 2 1 2 1 2 1 1 1 1 1

formatElapsedSeconds def formatElapsedSeconds(seconds) Returns a string of the form "mm:ss" or "hh:mm:ss" or "n days", representing the indicated elapsed time in seconds.

gcDebugOn def gcDebugOn() Undocumented function.

genericReadDatagram void generic_read_datagram(LMatrix3f &result, DatagramIterator &source); Undocumented function.

genericWriteDatagram void generic_write_datagram(Datagram &dest, LMatrix3f const &value); Undocumented function.

getAnnounceGenerateTime def getAnnounceGenerateTime(stat) Undocumented function.

getBase def getBase() Undocumented function.

getBlend def getBlend(blendType) Return the C++ blend class corresponding to blendType string

getClassLineage def getClassLineage(obj) print object inheritance list

GetCompiled def GetCompiled(seq, lvl='c') SEQ is a list of .py files, or a logical TOC. Return as .pyc or .pyo files (LVL) after ensuring their existence

getConfigExpress Config::Config< ConfigureGetConfig_config_express > &get_config_express(void); Undocumented function.

getConfigShowbase Config::Config< ConfigureGetConfig_config_showbase > &get_config_showbase(void); Undocumented function.

getCrankAngle def getCrankAngle(center) Undocumented function.

getDefaultClickSound def getDefaultClickSound() Undocumented function.

getDefaultCoordinateSystem CoordinateSystem get_default_coordinate_system(void); Undocumented function.

getDefaultDialogGeom def getDefaultDialogGeom() Undocumented function.

getDefaultDrawOrder def getDefaultDrawOrder() Undocumented function.

getDefaultFont def getDefaultFont() Undocumented function.

getDefaultPanel def getDefaultPanel() Undocumented function.

getDefaultRolloverSound def getDefaultRolloverSound() Undocumented function.

getFileData def getFileData(filename, separator=',') Open the specified file and strip out unwanted whitespace and empty lines. Return file as list of lists, one file line per element, list elements based upon separator

getfullnameof def getfullnameof(mod, xtrapath=None) Return the full path name of MOD. MOD is the basename of a dll or pyd. XTRAPATH is a path or list of paths to search first. Return the full path name of MOD. Will search the full Windows search path, as well as sys.path

getImports def getImports(pth) Forwards to either getImports1 or getImports2

getImports1 def getImports1(pth) Find the binary dependencies of PTH. This implementation (not used right now) uses the MSVC utility dumpbin

getImports2 def getImports2(pth) Find the binary dependencies of PTH. This implementation walks through the PE header

getinstalldir def getinstalldir(prompt="Enter an installation directory: ") Undocumented function.

getLargeBlobPath def getLargeBlobPath() Undocumented function.

getloader def getloader(data, package) Undocumented function.

getModelPath ConfigVariableSearchPath &get_model_path(void); The above variables are also shadowed by these functions, so that they can easily be accessed in the interpreter (e.g. Python).

getNearProjectionPoint def getNearProjectionPoint(nodePath) Undocumented function.

getNetworkError int get_network_error(void); Undocumented function.

getNumberedTypedSortedString def getNumberedTypedSortedString(items, maxLen=5000, numPrefix='') get a string that has each item of the list on its own line, the items are stringwise-sorted, and each item is numbered on the left from zero

getNumberedTypedSortedStringWithReferrers def getNumberedTypedSortedStringWithReferrers(items, maxLen=10000, numPrefix='') get a string that has each item of the list on its own line, the items are stringwise-sorted, the object's referrers are shown, and each item is numbered on the left from zero

getNumberedTypedSortedStringWithReferrersGen def getNumberedTypedSortedStringWithReferrersGen(items, maxLen=10000, numPrefix='') get a string that has each item of the list on its own line, the items are stringwise-sorted, the object's referrers are shown, and each item is numbered on the left from zero

getNumberedTypedString def getNumberedTypedString(items, maxLen=5000, numPrefix='') get a string that has each item of the list on its own line, and each item is numbered on the left from zero

getParticlePath ConfigVariableSearchPath &get_particle_path(void); Undocumented function.

getpath def getpath() Return the path that Windows will search for dlls.

getPaths def getPaths() Add to sys.path the appropriate director(ies) to search for the various Panda projects. Typically, these will all be in the same directory (which is presumably already on sys.path), but if the VR Studio ctattach tools are in use they could be scattered around in several places.

getScreenXY def getScreenXY(nodePath) Undocumented function.

getSetter def getSetter(targetObj, valueName, prefix='set') Undocumented function.

getSetterName def getSetterName(valueName, prefix='set') Undocumented function.

getSoundPath ConfigVariableSearchPath &get_sound_path(void); Undocumented function.

getTexturePath ConfigVariableSearchPath &get_texture_path(void); Undocumented function.

getTkColorString def getTkColorString(color) Print out a Tk compatible version of a color string

getTotalAnnounceTime def getTotalAnnounceTime() Undocumented function.

getWriteError int get_write_error(void); Undocumented function.

globalActivateSmoothing def globalActivateSmoothing(smoothing, prediction) Globally activates or deactivates smoothing and prediction on all DistributedSmoothNodes currently in existence, or yet to be generated.

handleSocketError string handle_socket_error(void); Undocumented function.

hashPrcVariables void hash_prc_variables(HashVal &hash); Description: Fills HashVal with the hash from the current prc file state as reported by ConfigVariableManager::write_prc_variables().

headsUp void heads_up(LMatrix3f &mat, LVector3f const &fwd, LVector3f const &up = ((up())), CoordinateSystem cs = (CS_default)); Undocumented function.

identify def identify(name, xtrapath=None) Find, and identify the type of NAME, using XTRAPATH as the first place to look. Return type, name and full path name. NAME can be a logical or physical name. However, the logical name of a Python module can easily conflict with the physical name of something else, so beware.

idtype def idtype(fullnm) Figure out what type of resource FULLNM refers to.

indent def indent(stream, numIndents, str) Write str to stream with numIndents in front of it

initializeInspectorMap def initializeInspectorMap() Undocumented function.

inspect def inspect(anObject) Undocumented function.

inspect def inspect(anObject) Undocumented function.

inspectorFor def inspectorFor(anObject) Undocumented function.

install_with def install_with(func) Undocumented function.

installCArchive def installCArchive(nm, basedir, suffixdir) Undocumented function.

intersection def intersection(a, b) intersection(list, list):

invert LMatrix3f invert(LMatrix3f const &a); Undocumented function.

invertDict def invertDict(D, lossy=False) creates a dictionary by 'inverting' D; keys are placed in the new dictionary under their corresponding value in the old dictionary. It is an error if D contains any duplicate values. >>> old = {'key1':1, 'key2':2} >>> invertDict(old) {1: 'key1', 2: 'key2'}

invertDictLossless def invertDictLossless(D) similar to invertDict, but values of new dict are lists of keys from old dict. No information is lost. >>> old = {'key1':1, 'key2':2, 'keyA':2} >>> invertDictLossless(old) {1: ['key1'], 2: ['key2', 'keyA']}

isDefaultValue def isDefaultValue(x) Undocumented function.

ispackage def ispackage(name) Determine if NAME is the name of a package.

itype def itype(obj) Undocumented function.

lerp def lerp(v0, v1, t) returns a value lerped between v0 and v1, according to t t == 0 maps to v0, t == 1 maps to v1

lerpBackgroundColor def lerpBackgroundColor(r, g, b, duration) Function to lerp background color to a new value

lightRGBPanel def lightRGBPanel(light, style='mini') Undocumented function.

lineInfo def lineInfo(baseFileName=1) returns the sourcefilename, line number, and function name of the code that called this function (answers the question: 'hey lineInfo, where am I in the codebase?') see stackEntryInfo, above, for info on 'baseFileName' and return types

lineTag def lineTag(baseFileName=1, verbose=0, separator=':') returns a string containing the sourcefilename and line number of the code that called this function (equivalent to lineInfo, above, with different return type) see stackEntryInfo, above, for info on 'baseFileName' if 'verbose' is false, returns a compact string of the form 'fileName:lineNum:funcName' if 'verbose' is true, returns a longer string that matches the format of Python stack trace dumps returns empty string on error

lineupPos def lineupPos(i, num, spacing) use to line up a series of 'num' objects, in one dimension, centered around zero 'i' is the index of the object in the lineup 'spacing' is the amount of space between objects in the lineup

list2dict def list2dict(L, value=None) creates dict using elements of list, all assigned to same value

loadEggData PointerTo< PandaNode > load_egg_data(EggData *data, CoordinateSystem cs = (CS_default)); Description: Another convenience function; works like load_egg_file() but starts from an already-filled EggData structure. The structure is destroyed in the loading.

loadEggFile PointerTo< PandaNode > load_egg_file(string const &filename, CoordinateSystem cs = (CS_default), BamCacheRecord *record = ((void *)(0))); Description: A convenience function; the primary interface to this package. Loads up the indicated egg file, and returns the root of a scene graph. Returns NULL if the file cannot be read for some reason. Also see the EggLoader class, which can exercise a bit more manual control over the loading process.

loadPrcFile ConfigPage *load_prc_file(string const &filename); Description: A convenience function for loading explicit prc files from a disk file or from within a multifile (via the virtual file system). Save the return value and pass it to unload_prc_file() if you ever want to unload this file later. The filename is first searched along the default prc search path, and then also along the model path, for convenience. This function is defined in putil instead of in dtool with the read of the prc stuff, so that it can take advantage of the virtual file system (which is defined in express), and the model path (which is in putil).

loadPrcFileData ConfigPage *load_prc_file_data(string const &name, string const &data); Description: Another convenience function to load a prc file from an explicit string, which represents the contents of the prc file. The first parameter is an arbitrary name to assign to this in-memory prc file. Supply a filename if the data was read from a file, or use any other name that is meaningful to you. The name is only used when the set of loaded prc files is listed.

logMethodCalls def logMethodCalls(cls) Undocumented function.

lookAt void look_at(LMatrix3f &mat, LVector3f const &fwd, LVector3f const &up = ((up())), CoordinateSystem cs = (CS_default)); Undocumented function.

loop def loop(*taskList) Undocumented function.

loopGen def loopGen(l) Undocumented function.

main def main(opts, args) Undocumented function.

make_loop def make_loop(taskList) Undocumented function.

make_sequence def make_sequence(taskList) Undocumented function.

makefilter def makefilter(name, xtrapath=None) Undocumented function.

makeFlywheelGen def makeFlywheelGen(objects, countList=None, countFunc=None, scale=None) Undocumented function.

makeList def makeList(x) returns x, converted to a list

makeresource def makeresource(name, xtrapath=None) Factory function that returns a resource subclass. NAME is the logical or physical name of a resource. XTRAPTH is a path or list of paths to search first. return one of the resource subclasses. Warning - logical names can conflict; archive might return a directory, when the module archive.py was desired.

makeTarget def makeTarget(cfg, section) Undocumented function.

makeTuple def makeTuple(x) returns x, converted to a tuple

mostDerivedLast def mostDerivedLast(classList) pass in list of classes. sorts list in-place, with derived classes appearing after their bases

newimport def newimport(*args, **kw) Undocumented function.

newToOldHpr LVecBase3f new_to_old_hpr(LVecBase3f const &new_hpr); Undocumented function.

nonRepeatingRandomList def nonRepeatingRandomList(vals, max) Undocumented function.

normalDistrib def normalDistrib(a, b, gauss=random.gauss) NOTE: assumes a < b Returns random number between a and b, using gaussian distribution, with mean=avg(a, b), and a standard deviation that fits ~99.7% of the curve between a and b. Outlying results are clipped to a and b. ------------------------------------------------------------------------ http://www-stat.stanford.edu/~naras/jsm/NormalDensity/NormalDensity.html The 68-95-99.7% Rule ==================== All normal density curves satisfy the following property which is often referred to as the Empirical Rule: 68% of the observations fall within 1 standard deviation of the mean. 95% of the observations fall within 2 standard deviations of the mean. 99.7% of the observations fall within 3 standard deviations of the mean. Thus, for a normal distribution, almost all values lie within 3 standard deviations of the mean. In calculating our standard deviation, we divide (b-a) by 6, since the 99.7% figure includes 3 standard deviations _on_either_side_ of the mean.

notNone def notNone(A, B) Undocumented function.

nullGen def nullGen() Undocumented function.

oldToNewHpr LVecBase3f old_to_new_hpr(LVecBase3f const &old_hpr); Undocumented function.

operator * LVecBase3f operator *(LVecBase3f const &v, LMatrix3f const &m); Undocumented function.

passwordHash string password_hash(string const &password, string const &salt, int iters, int keylen); Undocumented function.

pause def pause(delayTime) Undocumented function.

pdir def pdir(obj, str=None, width=None, fTruncate=1, lineWidth=75, wantPrivate=0) Undocumented function.

piratesAvatarShadow def piratesAvatarShadow() Undocumented function.

pivotScalar def pivotScalar(scalar, pivot) Undocumented function.

pkgfinder def pkgfinder(pkgdirs, dir, fnms) Undocumented function.

place def place(nodePath) Undocumented function.

planeIntersect def planeIntersect(lineOrigin, lineDir, planeOrigin, normal) Undocumented function.

print_exc_plus def print_exc_plus() Print the usual traceback information, followed by a listing of all the local variables in each frame.

printListEnum def printListEnum(l) Undocumented function.

printNumberedTyped def printNumberedTyped(items, maxLen=5000) print out each item of the list on its own line, with each item numbered on the left from zero

printProfile def printProfile(filename=PyUtilProfileDefaultFilename, lines=PyUtilProfileDefaultLines, sorts=PyUtilProfileDefaultSorts, callInfo=1) Undocumented function.

printStack def printStack() Undocumented function.

printThisCall def printThisCall() Undocumented function.

printVerboseStack def printVerboseStack() Undocumented function.

profile def profile(callback, name, terse) Undocumented function.

profiled def profiled(category=None, terse=False) decorator for profiling functions turn categories on and off via "want-profile-categoryName 1" e.g. @profiled('particles') def loadParticles(): ... want-profile-particles 1

qSlerp def qSlerp(startQuat, endQuat, t) Undocumented function.

queryFullscreenTestresult bool query_fullscreen_testresult(int xsize, int ysize); Undocumented function.

quickProfile def quickProfile(name="unnamed") Undocumented function.

rad2Deg double rad_2_deg(double f); Undocumented function.

randFloat def randFloat(a, b=0., rng=random.random) returns a random float in [a, b] call with single argument to generate random float between arg and zero

randHash def randHash(num) this returns a random 16-bit integer, given a seed integer. It will always return the same output given the same input. This is useful for repeatably mapping numbers with predictable bit patterns (i.e. doIds or zoneIds) to numbers with random bit patterns

randInt32 def randInt32(rng=random.random) returns a random integer in [-2147483648..2147483647]. rng must return float in [0..1]

randUint31 def randUint31(rng=random.random) returns a random integer in [0..2^31). rng must return float in [0..1]

randUint32 def randUint32(rng=random.random) returns a random integer in [0..2^32). rng must return float in [0..1]

rebindClass def rebindClass(filename) Undocumented function.

recordCreationStack def recordCreationStack(cls) Undocumented function.

reduceAngle def reduceAngle(deg) Reduces an angle (in degrees) to a value in [-180..180)

relHpr def relHpr(nodePath, base, h, p, r) Undocumented function.

remove_task def remove_task() Undocumented function.

replace def replace(list, old, new, all=0) replace 'old' with 'new' in 'list' if all == 0, replace first occurrence otherwise replace all occurrences returns the number of items replaced

replaceAIRFunc def replaceAIRFunc(replaceFuncList) Undocumented function.

replaceCRFunc def replaceCRFunc(replaceFuncList) Undocumented function.

replaceIvalFunc def replaceIvalFunc(replaceFuncList) Undocumented function.

replaceMessengerFunc def replaceMessengerFunc(replaceFuncList) Undocumented function.

replaceStateFunc def replaceStateFunc(replaceFuncList) Undocumented function.

replaceTaskMgrFunc def replaceTaskMgrFunc(replaceFuncList) Undocumented function.

report def report(types=[], prefix='', notifyFunc=None, dConfigParam=[]) This is a decorator generating function. Use is similar to a @decorator, except you must be sure to call it as a function. It actually returns the decorator which is then used to transform your decorated function. Confusing at first, I know. Decoration occurs at function definition time. If __dev__ is not defined, or resolves to False, this function has no effect and no wrapping/transform occurs. So in production, it's as if the report has been asserted out. Parameters:: types : A subset list of ['timeStamp', 'frameCount', 'avLocation'] This allows you to specify certain common bits of info. args: Prints the arguments as they were passed to this function. timeStamp: Adds the current frame time to the output. deltaStamp: Adds the current AI synched frame time to the output frameCount: Adds the current frame count to the output. Usually cleaner than the timeStamp output. avLocation: Adds the localAvatar's network location to the output. Useful for interest debugging. interests: Prints the current interest state after the report. stackTrace: Prints a stack trace after the report. prefix: Optional string to prepend to output, just before the function. Allows for easy grepping and is useful when merging AI/Client reports into a single file. notifyFunc: A notify function such as info, debug, warning, etc. By default the report will be printed to stdout. This will allow you send the report to a designated 'notify' output. dConfigParam: A list of Config.prc string variables. By default the report will always print. If you specify this param, it will only print if one of the specified config strings resolve to True.

resetSequence def resetSequence(task) Undocumented function.

resetVariableDict def resetVariableDict() Undocumented function.

resetWidgetDict def resetWidgetDict() Undocumented function.

rgbPanel def rgbPanel(nodePath, callback=None, style='mini') Undocumented function.

rgbPanel def rgbPanel(nodePath, callback=None, style='mini') Undocumented function.

rotateTo void rotate_to(LMatrix3f &mat, LVector3f const &a, LVector3f const &b); Undocumented function.

ROUND_INT def ROUND_INT(val) Undocumented function.

ROUND_TO def ROUND_TO(value, divisor) Undocumented function.

run def run(file) Undocumented function.

runtestFullscreenSizes void runtest_fullscreen_sizes(GraphicsWindow *win); klunky interface since we cant pass array from python->C++

safeRepr def safeRepr(obj) Undocumented function.

sameElements def sameElements(a, b) Undocumented function.

sequence def sequence(*taskList) Undocumented function.

serialNum def serialNum() Undocumented function.

setDefaultClickSound def setDefaultClickSound(newSound) Undocumented function.

setDefaultDialogGeom def setDefaultDialogGeom(newDialogGeom) Undocumented function.

setDefaultDrawOrder def setDefaultDrawOrder(newDrawOrder) Undocumented function.

setDefaultFont def setDefaultFont(newFont) Undocumented function.

setDefaultFontFunc def setDefaultFontFunc(newFontFunc) Undocumented function.

setDefaultPanel def setDefaultPanel(newPanel) Undocumented function.

setDefaultRolloverSound def setDefaultRolloverSound(newSound) Undocumented function.

setGuiGridSpacing def setGuiGridSpacing(spacing) Undocumented function.

SetStrafe def SetStrafe(status) Undocumented function.

setupMirror def setupMirror(name, width, height) Undocumented function.

showFrustum def showFrustum(np) Undocumented function.

solveQuadratic def solveQuadratic(a, b, c) Undocumented function.

spawnNewTask def spawnNewTask() Undocumented function.

spawnTkLoop def spawnTkLoop() Undocumented function.

squeeze def squeeze(app, start, filelist, outputDir) Undocumented function.

stackEntryInfo def stackEntryInfo(depth=0, baseFileName=1) returns the sourcefilename, line number, and function name of an entry in the stack. 'depth' is how far back to go in the stack; 0 is the caller of this function, 1 is the function that called the caller of this function, etc. by default, strips off the path of the filename; override with baseFileName returns (fileName, lineNum, funcName) --> (string, int, string) returns (None, None, None) on error

startProfile def startProfile(filename=PyUtilProfileDefaultFilename, lines=PyUtilProfileDefaultLines, sorts=PyUtilProfileDefaultSorts, silent=0, callInfo=1, cmd='run()') Undocumented function.

superFlattenShip def superFlattenShip(ship) Undocumented function.

tagRepr def tagRepr(obj, tag) adds a string onto the repr output of an instance

tagWithCaller def tagWithCaller(obj) add info about the caller of the caller

taskCallback def taskCallback(task) Undocumented function.

test def test() Undocumented function.

throwNewFrame void throw_new_frame(void); Undocumented function.

tkLoop def tkLoop(self) Undocumented function.

toggleGuiGridSnap def toggleGuiGridSnap() Undocumented function.

ToggleStrafe def ToggleStrafe() Undocumented function.

trace def trace(frame, event, arg) Undocumented function.

traceFunctionCall def traceFunctionCall(frame) return a string that shows the call frame with calling arguments. e.g. foo(x=234, y=135)

traceParentCall def traceParentCall() Undocumented function.

transpose LMatrix3f transpose(LMatrix3f const &a); Undocumented function.

troff def troff() Undocumented function.

tron def tron() Undocumented function.

union def union(a, b) union(list, list):

unique def unique(L1, L2) Return a list containing all items in 'L1' that are not in 'L2'

uniqueElements def uniqueElements(L) are all elements of list unique?

uniqueName def uniqueName(name) Undocumented function.

unloadPrcFile bool unload_prc_file(ConfigPage *page); Description: Unloads (and deletes) a ConfigPage that represents a prc file that was previously loaded by load_prc_file(). Returns true if successful, false if the file was unknown. After this function has been called, the ConfigPage pointer is no longer valid and should not be used again.

usage def usage() Undocumented function.

useDirectRenderStyle def useDirectRenderStyle(nodePath, priority=0) Function to force a node path to use direct render style: no lighting, and no wireframe

verify def verify(assertion) verify() is intended to be used in place of assert where you wish to have the assertion checked, even in release (-O) code.

weightedChoice def weightedChoice(choiceList, rng=random.random, sum=None) given a list of (weight, item) pairs, chooses an item based on the weights. rng must return 0..1. if you happen to have the sum of the weights, pass it in 'sum'.

weightedRand def weightedRand(valDict, rng=random.random) pass in a dictionary with a selection -> weight mapping. Eg. {"Choice 1": 10, "Choice 2": 30, "bear": 100} -Weights need not add up to any particular value. -The actual selection will be returned.

writeFsmTree def writeFsmTree(instance, indent=0) Undocumented function.