PDA

View Full Version : Another question for scripters


xynaria
06-14-2003, 07:26 AM
Would it be possible through scripting to ammend the align dialogue box to include a tick option for 'all' along with the 3 axis boxes..? I can't be the only person on the planet who in the majority of instances wants a total align and gets irritated that I have to click 3/6 boxes when 1/2 would do.. when you're rigging it really adds up. :)

Bobo
06-15-2003, 03:50 PM
Originally posted by xynaria
Would it be possible through scripting to ammend the align dialogue box to include a tick option for 'all' along with the 3 axis boxes..? I can't be the only person on the planet who in the majority of instances wants a total align and gets irritated that I have to click 3/6 boxes when 1/2 would do.. when you're rigging it really adds up. :)


Nope.
Unless someone scripts the complete feature from scratch...

xynaria
06-15-2003, 05:15 PM
LOL .. that's not the answer I wanted to hear... LOL but it kinda is the one I expected.... thanks Bobo. :)

phil
06-17-2003, 07:53 AM
hi xynaria,
Here's a quick and nasty script which will align the selected objects to an object you pick. Pretty ugly but it'll give you a good idea of where to start for a full align tool.

copy the red text below and paste it into a max script window, either run it from there or highlight it all and drag it to a toolbar to create a button.

have fun,
cheers,
phil








rollout align "object aligner" width:200 height:80

(

pickbutton obj_to_align_to "align-er"

global ota = selection -- collect the current selection

on obj_to_align_to picked obj do
(

if ota[1] == undefined then -- reference the first object in the current selection to check for it's existence

messagebox "pick an object to align too first please" -- prompt the user to select an object first

if ota[1] != undefined then -- if an object is already selected then parse the code
(
obj_to_align_to.text = obj.name -- set the button name to the picked objects name
otat = obj.transform -- create the variable 'otat' to hold the picked objects transformations

for i = 1 to ota.count do -- loop through all the selected objects and set their transform values to the picked objects
(
ota[i].transform = otat
)
)
)

) -- close her up

r_flt = newrolloutfloater "object aligner" 200 120

addrollout align r_flt

phil
06-17-2003, 09:56 AM
ok, got a bit of time, made some adjustments. Same instructions as b4. script is attatched.

cheers,
phil

xynaria
06-17-2003, 10:14 AM
Woah .. Thanks very much Phil.. I've just yesterday started to have another look at Max Script to see if it actually is possible for me to learn it.. the idea being to create a simple align all script LOL.. I'll run this through later today.. :) :) :):beer:

xynaria
06-17-2003, 01:44 PM
Seems to work absolutely fine so far.. thanks again!!! A definte contender for sticking over on scriptspot methinks. :):beer:

CGTalk Moderation
01-15-2006, 08:00 AM
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.