PDA

View Full Version : Push all object layers to foreground



BlueApple
07-24-2008, 08:54 AM
Is there a way to retrieve the layer numbers of all layers containing object data? I can get the quantity of layers, but a lot of the objects I am dealing with have empty layers inbetween data layers.

I am trying to push all object layers containing data into the foreground, basically clicking the "F" in the Layers window. The way that I am going about it is pretty in-elegant and likely bloated.

Red_Oddity
07-24-2008, 09:06 AM
save this code as AllFGLayers.ls and bind to a key, done.



@version 2.1
@script modeler
@name All FG Layers

@warnings

main
{
allLayers = lyrdata();
lyrsetfg(allLayers);
}

Red_Oddity
07-24-2008, 09:21 AM
not sure you wanted this as a complete shortcut .ls file, but the function that returns an array with all layers containing data is lyrdata() .

BlueApple
07-24-2008, 09:31 AM
lyrdata is what I was looking for, but I am happy to get as much help as folks are willing to offer. :)

Thanks Oddity.

Red_Oddity
07-24-2008, 10:25 AM
no problem, always nice to see folks working on LW pipelines.