Hello everyone!
In the example below, I have a button that opens the Material/Map Browser dialog and the text of the button takes the name of the texture map(fron Help MaxScript).
The button "Close" destroy the rollout. All ok.
Now, when I reopen the dialog, the mapbutton text is again "None". It is normal because the label of the button is "None" but, how to update a text of a button with the name of the texture map that I have chosen?
I created a script where added the Texture map of a light($.projectorMap), but every time I reopen the panel, the button no longer has the name of the map (see in Advanced Effect of the light).
------------------------------------------------------------------------------------
rollout test "Test Txt"
(
button cr "Create Light"
mapbutton a "None" map:undefined
button b "Close"
on cr pressed do
(
lig=TargetDirectionallight pos:[200,0,0] isSelected:on target:(Targetobject transform:(matrix3 \ [1,0,0] [0,1,0] [0,0,1] [0,0,0]))
)
on a picked texmap do
(
lig.projectorMap = texmap
a.text=classof texmap as string
)
on b pressed do destroydialog test
)
createdialog test
------------------------------------------------------------------------------------
Can someone help me?
Thanks in advance
By Michele71 · 2009-12-20
Anubis · 2009-12-20