Pages

Tuesday, February 5, 2013

Scale Control script

Nothing fancy I think, but I saw many times peoples confused when come to binding each of scale XYZ values to a separate spinner controller, so this time I decide to help on this question with this mimi tool, that's all ;)

The script you can get from this forum thread, or Copy/Paste it from here.
rollout dlgScaler "Scale Control"
(
   local asp = #()
   
   spinner spnX "X:" range:[-1000,1000,100]
   spinner spnY "Y:" range:[-1000,1000,100]
   spinner spnZ "Z:" range:[-1000,1000,100]
   pickbutton pbNode "Pick Object" autoDisplay:true
   
   on pbNode picked obj do if isValidNode obj do
   (
      if classOf obj.scale.track != ScaleXYZ do
         obj.scale.track = ScaleXYZ()
      local asc = getXYZControllers obj.scale.track
      for i = 1 to 3 do asp[i].controller = asc[i]
   )
   on pbNode rightclick do
   (
      pbNode.object = undefined
      pbNode.caption = "Pick Object"
      for i = 1 to 3 do asp[i].controller = undefined
   )
   on dlgScaler open do (asp = #(spnX, spnY, spnZ))
)
CreateDialog dlgScaler

Multi Camera Preview 1.2


I'm not really sure whether I need to bother the public with so small improvement of this MaxScript tool :) anyway, check it out if you need cancel option.