View Single Post
# 2 13-04-2017 , 10:26 AM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
I ran into problems sooner than that. "TransformAlongNormal" can't be found and throws an error. Just by looking, I can see some issues. The use of variables would make this a lot easier and flexible. It would basically eliminate the need to constantly pickwalk in order to act on objects.

Then there are lines like these:

Code:
SelectToggleMode;
toggleSelMode;
Those two commands do the same thing, which could lead to your component/object mode issues. Another example of this is these two lines. This probably won't cause any problems but still redundant.
Code:
DeleteHistory;
delete -ch;
And I'm guessing the following lines is where all the verts are pulled out to make the cage.

Code:
PolySelectConvert 3;
TransformAlongNormal;
setAttr "polyMoveVertex2.localTranslate" -type double3 0 0 60.975944 ;
The problem with this is that the "polyMoveVertex2" hardcodes names of objects into your script. So if there isn't a transform component node matching that name, the script will fail. This new code would do the same thing, and isn't dependant on specific object names, it simply acts on the selected verts.

Code:
PolySelectConvert 3;
polyMoveVertex  -localTranslate 0 0 60.975944;
I'll poke around a bit more later. The script could be a lot more efficient.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::