pyTransform

Parent: ygTransform Example Source code Header file

Description

A pyTransform is an ygTransform that runs a Python script, similar to pyNode. In addition to the basic pyNode features, a pyTransform's script can also call methods that correspond to the C++ ygTransform methods.

Messages

scriptstring [, string]load a Python script and create an object
reloadreload the script previously loaded by script
autoResetbooltell the node to automatically reset any time the script file is modified
callstringcall a function on the Python object

See pyInterface for details on what these messages do.

Events

pyTransform itself does not generate any events. The Python scripts can generate their own events, however.

Keys

None.

Python Notes

pyTransform uses the class pyInterface to define the basic Python ygNode functions. In addition, it defines a Python class ygTransform (derived from ygNode), which includes methods to interface with the C++ ygTransform methods.

The added functions in ygTransform are:

setPosition (x, y, z)
Sets the x/y/z translation of the node.
setOrientation (x, y, z)
Sets the Euler-angle (x/y/z) rotation of the node.
setSize (x, y, z)
Sets the x/y/z scaling of the node. Note that there is no single-argument version of this function; to do a uniform scaling, call setSize() with all three arguments the same.


Last updated 13 September 2002.
home page