ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Submitted by TaylorAnimated on Mon, 2011-10-17 10:03
Is there are way to affect the rolledUp state of a rollout AFTER it has already been added to the subRollout? I would rather not remove and re-add it as this would chance the order in which it is scene in the subRollout.
thanks a lot man.
This saved me from a potential downward spiral of many many hours.
Was very close to go with the remove, re-add with a new state, plus saving all the variables.
Write it in stone: "Subrollouts have an '.open' write-read property that will trigger the rolled-up and rolled-down state."
Yeah, Michael is right that no way to change RolledUp state without removing and readding the rollout.
If only the order of rollouts is what bother you, then #category property is the cure ;) Try this out:
(
rollout Test1 "Test1" category:2(
label lbl1 "Label T1"
on Test1 rolledUp state doif state then print"Rolled Down T1!"elseprint"Rolled Up T1!")
rollout Test2 "Test2" category:3(
label lbl1 "Label T2"
on Test2 rolledUp state doif state then print"Rolled Down T2!"elseprint"Rolled Up T2!")
rollout Main "Main" category:1(
button btnMnT1 "Minimize T1" across:2
button btnMnT2 "Minimize T2"
button btnMxT1 "Maximize T1" across:2
button btnMxT2 "Maximize T2"
on btnMnT1 pressed do(removeRollout Test1; addRollout Test1 nf rolledUp:on)
on btnMnT2 pressed do(removeRollout Test2; addRollout Test2 nf rolledUp:on)
on btnMxT1 pressed do(removeRollout Test1; addRollout Test1 nf rolledUp:off)
on btnMxT2 pressed do(removeRollout Test2; addRollout Test2 nf rolledUp:off))
nf = newRolloutFloater "RFTest"200200
addRollout Main nf
addRollout Test1 nf
addRollout Test2 nf
)
But frankly speaking, i not find this useful at all, because i lost all variables and controls settings on the readded rollouts. So, as i said, if only the order is the issue then you've got the cure.
Cheers!
P.S. Well, to reply more complete s'd say that RolledUp() exist as event, but fired from script only the event is triggered and the actual RolledUp state not changed. Try this out:
(
rollout ro1 "1"(
label lbl1 "Rollout 1"
on ro1 rolledUp state doif state then print"Rolled Down R1!"elseprint"Rolled Up R1!")
rollout ro2 "2"(
label lbl1 "Rollout 2"
on ro2 rolledUp state doif state then print"Rolled Down R2!"elseprint"Rolled Up R2!")
nf = newRolloutFloater "RFTest2"200200
addRollout ro1 nf
addRollout ro2 nf
nf.rollouts[1].rolledUp on -------------
nf.rollouts[2].rolledUp off -------------)
The last 2 calls trigger RolledUp events but not change the state. So the method is there but it's broken (or unfinished exposed).
Yeah there is a property which allows you to adjust the state in which the subrollout is rolled up or rolled open.
Just check the help file for subrollout.
You are thinking of addSubRollout [rolledUp:] I know about this but it would force me to remove and re-add the rollout to the subRollout any time I wanted it to simply be rolled up, this would also change the position of it with others in the subRollout. I'm looking for a solution that allows me to simply roll it up or down if something in a list box is picked.
Comments
The Answer
So a fellow student figured it out, the property I was looking for is .open not .rolledup
www.TaylorAnimated.com
Holy...
thanks a lot man.
This saved me from a potential downward spiral of many many hours.
Was very close to go with the remove, re-add with a new state, plus saving all the variables.
Write it in stone: "Subrollouts have an '.open' write-read property that will trigger the rolled-up and rolled-down state."
Hmm....
this is a different story then.
my recent MAXScripts RSS (archive here)
bad news...
Yeah, Michael is right that no way to change RolledUp state without removing and readding the rollout.
If only the order of rollouts is what bother you, then #category property is the cure ;) Try this out:
But frankly speaking, i not find this useful at all, because i lost all variables and controls settings on the readded rollouts. So, as i said, if only the order is the issue then you've got the cure.
Cheers!
P.S. Well, to reply more complete s'd say that RolledUp() exist as event, but fired from script only the event is triggered and the actual RolledUp state not changed. Try this out:
The last 2 calls trigger RolledUp events but not change the state. So the method is there but it's broken (or unfinished exposed).
my recent MAXScripts RSS (archive here)
Yeah
Yeah there is a property which allows you to adjust the state in which the subrollout is rolled up or rolled open.
Just check the help file for subrollout.
John Martini
Digital Artist
http://www.JokerMartini.com (new site)
You are thinking of
You are thinking of addSubRollout [rolledUp:] I know about this but it would force me to remove and re-add the rollout to the subRollout any time I wanted it to simply be rolled up, this would also change the position of it with others in the subRollout. I'm looking for a solution that allows me to simply roll it up or down if something in a list box is picked.
www.TaylorAnimated.com