rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Classes | |
class | PlugType |
class | MayaPxrNode |
class | MayaPxrLightUI |
class | MayaPxrLight |
Functions | |
def | maya_useNewAPI |
def | print_msg |
def | on_create |
def | initNumericAttribute |
def | init_from_desc |
def | make_node_class |
def | generic_post_constructor |
def | generic_get_files_to_archive |
Variables | |
list | _float3Types = ['color', 'float3', 'normal', 'point', 'vector'] |
Create maya nodes based on their node description.
def rfm2.maya_node.generic_get_files_to_archive | ( | cls, | |
shortName, | |||
unresolvedName, | |||
markCouldBeImageSequence | |||
) |
def rfm2.maya_node.generic_post_constructor | ( | cls | ) |
This is where we will set the array parameters to their default values. A dynamic array may have a defaut initializer, like: float positions[] = {0.0, 0.5, 1.0} (OSL) default="[0.0 0.5 1.0]" (ARGS)
def rfm2.maya_node.init_from_desc | ( | cls, | |
desc | |||
) |
Closure to return a fully configured initialize() static method. Args: desc (NodeDesc): The node description object. Returns: object: the configured static method.
def rfm2.maya_node.initNumericAttribute | ( | cls, | |
param, | |||
datatype, | |||
plugtype | |||
) |
Initialize a numeric attribute of type datatype, configure it based on plugtype and adds it to the MPxNode. By default, plugs are connectable unless specified otherwise in the node description. Args: param (NodeDescParam): The parameter description datatype (MFnNumericData): The exact attribute type (int, float, etc) plugtype (PlugType): indicate if this is an input or output plug.
def rfm2.maya_node.make_node_class | ( | desc | ) |
Dynamically creates a new class (inheriting from MayaNode) for a specific node type. The class gets a bespoke initialize() and creator() static method. Later on, we will be able to use the same method to add a compute() or VP2 drawing code. Args: desc (NodeDesc): The full node description Returns: object: the new class
def rfm2.maya_node.maya_useNewAPI | ( | ) |
The presence of this function tells Maya that the plugin produces, and expects to be passed, objects created using the Maya Python API 2.0.
def rfm2.maya_node.on_create | ( | cmds, | |
depnode | |||
) |
Runs a python command after a node has been created. This is lauched from the postConstructor. Only use when you need to create additional nodes. Defaults should always be set by the postConstructor.
def rfm2.maya_node.print_msg | ( | msg | ) |
debug: print the contents of the om.MNodeMessage bit field.
list rfm2.maya_node._float3Types = ['color', 'float3', 'normal', 'point', 'vector'] |