vray getGUIHint - BigRoy/mayaVrayCommandDocs GitHub Wiki
The getGUIHint function doesn't provide any useful functionality to us as scripters. It's mainly used by Chaosgroup's mel scripts that help build the Attribute Editor templates for specific nodes, in particular the RenderElements.
Because the RenderElements are all of the same nodeType but do require specific behaviour (in the Attribute Editor) for their custom attributes each VRayRenderElement uses this function while looping over it's attributes and building the AE interface.
Internal use.
mc.vray("getGUIHint", node, attr, func)
Flags
node
The node to get the attribute from.
attr
The attribute to get the gui function/naming from.
func
The attribute GUI function you're looking to get information for.
Some values for func
include:
- state
- group
- changeCommand
- subtype
Example
import maya.cmds as mc
# Create some renderElements in your scene and run the following:
renderElementsInScene = mc.ls(type="VRayRenderElement")
for node in renderElementsInScene:
print "=============="
print 'node:', node
attrs = mc.listAttr(node)
vrayAttrs = [attr for attr in attrs if attr.startswith("vray")]
for attr in vrayAttrs:
print " \___"
print " | attribute:", attr
print " | state:", mc.vray("getGUIHint", node, attr, "state")
print " | group:", mc.vray("getGUIHint", node, attr, "group")
print " | changeCommand:", mc.vray("getGUIHint", node, attr, "changeCommand")
And here's a test run:
==============
node: vrayRE_Custom_Color
\___
| attribute: vrayClassType
| state: None
| group: None
| changeCommand: None
\___
| attribute: vray_alias_customcolor
| state: [u're']
| group: [u'vrayCustomColorChannel']
| changeCommand: [u'']
\___
| attribute: vray_name_customcolor
| state: [u're']
| group: [u'vrayCustomColorChannel']
| changeCommand: [u'']
\___
| attribute: vray_colorMapping_customcolor
| state: [u're']
| group: [u'vrayCustomColorChannel']
| changeCommand: [u'']
\___
| attribute: vray_filtering_customcolor
| state: [u're']
| group: [u'vrayCustomColorChannel']
| changeCommand: [u'']
==============
node: vrayRE_Lighting
\___
| attribute: vrayClassType
| state: None
| group: None
| changeCommand: None
\___
| attribute: vray_alias_lighting
| state: [u're']
| group: [u'vrayLightingChannel']
| changeCommand: [u'']
\___
| attribute: vray_name_lighting
| state: [u're']
| group: [u'vrayLightingChannel']
| changeCommand: [u'']
\___
| attribute: vray_colorMapping_lighting
| state: [u're']
| group: [u'vrayLightingChannel']
| changeCommand: [u'']
==============
node: vrayRE_Shadow
\___
| attribute: vrayClassType
| state: None
| group: None
| changeCommand: None
\___
| attribute: vray_alias_shadow
| state: [u're']
| group: [u'vrayShadowChannel']
| changeCommand: [u'']
\___
| attribute: vray_name_shadow
| state: [u're']
| group: [u'vrayShadowChannel']
| changeCommand: [u'']
\___
| attribute: vray_colorMapping_shadow
| state: [u're']
| group: [u'vrayShadowChannel']
| changeCommand: [u'']
==============
node: vrayRE_Total_Light
\___
| attribute: vrayClassType
| state: None
| group: None
| changeCommand: None
\___
| attribute: vray_alias_totallight
| state: [u're']
| group: [u'vrayTotalLightChannel']
| changeCommand: [u'']
\___
| attribute: vray_name_totallight
| state: [u're']
| group: [u'vrayTotalLightChannel']
| changeCommand: [u'']
\___
| attribute: vray_colorMapping_totallight
| state: [u're']
| group: [u'vrayTotalLightChannel']
| changeCommand: [u'']