PDA

View Full Version : Current Layer


ramesh03
01-07-2008, 04:38 AM
Hi,

i am new to Max-Scripting i wrote this, whts wrong here.i want to select first layer after that second and so on.... it showing error.

totalLayers = LayerManager.count - 1
for i = 0 to totalLayers do
(
layerNames = format "%\n" (LayerManager.getLayer i).name
for each in layerNames do
(
layer = LayerManager.getLayerFromName each
layer.current = true
)
)


Thanks.

Zbuffer
01-07-2008, 05:37 PM
Hi, need to build the layernames array, then access it.


totalLayers = LayerManager.count - 1
layernames = (for i = 0 to totalLayers collect (LayerManager.getLayer i).name)

for each in layerNames do
(
layer = LayerManager.getLayerFromName each
layer.current = true
)

ramesh03
01-08-2008, 03:57 AM
Thanks Mr.zbuffer.

CGTalk Moderation
01-08-2008, 03:57 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.