rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.ui.callbacks Namespace Reference

Functions

def render_node_classification
 
def hyper_shade_create_menu
 
def hypershade_create_sub_menu
 
def create_render_node_select_node_cats
 
def build_render_node_tree_lister_content
 
def create_render_node_plugin_change
 
def create_render_node_callback
 
def provide_class_strs_for_filtered_treelister
 
def prevent_material_deletion_from_clean_up_scene_cmd
 
def provide_ae_template_for_node_type
 
def first_connected_shader
 
def all_connected_shaders
 
def register
 

Variables

string RFM = 'RenderMan_for_Maya'
 

Detailed Description

Maya UI callbacks for RenderMan for Maya.

List of Maya 2017 callbacks (+ means 'implemented'):
    + hyperShadePanelBuildCreateMenu
    + hyperShadePanelBuildCreateSubMenu
hyperShadePanelPluginChange
    + createRenderNodeSelectNodeCategories
    + createRenderNodePluginChange
    + renderNodeClassification
createRenderNodeCommand
    + buildRenderNodeTreeListerContent
AETemplateCustomContent
    + firstConnectedShader
    + allConnectedShaders
renderLayerPresetMenu
addBakingMenuItems
addVertexBakingMenuItems
addPrelightMenuItems
addRMBBakingMenuItems
addMayaRenderingPreferences
updateMayaRenderingPreferences
addMayaMuscleShelfButtons
addMayaMuscleMenuItems
addBackburnerRendererMenuItems
    + provideAETemplateForNodeType
AEnewMultiHandler
AEreplaceMultiHandler
AEnewAttributeHandler
AEreplaceAttributeHandler
provideClassificationStrings
provideClassificationExclusionStrings
provideClassificationStringsForFilteredTreeLister
nodeCanBeUsedAsMaterial
addHeaderContentToMayaLambertianShadersAE
provideNodeToAttrConnection
provideNodeToNodeConnection
provideOutputAttributeNameForTextureNode
addItemsToHypergraphNodePopupMenu
addItemsToRenderLayerEditorPopupMenu
    + preventMaterialDeletionFromCleanUpSceneCommand
connectNodeToNodeOverrideCallback
prepareRenderChanged
enableRenderPassMenuOfRenderView
addItemsToRenderPassMenuOfRenderView
addItemsToRMBMenuOfTreeLister
saveCustomNodePresetAttributes
addItemToFileMenu
    + addItemToCreateLightMenu
textureReload

Function Documentation

def rfm2.ui.callbacks.all_connected_shaders (   nodename)
This hook is called to determine all the shaders connected to the given
Shading Engine. Called by the Attribute Editor, HyperShade, etc.

Args:
- nodename (string): the name of the Shading Engine

Returns:
- (string): a colon separated list of the connected custom shaders, i.e.
  'shader1:shader2:shader3'
def rfm2.ui.callbacks.build_render_node_tree_lister_content (   renderNodeTreeLister,
  postCommand,
  filterString 
)
Creates the renderman entries in the hypershade's treeLister.

Parameters
----------
renderNodeTreeLister : str
    the render node tree lister.
postCommand : str
    command to be run post-creation.
filterString : str
    a space delimited list of filters.

Returns
-------
None

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def rfm2.ui.callbacks.create_render_node_callback (   postCommand,
  nodeType 
)
This hook is called when a RenderMan node is created in the node editor.

Parameters
----------
postCommand : str
nodeType : str

Returns
-------
string
    The mel command that should be executed to create this type of node,
    or nothing if it's not our node.
def rfm2.ui.callbacks.create_render_node_plugin_change (   classification)
This hook is called when a plugin change event has occurred to decide if
the Create Render Node dialog needs to be closed.

Parameters
----------
classification : str
    classification string belonging to a plugin node, possibly from another
    plugin.

Returns
-------
int
    non-zero if your plugin is responsible for nodes of this classification,
    and the Create Render Node dialog needs to be closed.
def rfm2.ui.callbacks.create_render_node_select_node_cats (   nodeTypesFlag,
  renderNodeTreeLister 
)
This hook is called when the Create Render Node dialog is being constructed,
and allows a third party to have their nodes selected by default. A flag of
the form '-allWithMyRendererUp' is the standard form, and the selection can
be set up in the tree lister in the callback.

Parameters
----------
nodeTypesFlag : str
    flag passed to the Create Render Node dialog command with the leading
    minus (-) removed.
treeLister : str
    the tree lister widget which should be affected.

Returns
-------
None

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

def rfm2.ui.callbacks.first_connected_shader (   nodename)
This hook is called to determine the primary custom shader connected to
the given Shading Engine.

Args:
- nodename (string): the name of the Shading Engine

Returns:
- (string): the name of the custom shader if applicable
def rfm2.ui.callbacks.hyper_shade_create_menu ( )
This hook is called to add content to the Hypershade panel create menu. It
will be called after the standard Maya node entries have been created.

In order to preserve the desired look in the Maya UI, these callbacks
should add a menu item divider just before returning using:
menuItem -divider true.

Parameters
----------
None

Returns
-------
None
def rfm2.ui.callbacks.hypershade_create_sub_menu ( )
This hook is called to get a classification string for the custom renderer
shading nodes, to prevent them from being listed with the standard Maya
nodes.

Parameters
----------
None

Returns
-------
None

+ Here is the call graph for this function:

def rfm2.ui.callbacks.prevent_material_deletion_from_clean_up_scene_cmd (   shader,
  plug,
  connection 
)
This hook is called by the cleanUpScene command and gives the plugin a
chance to communicate that a material node is still in use and shouldn't be
deleted. The hook is called once per plug/connection pair of each shader
instance.

We need to bail out on custom shading group like Hair or vdb nodes.

Parameters
----------
shader : str
    the name of the shader node being deleted.
plug : str
    the name of the plug queried.
connection : str
    the name of the connection queried.

Returns
-------
None

+ Here is the caller graph for this function:

def rfm2.ui.callbacks.provide_ae_template_for_node_type (   nodetype)
This hook is called to give plugins a chance to provide a UI template for
nodes which do not have a corresponding AE'nodeType'Template procedure.

Args:
- nodeType (string): the type of the node for which the AE is being
constructed.

Return:
- (string): the name of a MEL command or procedure to use as the
AETemplate for the requested node type.

+ Here is the call graph for this function:

def rfm2.ui.callbacks.provide_class_strs_for_filtered_treelister (   currentFilterString)
This hook is called by 'createAssignNewMaterialTreeLister' and gives
plugins a chance to append to the classification filter passed to the Tree
Lister builder. It must return a string where each new classification is
separated by a white space.

Parameters
----------
currentFilterString : str
    a white-space-separated string representing the current classifications.

Returns
-------
str
    the relevant classification string

+ Here is the call graph for this function:

def rfm2.ui.callbacks.register ( )
Register UI callbacks to Maya for our renderer.

Parameters
----------
None

Returns
-------
None

+ Here is the caller graph for this function:

def rfm2.ui.callbacks.render_node_classification ( )
This hook is called to get a classification string for the custom renderer
shading nodes. This is used to determine if a given node type belongs to a
plugin renderer.

Parameters
----------
None

Returns
-------
str
    A classification string, such as rendernode/myrenderer

+ Here is the caller graph for this function:

Variable Documentation

string rfm2.ui.callbacks.RFM = 'RenderMan_for_Maya'