ZBrushCentral

Question: SubToolSetActiveIndex

I was wondering if there was any way to not “get” but “set” active index of a subtool.

I know if you want the index to be 10 for example. You could just loop a move-down command until it reaches the desired index. But this results in more code. And it’s a pain with folders. Is there a more accurate way of setting the index of a subtool?

the dream would be that [SubToolSetActiveIndex] existed. So asking for the next best thing :slight_smile:

Maybe it’s what you’re searching for :

[SubToolSelect,Subtool Index (zero based).]
Selects the specified subtool index
Output: Returns zero if OK, -1 if error.

Nopes but that one is great tho. I already have a subtool selected. let’s say at index 5. And I want it to move to index 18. The only way I can think of doing it. Is looping the move down let’s 100 times. And breaking the loop if the index is 18. But this is quite a lot of code for something that simple. And becomes complicated once you have folders that are open and closed. As the move down would just move it all the way down passing the closed folder. never putting the subtool at index 18 then. Ofc you can open folders through code. But like I said. It’s quickly becoming complicated and a lot of code then. For something that seems so basic