View Full Version : Noob question about transforms in script


deleted
11 November 2006, 06:45 PM
Hey guys, Im a huge noob with max script..as in I know nothing, lol. I just had a quick question. I have a very repetative task that consist of: extrude, scale, move, extrude and scale.....only problem is that the macrorecorder doesnt give me any script for the scaling operation. Anyone happen to know how to do that :) Thanks a bunch guys!

B

peliosis
11 November 2006, 10:43 PM
It does!

macroScript repeat category:"kojak How To"
(
$.faceExtrudeHeight = 9.58904
$.EditablePoly.buttonOp #extrude
$.outlineAmount = -15
$.EditablePoly.Outline ()
)


all the lines with $ are "just copied" from the listener, make sure you enabled recorder.
Then make new script, paste mine, put your copied code between the brackets, change category name to your facourite, click file>evaluate all and go to customize to drag your script to a toolbar or make a shortcut.

Edit: You can just drag the recorded lines to a toolbar to create a macro...

deleted
11 November 2006, 12:50 AM
It does!

macroScript repeat category:"kojak How To"
(
$.faceExtrudeHeight = 9.58904
$.EditablePoly.buttonOp #extrude
$.outlineAmount = -15
$.EditablePoly.Outline ()
)


all the lines with $ are "just copied" from the listener, make sure you enabled recorder.
Then make new script, paste mine, put your copied code between the brackets, change category name to your facourite, click file>evaluate all and go to customize to drag your script to a toolbar or make a shortcut.

Edit: You can just drag the recorded lines to a toolbar to create a macro...



Hmm, I dont see anything in there about scaling. What part controls that?

peliosis
11 November 2006, 11:29 AM
Sorry, I misread your post rushly and tried to be a smartass:)
There seems to be no logging of scaling nor rotation.
There always is "outline" for uniform scaling.

PEN
11 November 2006, 02:41 PM
$.scale=[2,1,1]

Will scale the object along the X axis by 200%. Ofcourse you should never scale an object at the object level unless you are going to resetXform on it as well.

Another way that is safer is to do something like this.


b=box()
x=xform()
addModifier b x
x.gizmo.scale=[2,1,1]

jonlauf
11 November 2006, 02:42 PM
Hi,

Assuming you are using an editable poly and you are uniformly scaling, could you just use the bevel faces operand? Paste the following into a new script and evaluate with your faces selected:


$.bevelFaces 100 100
move $.selectedFaces [100, 0, 0]
$.bevelFaces 100 100


--Jon

CGTalk Moderation
11 November 2006, 02:42 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.


1