Lines Matching refs:node

74 global proc int nw4cSetMaterialAttr_Get_FaceCulling(string $node)
76 return (`attributeQuery -n $node -ex "nw4cFaceCulling"`) ?
77 `getAttr ($node + ".nw4cFaceCulling")` : 1;
80 global proc nw4cSetMaterialAttr_Add_FaceCulling(string $node)
82 if (!`attributeQuery -n $node -ex "nw4cFaceCulling"`)
85 -en "Front Face=0:Back Face=1:Always=2:Never=3" -dv 1 -h 1 $node;
89 global proc nw4cSetMaterialAttr_Set_FaceCulling(string $node, int $val)
91 nw4cSetMaterialAttr_Add_FaceCulling($node);
92 setAttr ($node + ".nw4cFaceCulling") $val;
95 proc SetJob_FaceCulling(string $node)
97 if (!`attributeQuery -n $node -ex "nw4cFaceCulling"`)
101 scriptJob -p nw4cSetMaterialAttr_FaceCulling -rp -ac ($node + ".nw4cFaceCulling")
103 + $node + "` + 1)) nw4cSetMaterialAttr_FaceCulling");
112 for ($node in $sgs)
114 nw4cSetMaterialAttr_Set_FaceCulling($node, ConvertFaceCulling_ToAttr($val));
123 global proc int nw4cSetMaterialAttr_Get_FragLighting(string $node)
125 return (`attributeQuery -n $node -ex "nw4cFragLighting"`) ?
126 `getAttr ($node + ".nw4cFragLighting")` : 1;
129 global proc nw4cSetMaterialAttr_Add_FragLighting(string $node)
131 if (!`attributeQuery -n $node -ex "nw4cFragLighting"`)
133 addAttr -ln "nw4cFragLighting" -at "bool" -dv 1 -h 1 $node;
137 global proc nw4cSetMaterialAttr_Set_FragLighting(string $node, int $val)
139 nw4cSetMaterialAttr_Add_FragLighting($node);
140 setAttr ($node + ".nw4cFragLighting") $val;
143 proc SetJob_FragLighting(string $node)
145 if (!`attributeQuery -n $node -ex "nw4cFragLighting"`)
149 scriptJob -p nw4cSetMaterialAttr_FragLighting -rp -ac ($node + ".nw4cFragLighting")
151 + $node + "` nw4cSetMaterialAttr_FragLighting");
159 for ($node in $sgs)
161 nw4cSetMaterialAttr_Set_FragLighting($node, $val);
170 global proc int nw4cSetMaterialAttr_Get_VtxLighting(string $node)
172 return (`attributeQuery -n $node -ex "nw4cVtxLighting"`) ?
173 `getAttr ($node + ".nw4cVtxLighting")` : 0;
176 global proc nw4cSetMaterialAttr_Add_VtxLighting(string $node)
178 if (!`attributeQuery -n $node -ex "nw4cVtxLighting"`)
180 addAttr -ln "nw4cVtxLighting" -at "bool" -dv 0 -h 1 $node;
184 global proc nw4cSetMaterialAttr_Set_VtxLighting(string $node, int $val)
186 nw4cSetMaterialAttr_Add_VtxLighting($node);
187 setAttr ($node + ".nw4cVtxLighting") $val;
190 proc SetJob_VtxLighting(string $node)
192 if (!`attributeQuery -n $node -ex "nw4cVtxLighting"`)
196 scriptJob -p nw4cSetMaterialAttr_VtxLighting -rp -ac ($node + ".nw4cVtxLighting")
198 + $node + "` nw4cSetMaterialAttr_VtxLighting");
206 for ($node in $sgs)
208 nw4cSetMaterialAttr_Set_VtxLighting($node, $val);
218 global proc int nw4cSetMaterialAttr_Get_BlendMode(string $node)
220 return (`attributeQuery -n $node -ex "nw4cBlendMode"`) ?
221 `getAttr ($node + ".nw4cBlendMode")` : 0;
224 global proc nw4cSetMaterialAttr_Add_BlendMode(string $node)
226 if (!`attributeQuery -n $node -ex "nw4cBlendMode"`)
229 -en "Auto=0:Opaque=1:Alpha Test=2:Translucent=3:Add=4:Sub=5:Multiply=6" -dv 0 -h 1 $node;
233 global proc nw4cSetMaterialAttr_Set_BlendMode(string $node, int $val)
235 nw4cSetMaterialAttr_Add_BlendMode($node);
236 setAttr ($node + ".nw4cBlendMode") $val;
239 proc SetJob_BlendMode(string $node)
241 if (!`attributeQuery -n $node -ex "nw4cBlendMode"`)
245 scriptJob -p nw4cSetMaterialAttr_BlendMode -rp -ac ($node + ".nw4cBlendMode")
247 + $node + "` + 1) nw4cSetMaterialAttr_BlendMode");
256 for ($node in $sgs)
258 nw4cSetMaterialAttr_Set_BlendMode($node, $val);
267 global proc int nw4cSetMaterialAttr_Get_NoCompress(string $node)
269 return (`attributeQuery -n $node -ex "nw4cNoCompressMat"`) ?
270 `getAttr ($node + ".nw4cNoCompressMat")` : 0;
273 global proc nw4cSetMaterialAttr_Add_NoCompress(string $node)
275 if (!`attributeQuery -n $node -ex "nw4cNoCompressMat"`)
277 addAttr -ln "nw4cNoCompressMat" -at "bool" -dv 0 -h 1 $node;
281 global proc nw4cSetMaterialAttr_Set_NoCompress(string $node, int $val)
283 nw4cSetMaterialAttr_Add_NoCompress($node);
284 setAttr ($node + ".nw4cNoCompressMat") $val;
287 proc SetJob_NoCompress(string $node)
289 if (!`attributeQuery -n $node -ex "nw4cNoCompressMat"`)
293 scriptJob -p nw4cSetMaterialAttr_NoCompress -rp -ac ($node + ".nw4cNoCompressMat")
295 + $node + "` + 1) nw4cSetMaterialAttr_NoCompress");
304 for ($node in $sgs)
306 nw4cSetMaterialAttr_Set_NoCompress($node, $val);
337 // set node name
363 string $node = $sgs[0];
365 int $faceCulling = `nw4cSetMaterialAttr_Get_FaceCulling $node`;
367 -cc ("nw4cSetMaterialAttr_FaceCullingCB " + $node)
370 checkBoxGrp -e -v1 `nw4cSetMaterialAttr_Get_FragLighting $node`
371 -cc ("nw4cSetMaterialAttr_FragLightingCB " + $node + " #1")
374 checkBoxGrp -e -v1 `nw4cSetMaterialAttr_Get_VtxLighting $node`
375 -cc ("nw4cSetMaterialAttr_VtxLightingCB " + $node + " #1")
378 optionMenuGrp -e -sl (`nw4cSetMaterialAttr_Get_BlendMode $node` + 1)
379 -cc ("nw4cSetMaterialAttr_BlendModeCB " + $node)
382 optionMenuGrp -e -sl (`nw4cSetMaterialAttr_Get_NoCompress $node` + 1)
383 -cc ("nw4cSetMaterialAttr_NoCompressCB " + $node)
387 SetJob_FaceCulling($node);
388 SetJob_FragLighting($node);
389 SetJob_VtxLighting($node);
390 SetJob_NoCompress($node);
477 for ($node in $sgs)
479 if ($node == "initialParticleSE" || $node == "swatchShadingGroup")
484 int $faceCull = ConvertFaceCulling_ToGUI(nw4cSetMaterialAttr_Get_FaceCulling($node));
493 int $fragLit = nw4cSetMaterialAttr_Get_FragLighting($node);
499 int $vtxLit = nw4cSetMaterialAttr_Get_VtxLighting($node);
505 int $blendMode = nw4cSetMaterialAttr_Get_BlendMode($node);
519 int $noCompress = nw4cSetMaterialAttr_Get_NoCompress($node);
530 select -add -ne $node; // shadingEngine
531 string $ins[] = `listConnections -s 1 -d 0 ($node + ".ss")`;
536 select -add $node; // shape or face
547 string $msg = "Found: " + $nodeCount + " shadingEngine node";
576 // node name