ZBrushCentral

Looping command help

I’m trying to write a a script where it would fill all the subtools with their own polygroup color…
here is what I have so far… the problem I have is that I do not know to to keep it looping down the subtool automatically.

Thanks guys!

//ZBRUSH MACRO - Recorded in ZBrush version 4.6
[IButton,???,“Press to run this macro. Macros can be aborted by pressing the ëescí key.”,
[IShowActions,0]
[IConfig,4.6]
[IPress,Tool:Polypaint:Polypaint From Polygroups]
[IPress,Tool:SubTool:SelectDown]
]

You probably can lose the line select down. http://www.zbrushcentral.com/showthread.php?172391-Useful-small-ZScripts-and-Macros-for-ZBrush-4R6&p=1051377&viewfull=1#post1051377

Thank you very much!

I’m probably being stupid here, but I really don’t understand how the [IConfig command would do the loop.

I read the other post http://www.zbrushcentral.com/showthread.php?172391 but posted here I think it’s more appropriate.

I someone can explain, Thanks !!!

Your commands (the macro) are repeated for each of the subtools in order. Without the config line, it (your macro) will probably fail.