View Full Version : Rollout problem

05 May 2008, 05:19 AM
Hi all, i am new to max sctipt. I just started to code in max script but i don't know much how it behave. Here is the small part of code from my maxscript

EntityCutSceneDataDef = attributes "CutSceneData" version:1 attribid:#(0x7eb9efa9, 0x636b918)
--cutscene data
parameters main rollout:params
CutSceneName type:#string ui:UICutSceneName
ShowCutSceneMarker type:#boolean ui:UIShowCutSceneMarker default:false

Destination0 type:#string ui:UIDestination0 default: "target="
Destination1 type:#string ui:UIDestination1 default: "target="
Destination2 type:#string ui:UIDestination2 default: "target="
Destination3 type:#string ui:UIDestination3 default: "target="
Destination4 type:#string ui:UIDestination4 default: "target="

Entity0 type:#string ui:UIEntity0 default: "move="
Entity1 type:#string ui:UIEntity1 default: "move="
Entity2 type:#string ui:UIEntity2 default: "move="
Entity3 type:#string ui:UIEntity3 default: "move="
Entity4 type:#string ui:UIEntity4 default: "move="

Message0 type:#string ui:UINotify0 default: "msg="
Message1 type:#string ui:UINotify1 default: "msg="
Message2 type:#string ui:UINotify2 default: "msg="
Message3 type:#string ui:UINotify3 default: "msg="
Message4 type:#string ui:UINotify4 default: "msg="

Commands type:#integer ui:UICommandList default: 1

rollout params "CutScene Parameters"
checkbox UIShowCutSceneMarker "ShowCutSceneMarker"
edittext UICutSceneName "CutSceneName"

dropdownlist UICommandList "Commands" items:#( "none", "move", "kill", "notify" )

edittext uiEntity0 "Entity0 " height:15
edittext UIDestination0 "Destination0" height:15
edittext UIEntity1 "Entity1 " height:15
edittext UIDestination1 "Destination1" height:15
edittext UIEntity2 "Entity2 " height:15
edittext UIDestination2 "Destination2" height:15
edittext UIEntity3 "Entity3 " height:15
edittext UIDestination3 "Destination3" height:15
edittext UIEntity4 "Entity4 " height:15
edittext UIDestination4 "Destination4" height:15

edittext UINotify0 "Message0 " align:#left height:15
edittext UINotify1 "Message1 " align:#left height:15
edittext UINotify2 "Message2 " align:#left height:15
edittext UINotify3 "Message3 " align:#left height:15
edittext UINotify4 "Message4 " align:#left height:15

when i apply this script to object all the editboxes are visible.
Now i wanted the edit box should be visible as the command is selected i have written the function so edit boxes visible as per the command. but when i deselect the object and select again same all the editboxes are visible again.
How i can access this UI control outside this rollout so i can set there visiablity as the command is selected.

05 May 2008, 09:09 AM

wish I could help you , but I dont think I understood the problem well.
Am not sure I understand what you mean by "edit boxes visible as per the command"
By "visible", do you mean enable/disable, and do you want to store the state of the UI element even after the object is deselected?

If so, then you need to add a parameter (say a type:#boolean ) which you should use to store the state of the UI element when it gets changed by your "Commands" event handler. And this variable should be then used to control the state of the UI element within the rollout. You do have a parameter by the name of ShowCutSceneMarker. This itself can be used for the job I mentioned.

If you post the event handler functions for the ddl, someone could offer better help.


05 May 2008, 01:45 PM
I think he's trying to figure out how to access a customAttribute block's rollout so that he can enable/disable controls from outside of the CA block itself.

should do the trick.


05 May 2008, 09:00 AM
Thanks every one. I solve my problem, i used rollout event handler and it work fine. So thanks.
Can i create edit boxes or any UI control dynamically.
e.g in a dropdown list box there are four options and edit boxes/UI controls should appear as per selection in list box.

CGTalk Moderation
05 May 2008, 09: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.