Trees | Indices | Help |
---|
|
maya.OpenMayaMPx.MPxNode --+ | shaderBase
This is the base class used by slum shader nodes. Every node is initialized based on a class that derivates from this one. For surface shaders for example, we use the shaderSurface class, which is derivate from this class and MPxHardwareShader. For light shaders, we use shaderLight class, which is derivate from this one and MPxLocatorNode
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|||
|
|
|||
slum = None hash(x) |
|
placeholder. not used at the moment |
this method is called by maya when rendering in software mode or viewport texture mode. we need to come up with a way to have a maya software code inside a slum template that can be executed here. The way maya software shaders are written is pretty complex, compared to rsl and others, so my plan is to create some python classes that would simplify the maya software shader development, bringing it more close to rsl... |
plugin creation method (returns the class object). this is needed to register a new node in maya. |
plugin initializaton method. this is needed to register a new node in maya. usually, this method would handle all the initialization of parameters for the node. Instead, we initialize the node in another method that is called AFTER the node already exists in maya. This make the whole process much simple, and if we need to update a node from a new version of a slum template, we just call the same method again. |
this is the real initialization function... this is called after the node exists in maya. so we can use this to dinamicaly add the shader attributes. Also, this same method can be called to update the node if the class code changes. |
callback when user changes parameters in the node. Returning false forces maya to set the value of the attribute as it would whitout a callback. returning true means that this function set the value and maya dont need to do a thing. False is default! |
callback when reading parameters from the node. returning false forces maya to get teh value of the attribute as it would whitout a callback. returning true forces maya to avoid getting the value itself, and will return whatever this method put inside dataHandle. False is default! |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Oct 28 16:21:54 2010 | http://epydoc.sourceforge.net |