PDA

View Full Version : layers and subtools selection



cgvinny
02-06-10, 07:15 PM
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 !

TVeyes
02-06-10, 10:01 PM
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.

cgvinny
02-07-10, 08:14 AM
Thx for the answer !

I gonna try this monday at work and if I have have more question I gonna ask ;-)

thx again !

cgvinny
06-04-10, 12:12 PM
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 ?

marcus_civis
06-04-10, 12:46 PM
That doesn't work for me either. :)

Try this:



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

cgvinny
06-04-10, 03:14 PM
lol nice solution ;-)

comtist1
07-17-11, 01:51 AM
Thank you very much!