|
First of all, thank you so much, miauu, for taking the time to help me with this issue. I really appreciate it. It’s invaluable to have a community of users willing to help like this…
OK, I’m attaching my latest script (which isn’t really changed from above much), but I’ve added print statements throughout to give me feedback while it runs. I’m also attaching a test max file for you. (See the attachments to my original post at the top of the page.)
Here are the steps to reproduce the error:
1. Open the max file. You’ll see a bunch of editable polys.
2. Run the script. It should run fine. You’ll get output in the maxscript listener.
3. Select all of the boxes and convert them to Editable Polys.
4. Create a box primitive anywhere.
5. Run the script again. This time you get an error at this line:
(rotx==1) : $.modifiers[1].gizmo.rotation=(angleaxis 90 [1,0,0]) as quat
(I’ve posted a JPG of the error that I get to my first post above.)
Notice a couple of things:
1. The script stopped at Box003 because that is the first shape for which rotx or rotz =1.
2. The loop went through Box001 and Box002 before stopping and without error, however, there are NO UVW Maps applied to those shapes. It ran, but didn’t work.
3. If you run the script again right now, it’ll work.
You can repeat this whole process by selecting all, converting everything to an editable poly again, and then adding another primitive.
I hope you can reproduce this on your end ... otherwise, I’ll feel like I’m going insane!
Author: TonyInSeattle
|