Hi there,
MEL is not my forte, however I wrote this very simple script, basically select objects and then run it and it'll automatically assign a VRayToon shader to all selected objects.
However, I do not know how ot create a + counter for the $vtoon and $vtoonset values so one could run the script multiple times. As it stand the script will work once due per scene due to it relying on incremental names. Can someone please help in adding this?
MEL is not my forte, however I wrote this very simple script, basically select objects and then run it and it'll automatically assign a VRayToon shader to all selected objects.
Code:
global proc vrayPen(){ // int $i; string $vtoonset = ("set_vrayToonPen" + $i); string $vtoon = ("toon_vrayToonPen" + $i); string $myNode = `createNode VRayToon -n $vtoon -ss`; sets -n $vtoonset; connectAttr -f ($vtoonset +".memberWireframeColor") ($vtoon + ".excludeList"); setAttr ($myNode + ".excludeType") 1; print "// Result: Successfully assigned VRayToon to selected objects"; }
Comment