ZBrushCentral

How do i start Zscripting.

hello There

Can anyone put me in the right track for ZScripting.
I know mel and some python, so i am not really new to coding, but how do i go about writing for ZBrush,


  • Where are the Zbrush commands.
  • Where do i run them.
  • How do i save them.
  • What langauge is it.

These are just few of hundred questions are in my head.

Any help i will highly appreciated it
Julian

…read the Sticky
And the list of Commands Reference
You have also the Chapter 6 of the ZB Wiki :+1:
Bon courage! :sunglasses:

Pilou’s two suggestions (and links) are a great start = The Commands Reference and Chapt 6 of the ZB Wiki.

Here are a few more things any starting ZScripter might find useful.

  1. More details on ZScript syntax can be found inside ZBrush, itself, by pressing the Cmd button in the ZScript palette, then scrolling the alphabetized listing in the ZScript window at the bottom of the screen.

  2. A ZBCentral advanced search using the keywords ZScript Source will turn up dozens of interesting threaded discussions on ZScript topics. Mixed in with these you’ll find more than a few shared .txt files listing source code. Many are worth downloading and studying in detail.

  3. Remember too that the ZScript generator can show you how each and every button in the ZBrush interface does what it does. Many ZScripters have resolved questions of syntax by simply pressing ZScript>Record, entering a sequence of button presses and mouse clicks, then pressing ZScript>End Rec, and examining the text that was generated.

  4. ZScript also helps you debug you code by halting the script and displaying the color-coded syntax text of your script. Many times you can pinpoint the syntax problem by scrolling to the where the listing turns black. Combine that with the error message. (Be aware though, that at times a mistake in bracket pairs will conspire to point to false debug information.)

Lastly, other ZScripters stop in regularly (Marcus and TVeyes being the most generous and helpful ones in the bunch) and willingly take time to answer basic scripting questions.

Good luck and welcome to the club.

Sven

Hi Julian,

Good to hear that you are interested in zscripting. :slight_smile:

Just to add to Frenchy’s and Svengali’s excellent suggestions:

ZScripts are written in the zscript language which you save as a text (.txt) file and then load in ZBrush from the ZScript>Load button. This method applies to any zscript - a zscript recording or a zscript or plugin that is to be distributed for use by others. Loading a zscript in ZBrush effectively compiles it and the compiled file (with .zsc extension) is automatically saved at the same location as the source .txt file. You would distibute the compiled zscript file if you didn’t wish to share your code: it can also be loaded using ZScript>Load or, when coded appropriately for a plugin and placed in the right ZBrush folder, will load automatically when ZBrush starts providing extra functionality on the UI.

HTH,

WOW you guys ROCK :smiley:

Thank you, i think for now i have enough info to get me start it. :slight_smile:
Should i assum there are no that many tutorials, PDFs, DVDs or books about the subject right?!


You just have to love the years we all live in, Be able to get amazing help from France, NYC and UK all over night.

Once again Thaxxx’s

…DVDs or books about right?!
Yes :wink:
It’s not an easy and quicky way to code :rolleyes:
And scropting is a very small dealing!

And it should be mentioned that ZScript is made the way it is to accomodate the Artist with an urge for automation. Not for the engineer who looks at it in utter dissbelief… :wink:

Lemo

PS: Please do NOT put another anachronistic 1960’isch scripting language into ZBrush… Not another Pyphpsqlmessedupcplusplus weirdo shadow of a state of the art real scripting language as RUBY! What’s next? Fortranscript? :wink:

Can someone explain the difference between a zscript saved as a txt vs zsc?

The .zsc is simply a compiled version of the txt file. You don’t actually save a zscript as a .zsc: it is created automatically by ZBrush when you load the text file using the ZScript>Load button.

The .zsc is useful in a number of ways. If you wish to distribute a zscript or plugin it provides a way of protecting your original code. It will run slightly faster and, as long as the relevant plugin code is included and the .zsc is in the right ZBrush folder, it will load automatically on start up.