User guide

82
GetArguments([asOpArgs=False, asFnAttribute=False]) - returns a list of arguments to the attribute script. If the
asOpArgs parameter is set to True returns the new style Op arguments to the AttributeScript Op. If False, it
returns the old style AMP arguments. The arguments include CEL expressions, the name of the node, and similar. If
asFnAttribute is True, return the results as an asFnAttribute object, otherwise use the older ScenegraphAttr
class.
GetAttr(attributePath, [inherit=False, asAttr=False, atLocation=None, asNumpy=False, asFnAttribute=False]) -
given an attribute (for instance, visible or material.surfaceParams.Surf_Col), GetAttr returns a list of values,
with the following exceptions:
If an attribute does not exist at the given attribute, None is returned.
If inherit is set to True, the attribute is queried globally.
If asAttr is True, a successful query returns an object of type ScenegraphAttr. ScenegraphAttr is the internal
format of attributes in Katana. They are less immediate and convenient than raw lists of values but are useful
in two ways:
-They store multiple time samples of data.
-They are more efficient than converting to a list if the individual values of the queried attribute do not need to
be read or changed.
If the GetAttr option atLocation is given, the attribute is read from the named Scene Graph location, rather than
the script's current location. If the GetAttr option atLocation isn't being used, the results from the AttributeScript
running at the parent location is affected when using inherit=True.
NOTE: The asNumpy parameter is included for legacy reasons and should not be changed from False. If
the option is set to True, Katana raises an exception.
GetChildNames([atLocation=None]) - returns the child names from the current or specified Scene Graph
location.
GetConfig(name) - returns a named configuration value.
GetFrameTime() - returns the current frame time as a float.
GetFullName() - returns the full path of the current Scene Graph location. This is useful as a random seed.
GetName() - returns the base name of the current Scene Graph location.
GetNumSamples() - returns the scene-wide recommendation for the number of samples to generate.
GetResolution([name=None. asDict=False]) - returns the dimensions of a named resolution, or the current
resolution if the name is not specified. If the asDict parameter is False, the value returned is a 2-tuple of the width
and height values. If the asDict parameter is set to True, then it returns a dictionary containing more information
about the resolution than simply the dimensions.
GetShutterOpen() - returns the shutter open value as defined (and only as defined) by
renderSettings.shutterOpen.
GetShutterClose() - returns the shutter close value as defined (and only as defined) by
renderSettings.shutterClose.
GetType() - returns the type of the current Scene Graph location.
2 NODES A-C | ATTRIBUTESCRIPT