validate_mesh_shader_connections
ValidateMeshShaderConnections
Bases: MayaInstancePlugin
, OptionalPyblishPluginMixin
Ensure mesh shading engine connections are valid.
In some scenarios Maya keeps connections to multiple shaders even if just a single one is assigned on the shape.
These are related sets returned by maya.cmds.listSets
that don't actually have the shape as member.
Source code in client/ayon_maya/plugins/publish/validate_mesh_shader_connections.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
process(instance)
Process all the nodes in the instance 'objectSet'
Source code in client/ayon_maya/plugins/publish/validate_mesh_shader_connections.py
101 102 103 104 105 106 107 108 109 110 |
|
disconnect(node_a, node_b)
Remove all connections between node a and b.
Source code in client/ayon_maya/plugins/publish/validate_mesh_shader_connections.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|
get_invalid_sets(shapes)
Return invalid sets for the given shapes.
This takes a list of shape nodes to cache the set members for overlapping sets in the queries. This avoids many Maya set member queries.
Returns:
Name | Type | Description |
---|---|---|
dict | Dictionary of shapes and their invalid sets, e.g. {"pCubeShape": ["set1", "set2"]} |
Source code in client/ayon_maya/plugins/publish/validate_mesh_shader_connections.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
pairs(iterable)
Iterate over iterable per group of two
Source code in client/ayon_maya/plugins/publish/validate_mesh_shader_connections.py
12 13 14 15 16 |
|