ZBrush 4R4 ZScript Command Reference - updated August 29 2012

The latest version of the ZScript Command Reference is available. This is essential reading for all ZScripters and includes commands new to ZBrush 4R4*.

ZScript is ZBrush’s built-in scripting language. It provides a way to automate common or repetitive tasks as well as add new functionality to ZBrush. It’s the language behind zscript recordings, tutorials, macros and plugins.

Writing zscripts can be both rewarding and fun, and you don’t need any specialist knowledge to get started. All the necessary information is online, with introductory documentation and sample zscripts, as well as the full command reference :

Revised 31 Aug 2012 - I found a couple of minor omissions so have updated both the command reference & zscript example.

Happy ZScripting! :slight_smile:

*The new commands and methods are outlined and demonstrated in the attached zip file. This contains a test zscript for you to explore - with thanks to Pixolator. :slight_smile:

Download zip file here: ZBrush4R4-New-ZScript-Commands.zip (8.49 KB)ZBrush4R4-New-ZScript-Commands.zip (8.49 KB)

Some usedul threads for zscripters:

ZScript Code Samples and Suggested Functionalities

Setting up a Macro to run on Startup


Sorry if I am being a proper newb - But this scripting has caught my interest :smiley:

Only thing that is creating a very hard time to debug the examples are the code that mostly appears between /**/ markers. I can’t seem to find any documentation about this syntax and how it is used and for what etc.

example code from the notInterfaceExample:

I have tried to follow the documentation but all the stuff in /**/ these brackets if I can call them that and also the numbers next to it I can copy but have no idea what is possible.

thanks in advance

//background image - the other buttons are positioned relative to this[NoteIButton,/*text*/,"ZCoffeeData\ZCoffeeBack.jpg" /*image*/,/*pressed?*/,1/*disabled?*/,1/*HPos*/,1 /*VPos*/	,305 /*HSize*/	,320 /*VSize*/	, /*color*/,/*text color*/,0 /*opacity*/, /*text opacity*/,1/*image opacity*/	]

[Loop,5,//draw the selection buttons
[NoteIButton,choiceText(x) /*text*/,/*image*/,choice(x)	/*pressed?*/,/*disabled?*/,hPos /*HPos*/,vPos+((vSize+space)*x) /*VPos*/,hSize /*HSize*/,vSize /*VSize*/, /*color*/,0xffa000/*text color*/,/*opacity*/, /*text opacity*/,/*image opacity*/	]


Hi Doug

I am sure I am going to get in trouble for using the sticky thread as a place to post - So nr1. I am sorry only saw the quite surprisingly big forum just for scripting :bulb:

Secondly - I just realised that it was just a very well /commented/ piece of coding :roll_eyes: - So I do feel like quite an idiot.

I am sure I will start a general thread where hopefully people can answer these very idioteque questions of mine.