Hello All,
I'm trying to combine 3 small pivot scripts into One, so that I can cycle threw each with one keystroke. I quite literally have ZERO experiance with MaxScript, have tried to google search, youtube, and read the information about it.. But i'm completly lost, and cant seem to get these to all work together... Can anyone possibly help me out?
(Below are the 3 scripts):
($.pivot.z = $.min.z )
Macroscript CenterPivot
($.pivot.z = $.max.z)
Honestly, I'm not even quite sure if I wrote the first and last correctly, as i get a script error when I click it with nothing selected. ๐
Thanks for any input,
Regards,
Nolan
(for obj in selection do (obj.pivot.z = obj.min.z)) (for obj in selection do (centerPivot obj)) (for obj in selection do (obj.pivot.z = obj.max.z))They will do nothing if the selection collection is empty (nothing is selected).
(if selection.count == 1 then (selection[1].pivot.z = selection[1].min.z)) (if selection.count == 1 then (centerPivot selection[1]) (if selection.count == 1 then (selection[1].pivot.z = selection[1].max.z))
Thanks for the Reply Steve! Much appriciated.
Regarding the cycling threw. I'm not really looking to create any UI for the script. I mainly just want to assign a keystroke to the routine. I was thinking it would look somthing like this (if it was even possible).
Set pivot to obj.Min.z, if pivot is set to obj.min.z, set to centerPivot, if set to centerPivot obj, set to obj.max.z
I guess i really just dont know the coding language to try it, and I dont really understand how to add variables like, "If X is X do X".
( if selection.count == 1 then ( local obj = selection[1] if obj.pivot.z == obj.min.z then obj.pivot.z = obj.max.z else if obj.pivot.z == obj.max.z then centerPivot obj else obj.pivot.z = obj.min.z ) )
DUDE!! YOU ARE MY **** HERO!!!
I've been trying to get this figured out for months! lol *facepalm*
macroScript PivotMover category:"ScriptTools" tooltip:"Pivot Mover" Icon:#("Maxscript",1)
Can't find what you're looking for? Ask the community or share your knowledge.