mrapelje
12-22-2004, 08:01 PM
Alright I have a problem with the script I am working on I would like the state of Radio Button to drop into an action that i latter run. I have tried a bunch of different things now, and nothing seems to work, I think my logic is week and would like some help. Thanks.
Maybe I am going about it the wrong way...
rollout ExportPrep "Export Prep" width:296 height:148
(
radiobuttons rdoXP "X pos" pos:[7,7] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
radiobuttons rdoYP "Y pos" pos:[7,40] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
radiobuttons rdoZP "Z pos" pos:[7,73] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
button btnApEP "Apply" pos:[7,110] width:241 height:32
spinner spnXOs "X Offset" pos:[191,22] width:98 height:16 range:[-10000,10000,0]
spinner spnYOs "Y Offset" pos:[193,55] width:96 height:16 range:[-10000,10000,0]
spinner spnZOs "Z Offset" pos:[193,88] width:96 height:16 range:[-10000,10000,0]
button btnAbout "About" pos:[253,110] width:37 height:32
-- ? Problem Starts here, I think I would like the states to equal min, center, or max?
Xspot = case rdoXP.state of
(
1: min
2: center
3: max
)
Yspot = case rdoYP.state of
(
1: min
2: center
3: max
)
Zspot = case rdoZP.state of
(
1: min
2: center
3: max
)
on btnAbout pressed do
(
resetxform $
collapsestack $
(
for i in selection do (i.pivot = [i.Xspot.x,i.Yspot.y,i.Zspot.z]) -- ? For example I would want the Xpot to represent one of the radio buttons i.e. "max"?
)
$.pos=[0,0,0]
)
on btnAbout pressed do
(
messageBox "Created by Matt Rapelje, www.polyleaf.com (http://www.polyleaf.com/), matt@polyleaf.com"
)
)createDialog ExportPrep
-- Thanks for any help.
Maybe I am going about it the wrong way...
rollout ExportPrep "Export Prep" width:296 height:148
(
radiobuttons rdoXP "X pos" pos:[7,7] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
radiobuttons rdoYP "Y pos" pos:[7,40] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
radiobuttons rdoZP "Z pos" pos:[7,73] width:184 height:30 labels:#("X min", "X mid", "X max") default:1 columns:3
button btnApEP "Apply" pos:[7,110] width:241 height:32
spinner spnXOs "X Offset" pos:[191,22] width:98 height:16 range:[-10000,10000,0]
spinner spnYOs "Y Offset" pos:[193,55] width:96 height:16 range:[-10000,10000,0]
spinner spnZOs "Z Offset" pos:[193,88] width:96 height:16 range:[-10000,10000,0]
button btnAbout "About" pos:[253,110] width:37 height:32
-- ? Problem Starts here, I think I would like the states to equal min, center, or max?
Xspot = case rdoXP.state of
(
1: min
2: center
3: max
)
Yspot = case rdoYP.state of
(
1: min
2: center
3: max
)
Zspot = case rdoZP.state of
(
1: min
2: center
3: max
)
on btnAbout pressed do
(
resetxform $
collapsestack $
(
for i in selection do (i.pivot = [i.Xspot.x,i.Yspot.y,i.Zspot.z]) -- ? For example I would want the Xpot to represent one of the radio buttons i.e. "max"?
)
$.pos=[0,0,0]
)
on btnAbout pressed do
(
messageBox "Created by Matt Rapelje, www.polyleaf.com (http://www.polyleaf.com/), matt@polyleaf.com"
)
)createDialog ExportPrep
-- Thanks for any help.
