ZBrushCentral

layers and subtools selection

Hey guys

how to select layers or subtool one by one if you don’t know their name ?

I have tried witt their window ID but it doesn’T work…

Thx for your suggestions !

There are 8 layer buttons and they are always called “3D Layer 0” to “3D Layer 7” no matter how many layers you have.

The secondary value of the Layers Scrollbar is the position of the scrollbar which can be used to control which layer is at the “3D Layer 0” position.

You can determine how many layers there are by setting the secondary value of the Layers Scrollbar to a high value. ZBrush will adjust to the max secondary value, which happens to be equal to the amount of layers. Note: the value is 0 based.

Example of getting the actual name of all layers in the current subtool:


 [VarDef, LName(64), ""] // the max amount of layers is 64
 [VarSet, LCount, 0] // layers count
 
 // get layers count
 [Iset, "Tool:layers:Layers scrollbar", 0, 255] //sets layer view to the top most layer (not selected layer, just the view)
 [VarSet, LCount, [Igetsecondary, "Tool:layers:Layers scrollbar"]]
 
 [Loop, lCount+1,
 
 	[Iset, "Tool:layers:Layers scrollbar", 0, LCount - j]
 	[VarSet, LName(j), [IGetTitle, "Tool:Layers:3d layer 0", 0]]
 
 , j ]

Manipulating the Subtool buttons is very similar. The subtool buttons are always called “Subtool 0” to “Subtool 7”. An easy way to get the subtool count is to [IGet, 5570] which is Preferences > Misc > Subtools Count.

Hope that helps.

Thx for the answer !

I gonna try this monday at work and if I have have more question I gonna ask :wink:

thx again !

Hey !

sorry to reopen this post, but i noticed that when i use the [IGet, 5570], it always returns 0.

is there something specific to add ?

That doesn’t work for me either. :slight_smile:

Try this:


[VarDef,subtools,0]	
[VarSet,subtools,[StrExtract,[IGetTitle, 5570],11,255]]

lol nice solution :wink:

Thank you very much!