RolledUp outside of AddSubRollout

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.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
TaylorAnimated's picture

The Answer

So a fellow student figured it out, the property I was looking for is .open not .rolledup

 

amartinez1660's picture

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."

Anubis's picture

Hmm....

this is a different story then.

my recent MAXScripts RSS (archive here)

Anubis's picture

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:

(
	rollout Test1 "Test1" category:2
	(
		label lbl1 "Label T1"
		on Test1 rolledUp state do
			if state then print "Rolled Down T1!" else print "Rolled Up T1!"
	)
	rollout Test2 "Test2" category:3
	(
		label lbl1 "Label T2"
		on Test2 rolledUp state do
			if state then print "Rolled Down T2!" else print "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" 200 200
	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 do
			if state then print "Rolled Down R1!" else print "Rolled Up R1!"
	)
	rollout ro2 "2"
	(
		label lbl1 "Rollout 2"
		on ro2 rolledUp state do
			if state then print "Rolled Down R2!" else print "Rolled Up R2!"
	)
	nf = newRolloutFloater "RFTest2" 200 200
	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).

my recent MAXScripts RSS (archive here)

JokerMartini's picture

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)

TaylorAnimated's picture

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.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.