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 (msg) |
def | on_create (cmds, depnode) |
def | initNumericAttribute (cls, param, datatype, plugtype) |
def | init_from_desc (cls, desc) |
def | make_node_class (desc) |
def | generic_post_constructor (cls) |
def | generic_get_files_to_archive (cls, short_name, unresolved_name, mark_could_be_image_sequence) |
def | register_prefs () |
Variables | |
long = int | |
SRC_PLUG = None | |
Create maya nodes based on their node description.
def rfm2.maya_node.generic_get_files_to_archive | ( | cls, | |
short_name, | |||
unresolved_name, | |||
mark_could_be_image_sequence | |||
) |
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 (RfmNodeDesc): 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 (RfmNodeDesc): 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.
def rfm2.maya_node.register_prefs | ( | ) |
rfm2.maya_node.long = int |
rfm2.maya_node.SRC_PLUG = None |