PDA

View Full Version : strange behavior with modo script


Testure
01-19-2011, 10:07 PM
i'm noticing a lot of inconsistencies with how modo works with scripts.. or at least, i don't understand why this is happening and it looks like it should work to me.

Basically, I have written an extremely small perl script:


lxout("[->] MOVING RIGHT.");
lx("tool.set TransformMove on");
lx("tool.attr xfrm.transform U 1.0");
lx("tool.doApply");
lx("tool.set TransformMove off 0");


All it does is take whatever I have selected in the UV window and moves it +1 in U space. so one UV square to the right. I also have one for Up, Down, and Left also.

I copied the commands directly from the command history after doing it manually, so there's nothing missing. and yet, when I use them I get weird behavior- things start moving diagonally like they're applying U and V transforms, when the script does not call for it.

Additionally, I wrote a small script that basically 'tightens up" my UVs by changing the action center to local, the axis to auto, and then scales the selection to zero (in either U or V, depending on which way I'm trying to "flatten"). If I recreate the steps manually, I get the code that is in my script. If I run the script, everything flattens like it's not using a local action center.


lxout("[->] TAUT UVS on V.");
lx("tool.set center.local on");
lx("tool.set axis.auto on");
lx("tool.set TransformScale on");
lx("tool.attr xfrm.transform SY 0.0");
lx("tool.doApply");
lx("tool.set TransformScale off 0");
I don't get it.. this should be ridiculously simple.

CGTalk Moderation
01-19-2011, 10:07 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.