Expand the Active Layer in the Layer Manager

I'm trying to expand the Active Layer in my Layer Manager.
But I cannot for the life of me figure out the correct approach to doing this.

There is an ExpandSelected function in the Scene Explorer Manager, but there doesn't seem to be a way to actually select a layer. There is a .select function in the LayerManager, but this selects all the nodes in the layer.

Does anyone know how to do this?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

(	
	sceneExplorer = SceneExplorerManager.GetActiveExplorer()
	if sceneExplorer != undefined do
	(
		for i = 0 to layermanager.count - 1 where (layer = layerManager.getLayer i).current == true do
		(
			layer.select true
			sceneExplorer.ExpandSelected()
		)
	)
)
Linkitch's picture

Sadly this doesn't work.

Sadly this doesn't work. Using layer.select true selects all the nodes inside of the layer, not the layer itself.

miauu's picture

.

It works. Check if you have the "Select Children" and uncheck it.
If the "Select Children" is checked you will not be able to rename a layer by doubleclicking its name.

https://drive.google.com/file/d/1db3ZZWQKwPZcLOd1OAZRoCKawybb90oo/view?u...

Linkitch's picture

I don't have "Select

I don't have "Select Children" enabled.

And I sadly cannot get it to do anything other than select all the nodes inside the layer.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.