Notifications
Clear all

[Closed] Another question for scripters

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.

6 Replies

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…

LOL … that’s not the answer I wanted to hear… LOL but it kinda is the one I expected… thanks Bobo.

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

ok, got a bit of time, made some adjustments. Same instructions as b4. script is attatched.

cheers,
phil

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… 🙂

Seems to work absolutely fine so far… thanks again!!! A definte contender for sticking over on scriptspot methinks. 🙂