rfm2  22.0
A python-based rewrite of RenderMan for Maya
rfm2.maya_node Namespace Reference

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
 

Detailed Description

Create maya nodes based on their node description.

Function Documentation

◆ generic_get_files_to_archive()

def rfm2.maya_node.generic_get_files_to_archive (   cls,
  short_name,
  unresolved_name,
  mark_could_be_image_sequence 
)
+ Here is the caller graph for this function:

◆ generic_post_constructor()

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)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_from_desc()

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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initNumericAttribute()

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.
+ Here is the call graph for this function:

◆ make_node_class()

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
+ Here is the call graph for this function:

◆ maya_useNewAPI()

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.

◆ on_create()

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.
+ Here is the call graph for this function:

◆ print_msg()

def rfm2.maya_node.print_msg (   msg)
debug: print the contents of the om.MNodeMessage bit field.

◆ register_prefs()

def rfm2.maya_node.register_prefs ( )

Variable Documentation

◆ long

rfm2.maya_node.long = int

◆ SRC_PLUG

rfm2.maya_node.SRC_PLUG = None