ZBrushCentral

Subtool Visibility

What is the command to change a Particular Subtools Visibility, basically turn it on or off for different renders. Also trying to find a way to save out some generated textures in the Texture Panel to a User Defined destination.

Thanks in Advance.

You can use [SubToolSelect, #index] to select the subtool, then use the relevant bit of code below:

[IButton,“Turn off”,“Turn OFF the selected subtool”,
[VarSet,subToolPath,[StrMerge,“Tool:Sub Tool:”,[IGetTitle,Tool:Current Tool,0]]]
[If,[IModGet,[Var,subToolPath]]>=16,

[IClick,subToolPath]

]
]

[IButton,“Turn on”,“Turn ON the selected subtool”,
[VarSet,subToolPath,[StrMerge,“Tool:Sub Tool:”,[IGetTitle,Tool:Current Tool,0]]]
[If,[IModGet,[Var,subToolPath]]<16,

[IClick,subToolPath]

]
]

For exporting a texture map from the Tool palette, use [IPress,Tool:Texture Map:Clone Txtr] to put a copy in the Texture palette, make sure that the copy is selected - it should be automatically - then use [FileNameSetNext,#pathToFile] and [IPress,Texture:Export].

1 Like

Thanks for the Quick Response Marcus. Guess I need to be more clear, on the Subtool Visibility, I don’t need a interface or button, just the action itself of turning that particular Subtool on and off during certain renders I have in my script. I know how to select it but the code to turn it on or off is a mystery to me.

On the Exporting of the Textures, how do I have the user of the Script tell the script where to send the Textures that were generated. Like in Multi Map Exporter where it asks for a destination on their Hard Drive. Already got the Textures Cloned and Named correctly in the Texture Panel with the current script, but now want it to save it to the user specified destination.

Thanks Again Your Always a Big Help

You’ve looked here?>> http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/command-reference/#Tools_and_SubTools

Glenn,

The code you need is inside those buttons, I just used buttons so you could test the code easily.

For allowing the user to chose a file name you need [FileNameAsk], which you can read about here:
http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/command-reference/#Files_and_Filenames

And for other stuff about ZScripting here:
http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/

HTH,

Thank you Marcus.