[Closed] How to Generate Labels based on Layers
Hi
Wow what a place! Awestruck…My name is Vijay and I am from India.
I am an experienced Maya user new to max. I need help with maxscript.
I want to create a row of labels or spinners based on the number of layers. How do I go about it…
I tried the following but I got errors
rollout customLayerRenderUI "Untitled" width:162 height:300
(
totalLayers = LayerManager.count - 1
layerNames = (for i = 0 to totalLayers collect (LayerManager.getLayer i).name)
for each in layerNames do
(
label each width:75 height:40
)
)
Hi,
Rollout elements are create at compile time, so you can’t add them dynamically the way you tried. Take a look at the “RolloutCreator Functions” topic in the the maxscript help, it explains how to use this struct to easily do what you’re trying to do, and has some examples.
hOpe this helps,
o
Thanks mate…That helped…I am able to add the UI elements dynamically now but I am unable to add events to them if created with RolloutCreator.
Any idea?
Thanks mate…That helped…
But once I use RollourCeator I am unable to add veents to my UI elements…
Any idea?
Thanks mate…I got that part…Now to add events…
Edit:
oops…there is an addhandler function…silly me…
ok will get back with more Q