PDA

View Full Version : Storing Scripted Materials Rollout RolledUp State?


sl4ppy
01-22-2007, 08:05 PM
I'm having difficulty in storing the rolledUp state of rollouts in a Scripted Custom Material. I'm trying to maintaint the rolledUp state between Max sessions, or even when clicking back and forth between multiple materials.

Storing a boolean in the parameter block that is used during the rollout definition seems not to work as the variable is inaccesible to the rollout at definition time.

I also can't seem to find an event handler that could be used to set the rolledUp state when swapping materials in the material editor..

Anyone have any idea?!

Thanks in advance!

Dmaxer
01-23-2007, 03:31 PM
could you not just store the info in a data file and get your script to read that file on startup ?

sl4ppy
01-23-2007, 03:42 PM
I thought about that briefely originallly, but storing scripted material data in an external data file seems a bit impractical. Not only would it add an additional file to track with asset managment, but having a discreet data file for every custom material in any given scene might be a bit cumbersome.. :(

Here's some sample code that *doesn't* work but conveys what I'm trying to do...

plugin material testMaterial
name:"Test Material"
classID:#(0x10093868, 0xc9e1d78)
extends:Standard replaceUI:true version:1
(
parameters general rollout:generalRollout
(
rollState type:#boolean default:false
)
rollout generalRollout "General" rolledUp:rollstate
(
button test "test"
)
on generalRollout rolledUp theState do rollState = theState
)


This code is invalid because rollState is not accesible to the rollout defenition.

Dmaxer
01-23-2007, 03:52 PM
ah ok Im sorry I could not be more help

sl4ppy
01-25-2007, 04:51 PM
No one has a possible solution for this?? :(

CGTalk Moderation
01-25-2007, 04:51 PM
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.