ZBrushCentral

Zscript format

Quick question about Zscripting for the recently inclined:

Does a Zscript always have to take the form of a script which is activated by a UI button (referenced in the script)?
Or is there a way to load & execute a Zscript in one go?

Cheers

Many zscript commands have to be wrapped inside another command otherwise ZBrush won’t run the zscript and will report an error. The standard way is to use a button but if you simply want to run a batch of commands as soon as you load the script then you can use an [If] statement to contain them :

[If,1,
//commands here
]

In the code above, ‘1’ is always true so any commands inside the statement will run when the script is loaded.