ZBrushCentral

How do I properly check for Polypaint in 2019?

First post in the shiny new forum yay!

I am looking for a solution to check/modify the Polypaint visibility state (Brush Icon) within the new 2019 syntax.
I struggled the past few weeks and can not come up with a solution that works 99% of the time and/or is not a performance disaster.
If I am not mistaken [SubtoolGetStatus] does not offer information about Polypaint, which I think is a missed opportunity, as [IModGet] still needs to be used for that.
[IModGet] is problematic to use though, as it causes issues with name duplicates, which is why I previously checked the topmost Subtool position instead, rather then against the path of the Subtool’s name.

For this I used:
[ISet,Tool:Sub Tool:SubTool ScrollBar,0,[SubToolGetCount]-[SubToolGetActiveIndex]-1]
which worked great before.
With the introduction of the folder system though, [SubToolGetActiveIndex] is not a reliable source to learn about a Subtool’s position within the list anymore. This is because folders don’t affect the index, yet they occupy a spot in the list (I assume to offer the option to disable/hide the folder system).
[The fact that folders don’t have a path I can [IClick], is a topic for another time…]

I really hope someone can enlighten me with a cool new way to check for Polypaint :/…

Hi Florian,

You can use the Colorize button which mirrors the state of the paintbrush icon. So you can just loop through the subtools like this:

[IButton,CheckPolypaint,"Check subtools for polypaint", [VarSet,activST,[SubToolGetActiveIndex]]//store active subtool [Loop,[SubToolGetCount], [SubToolSelect,n] [If,[IGet,Tool:Polypaint:Colorize], [Note,[StrMerge,"SubTool ",[Val,n]," has Polypaint ON"],,1] ,//else [Note,[StrMerge,"SubTool ",[Val,n]," has Polypaint OFF"],,1] ] ,n] [SubToolSelect,activST]//reselect active subtool ]//end button

HTH,
Marcus

1 Like

Awesome this is everything I could hope for. Thanks a lot Marcus, this definitely helped!