PDA

View Full Version : Accessing rollout spinner.value


gdimmrt
08-27-2003, 09:28 PM
I'm new to maxscript and for some reason i can't access a rollout's spinner.value outside of the rollout(). It saids it's undefined. here a sample:

when transform $ change do
(
spnx.value = $.pos.x
)
rollout Gene "Select and Move"
(
label lbl1 "Transform" align:#center

spinner spnx "X:" range:[-1000,1000,0] width:65 align:#left across:3
spinner spny "Y:" range:[-1000,1000,0] width:65 align:#center
spinner spnz "Z:" range:[-1000,1000,0] width:65 align:#right
on spnx changed valx do
(
spnx.value = valx
$.pos.x = valx
)
on spny changed valy do
(
spny.value = valy
$.pos.y = valy
)
on spnz changed valz do
(
spnz.value = valz
$.pos.z = valz
)
)
dele = newrolloutfloater "Transform" 250 100
addrollout gene dele

I can't change spnx.value when trasform changes. what am i doing wrong? or is this not the right way? plz explain.

Reality3D
08-28-2003, 02:57 AM
You must reference the rollout of the control

The script changed would be

rollout Gene "Select and Move"
(
label lbl1 "Transform" align:#center

spinner spnx "X:" range:[-1000,1000,0] width:65 align:#left across:3
spinner spny "Y:" range:[-1000,1000,0] width:65 align:#center
spinner spnz "Z:" range:[-1000,1000,0] width:65 align:#right
on spnx changed valx do
(
spnx.value = valx
$.pos.x = valx
)
on spny changed valy do
(
spny.value = valy
$.pos.y = valy
)
on spnz changed valz do
(
spnz.value = valz
$.pos.z = valz
)
)
dele = newrolloutfloater "Transform" 250 100
addrollout gene dele

when transform $ change do
(
Gene.spnx.value=$.pos.x
)

gdimmrt
08-28-2003, 07:21 AM
Ah... :applause:
You learn somin' everyday.

CGTalk Moderation
01-16-2006, 12: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.