Pixero
08-17-2006, 06:41 AM
Need some help with my first Maxscript.
I've tried to make a numeric transform box that gets the default value from the selected objects position. That works for the first object selected but I need help "updating" the value if another object is selected. How is that done?
try(destroydialog channelbox)catch()
rollout channelbox "JS_ChannelBox"
(
spinner xSpin "Translate X" type:#float range:[-1e+008,1e+007,$.pos.x]
spinner ySpin "Translate Y" type:#float range:[-1e+008,1e+007,$.pos.y]
spinner zSpin "Translate Z" type:#float range:[-1e+008,1e+007,$.pos.z]
on xSpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
on ySpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
on zSpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
)
createdialog channelbox width:192 height:318
I've tried to make a numeric transform box that gets the default value from the selected objects position. That works for the first object selected but I need help "updating" the value if another object is selected. How is that done?
try(destroydialog channelbox)catch()
rollout channelbox "JS_ChannelBox"
(
spinner xSpin "Translate X" type:#float range:[-1e+008,1e+007,$.pos.x]
spinner ySpin "Translate Y" type:#float range:[-1e+008,1e+007,$.pos.y]
spinner zSpin "Translate Z" type:#float range:[-1e+008,1e+007,$.pos.z]
on xSpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
on ySpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
on zSpin changed newV do ($.pos = [xSpin.value, ySpin.value, zSpin.value])
)
createdialog channelbox width:192 height:318
