ZBrushCentral

Getting started writing ZScript functions

I’d like to write some automated .obj import/export functions, but I don’t really have a clue where to start with learning ZScript. Are there any samples of that kind of functionality as .txt files somewhere?

SamiV.

To learn zscript:

  1. read the posts by David in the script forum
  2. download some zscript and learn from source (my script are with source, almost all)
  3. For import/export i write a small application in Delphi some time ago; basically it allow to select the object and the function to perform (smooth, double side,etc) and then create a script to run within zbrush. Search on main zforum.

cameyo

Sami, you could also record your actions and save the zscript. Then you can see how scripting works and looks compared to your actions, since you will probably need to edit it up a bit anyway.

Hi Sami,

Let me reiterate some of the previous suggestions and add my own to the list:

First, there is the ZScript Command Reference Sheet from Davey. While outdated (version 1.23a I think) it does give some sense of the way in which the still-current commands work.

Inside Zbrush2 itself, you can go press the ZScript:Export Commands button, which will printout a command list.

Also inside ZBrush2 itself, you can go press the ZScript:cmd button which will let you view (in the ZScript window below the canvas) the command set with quite a bit of useful syntax info.

Under the ZScript menu there are buttons (Record and End Record) that let you capture almost all of the interaction with ZBrush, recorded line by line in ZScript commands. Often its useful to learn how to do a specific operation by simply recording it to a .txt file, then examining the resultant code. I’ve personally discovered all kinds of explicit command combinations this way.

Finally, there are many examples of scripting - try a search on ZScript or .TXT. Some names to search on: TVeyes, Cameyo, Davey, Pixolator, Matthew(Aurick), Digits, Ken B, Southern… (maybe other people will add scriptors I’ve left out.)

Plus, there are a number of knowledgable ZScriptors who check in pretty regularly here, so just post a query to the ZScript forum. Questions often provoke interesting discussions :smiley:

Sven

[edit]
Here’s that link to the massive collection of ZScripts on every imaginable topic. When you begin a new scripting project, its somtimes worth it to take a look at what other scriptors have already done…

Sven has missed off Svengali from his list!:smiley:

Also check out the Quicklinks here. Although out of date, many scripts are still available from there.

Marcus