Lines Matching refs:node
75 global proc int nw4cSetMaterialAttr_Get_FaceCulling(string $node)
77 return (`attributeQuery -n $node -ex "nw4cFaceCulling"`) ?
78 `getAttr ($node + ".nw4cFaceCulling")` : 1;
81 global proc nw4cSetMaterialAttr_Add_FaceCulling(string $node)
83 if (!`attributeQuery -n $node -ex "nw4cFaceCulling"`)
86 -en "Front Face=0:Back Face=1:Always=2:Never=3" -dv 1 -h 1 $node;
90 global proc nw4cSetMaterialAttr_Set_FaceCulling(string $node, int $val)
92 nw4cSetMaterialAttr_Add_FaceCulling($node);
93 setAttr ($node + ".nw4cFaceCulling") $val;
96 proc SetJob_FaceCulling(string $node)
98 if (!`attributeQuery -n $node -ex "nw4cFaceCulling"`)
102 scriptJob -p nw4cSetMaterialAttr_FaceCulling -rp -ac ($node + ".nw4cFaceCulling")
104 + $node + "` + 1)) nw4cSetMaterialAttr_FaceCulling");
113 for ($node in $sgs)
115 nw4cSetMaterialAttr_Set_FaceCulling($node, ConvertFaceCulling_ToAttr($val));
124 global proc int nw4cSetMaterialAttr_Get_FragLighting(string $node)
126 return (`attributeQuery -n $node -ex "nw4cFragLighting"`) ?
127 `getAttr ($node + ".nw4cFragLighting")` : 1;
130 global proc nw4cSetMaterialAttr_Add_FragLighting(string $node)
132 if (!`attributeQuery -n $node -ex "nw4cFragLighting"`)
134 addAttr -ln "nw4cFragLighting" -at "bool" -dv 1 -h 1 $node;
138 global proc nw4cSetMaterialAttr_Set_FragLighting(string $node, int $val)
140 nw4cSetMaterialAttr_Add_FragLighting($node);
141 setAttr ($node + ".nw4cFragLighting") $val;
144 proc SetJob_FragLighting(string $node)
146 if (!`attributeQuery -n $node -ex "nw4cFragLighting"`)
150 scriptJob -p nw4cSetMaterialAttr_FragLighting -rp -ac ($node + ".nw4cFragLighting")
152 + $node + "` nw4cSetMaterialAttr_FragLighting");
160 for ($node in $sgs)
162 nw4cSetMaterialAttr_Set_FragLighting($node, $val);
171 global proc int nw4cSetMaterialAttr_Get_VtxLighting(string $node)
173 return (`attributeQuery -n $node -ex "nw4cVtxLighting"`) ?
174 `getAttr ($node + ".nw4cVtxLighting")` : 0;
177 global proc nw4cSetMaterialAttr_Add_VtxLighting(string $node)
179 if (!`attributeQuery -n $node -ex "nw4cVtxLighting"`)
181 addAttr -ln "nw4cVtxLighting" -at "bool" -dv 0 -h 1 $node;
185 global proc nw4cSetMaterialAttr_Set_VtxLighting(string $node, int $val)
187 nw4cSetMaterialAttr_Add_VtxLighting($node);
188 setAttr ($node + ".nw4cVtxLighting") $val;
191 proc SetJob_VtxLighting(string $node)
193 if (!`attributeQuery -n $node -ex "nw4cVtxLighting"`)
197 scriptJob -p nw4cSetMaterialAttr_VtxLighting -rp -ac ($node + ".nw4cVtxLighting")
199 + $node + "` nw4cSetMaterialAttr_VtxLighting");
207 for ($node in $sgs)
209 nw4cSetMaterialAttr_Set_VtxLighting($node, $val);
219 global proc int nw4cSetMaterialAttr_Get_BlendMode(string $node)
221 return (`attributeQuery -n $node -ex "nw4cBlendMode"`) ?
222 `getAttr ($node + ".nw4cBlendMode")` : 0;
225 global proc nw4cSetMaterialAttr_Add_BlendMode(string $node)
227 if (!`attributeQuery -n $node -ex "nw4cBlendMode"`)
230 -en "Auto=0:Opaque=1:Alpha Test=2:Translucent=3:Add=4:Sub=5:Multiply=6" -dv 0 -h 1 $node;
234 global proc nw4cSetMaterialAttr_Set_BlendMode(string $node, int $val)
236 nw4cSetMaterialAttr_Add_BlendMode($node);
237 setAttr ($node + ".nw4cBlendMode") $val;
240 proc SetJob_BlendMode(string $node)
242 if (!`attributeQuery -n $node -ex "nw4cBlendMode"`)
246 scriptJob -p nw4cSetMaterialAttr_BlendMode -rp -ac ($node + ".nw4cBlendMode")
248 + $node + "` + 1) nw4cSetMaterialAttr_BlendMode");
257 for ($node in $sgs)
259 nw4cSetMaterialAttr_Set_BlendMode($node, $val);
268 global proc int nw4cSetMaterialAttr_Get_NoCompress(string $node)
270 return (`attributeQuery -n $node -ex "nw4cNoCompressMat"`) ?
271 `getAttr ($node + ".nw4cNoCompressMat")` : 0;
274 global proc nw4cSetMaterialAttr_Add_NoCompress(string $node)
276 if (!`attributeQuery -n $node -ex "nw4cNoCompressMat"`)
278 addAttr -ln "nw4cNoCompressMat" -at "bool" -dv 0 -h 1 $node;
282 global proc nw4cSetMaterialAttr_Set_NoCompress(string $node, int $val)
284 nw4cSetMaterialAttr_Add_NoCompress($node);
285 setAttr ($node + ".nw4cNoCompressMat") $val;
288 proc SetJob_NoCompress(string $node)
290 if (!`attributeQuery -n $node -ex "nw4cNoCompressMat"`)
294 scriptJob -p nw4cSetMaterialAttr_NoCompress -rp -ac ($node + ".nw4cNoCompressMat")
296 + $node + "` + 1) nw4cSetMaterialAttr_NoCompress");
305 for ($node in $sgs)
307 nw4cSetMaterialAttr_Set_NoCompress($node, $val);
338 // set node name
364 string $node = $sgs[0];
366 int $faceCulling = `nw4cSetMaterialAttr_Get_FaceCulling $node`;
368 -cc ("nw4cSetMaterialAttr_FaceCullingCB " + $node)
371 checkBoxGrp -e -v1 `nw4cSetMaterialAttr_Get_FragLighting $node`
372 -cc ("nw4cSetMaterialAttr_FragLightingCB " + $node + " #1")
375 checkBoxGrp -e -v1 `nw4cSetMaterialAttr_Get_VtxLighting $node`
376 -cc ("nw4cSetMaterialAttr_VtxLightingCB " + $node + " #1")
379 optionMenuGrp -e -sl (`nw4cSetMaterialAttr_Get_BlendMode $node` + 1)
380 -cc ("nw4cSetMaterialAttr_BlendModeCB " + $node)
383 optionMenuGrp -e -sl (`nw4cSetMaterialAttr_Get_NoCompress $node` + 1)
384 -cc ("nw4cSetMaterialAttr_NoCompressCB " + $node)
388 SetJob_FaceCulling($node);
389 SetJob_FragLighting($node);
390 SetJob_VtxLighting($node);
391 SetJob_NoCompress($node);
478 for ($node in $sgs)
480 if ($node == "initialParticleSE" || $node == "swatchShadingGroup")
485 int $faceCull = ConvertFaceCulling_ToGUI(nw4cSetMaterialAttr_Get_FaceCulling($node));
494 int $fragLit = nw4cSetMaterialAttr_Get_FragLighting($node);
500 int $vtxLit = nw4cSetMaterialAttr_Get_VtxLighting($node);
506 int $blendMode = nw4cSetMaterialAttr_Get_BlendMode($node);
520 int $noCompress = nw4cSetMaterialAttr_Get_NoCompress($node);
531 select -add -ne $node; // shadingEngine
532 string $ins[] = `listConnections -s 1 -d 0 ($node + ".ss")`;
537 select -add $node; // shape or face
548 string $msg = "Found: " + $nodeCount + " shadingEngine node";
577 // node name