The print() and format() functions are straightforward.
The format function is used when any formatting of the output is desired, or if you want to print multiple values on a line.
When printing a value using either of these functions, a string representation of the value is printed. This is not the object name for those objects with names (for example a 3ds Max object or material).
In the following example, variable b contains a reference to a 3ds Max Box object that has a material applied:
The printed results above also reflect the result of a <value> as string operation, that is the result is a string representation of the object rather than the object name.
The following table shows the hierarchy of classes and superclasses for a variable that contains a reference to a 3ds Max Box object (i.e., b=box() ).
|
ClassOf |
SuperClassOf |
b | Box | GeometryClass |
box | GeometryClass | Node |
GeometryClass | Node | MAXWrapper |
Node | MAXWrapper | Value |
MAXWrapper | Value | Value |
Value | Value | Value |
The isKindOf() and classOf() functions are useful for filtering objects from a set.
One of the named parameters to the interactive node selection functions is filter , which allows you to specify a function that returns a value of true if an object can be selected.
The classOf , superClassOf , and isKindOf functions are frequently used in these functions.
For an example of such a usage, see Pickbutton.