Notifications
Clear all

[Closed] Noob question about transforms in script

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

5 Replies

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…

1 Reply
(@system)
Joined: 11 months ago

Posts: 0

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

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
$.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]
 

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