Hi, I'm new to the forum, have been using Moi for a while now (and of course loving it) but just dived into scripting a couple of Days ago.
I understood that the scripting-doc. is mainly the existing scripts and commands - but so far I could't get a hint how to solve this seemingly simple problem:
I'd like to do multiple (at least two) transforms on the same object (a curve). But when i run the (stripped) code following below I always end up with 2 curves - one scaled
(but not rotated) and the other rotated (but not scaled). The "make copy" flag does not seem to have any effect.
So my concept of what the factories do seems to be too simple. Does anyon have a clue what's going on under the hood here (history-sideeffects?) and what
is needed to get it right - or can point me to a script that does something similar (multiple transforms on same object)? Thanks in advance for any effort!
Achim
var scaleFactory = moi.command.createFactory( 'scale' );
scaleFactory.setInput( 0, curve );
scaleFactory.setInput( 1, pointpicker.pt );
scaleFactory.setInput( 2, 2.0 ); // scale-factor
scaleFactory.setInput( 5, false ); // "make copy" false
scaleFactory.update();
scaleFactory.commit();
var rotFactory = moi.command.createFactory( 'rotate' );
rotFactory.setInput( 0, curve );
rotFactory.setInput( 1, rotFrame );
rotFactory.setInput( 2, 5 ); // angle
rotFactory.setInput( 5, false );
rotFactory.update();
rotFactory.commit();
|