pymel.core.windows.hyperShade¶
- hyperShade(*args, **kwargs)¶
Commands for shader editing in the hypergraph
Flags:
Long Name / Short Name Argument Types Properties assign / a unicode Assign the specified shader node to renderable objects on the active list. The node can either be a shading group or the shader node attached to the shading group. clearWorkArea / cwa bool Push the current work area on to the stack and create a clear work area collapse / clp unicode Hide the upstream nodes from the specified node. createNode / rcn unicode Create a node of the specified type. This is called when a new rendering node is created using drag and drop from the image browser or from the RMB context sensitive menu on nodes in the Visor Create folders. dependGraphArea / dg bool When setting a work area, and the work area doesn’t already exist this flag inicates a new graph should be created that is either a depend graph or a folder view. downStream / ds bool Show nodes downstream from the specified node duplicate / dup bool Duplicate upstream nodes. If the node is a shader make sure duplicate include the shading group if there is one fixRenderSize / fix bool If set to true dont rerender swatches when they change size as the user zooms incremental / inc bool Enable or disable incremental layout when making new nodes or connections listDownstreamNodes / ldn PyNode List all the downstream render nodes from the specified nodes. listDownstreamShaderNodes / lds PyNode List all the downstream shader nodes from the specified nodes. listUpstreamNodes / lun PyNode List all the upstream render nodes from the specified nodes. name / n unicode Name for the work area created by this command networks / net bool Do an incremental layout on all of the nodes in the current selection list and that are in the current work area. noSGShapes / nsg bool Display only shapes that are connected to nodes in the network other than a shading group. noShapes / ns bool Display no shapes when graphing networks. noTransforms / nt bool Display no transforms when graphing networks. objects / o unicode Select the objects which are attached to the specified shader node. The shader node can be either the shading group or the shader attached to the shading group. When this flag’s argument is the empty string, we will use the currently selected shder node as the input. renderCreateAndDrop / rcd unicode Create a render node of the specified type and put user into drag and drop mode to place or connect it. reset / rst bool Reset the Hypershade panel to its initial state. In particular delete all the work areas. resetGraph / rsg bool Reset the current graph. Typically called prior to rebuilding a folder in a Hypershade view. resetSwatch / rss bool For all selected nodes remove user defined swatches if the node has one setAllowsRegraphing / sar bool For internal use only. setWorkArea / swa unicode Set the work area to the existing named work area shaderNetwork / sn unicode Show the shader network for the specified material node. If the materials shading group has a displacement or volume map these will be shown. If not then the shading group will not be shown. shaderNetworks / sns bool Show the shader network for all the objects on the selection list that have shaders. shaderNetworksSelectMaterialNodes / smn bool Select the material nodes in the shader network for all the objects on the selection list that have shaders. snapShot / snp bool Put hypergraph in snapshot mode. This is only for testing uncollapse / ucl unicode Unhide the upstream nodes from the specified node. upStream / ups bool Show nodes upstream from the specified node userDefinedLayout / udl bool Enable or disable remembrance of user defined layouts. Default is disabled until this functionality is better tested. workAreaAddCmd / waa unicode Set the MEL procedure called when a new work area is added to HyperShade workAreaDeleteCmd / wad unicode Set the MEL procedure called when a work area is deleted in HyperShade workAreaSelectCmd / was unicode Set the MEL procedure called when a work area is selected in HyperShade Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.hyperShade
Example:
import pymel.core as pm pm.sphere() # Result: [nt.Transform(u'nurbsSphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] # pm.cone() # Result: [nt.Transform(u'nurbsCone1'), nt.MakeNurbCone(u'makeNurbCone1')] # myBlinn = pm.shadingNode('blinn', asShader=True) pm.select( 'nurbsSphere1' ) pm.hyperShade( assign=myBlinn ) pm.select( cl=True ) pm.hyperShade( objects=myBlinn ) blinn = pm.createNode('blinn') pm.select( 'lambert1', blinn ) pm.hyperShade( objects='' )