Setting up a macro to run on startup

It is straightforward to get ZBrush to start the way you want. All you need to do is record a startup macro. You can then edit the DefaultZScript to automatically play the macro when ZBrush launches.

First you need to record your macro:

  1. Before you start recording, make sure to initialize ZBrush by pressing the Init ZBrush button at the top of the Preferences palette. This makes sure ZBrush is cleared of any custom tools and so on which might mean your startup macro doesn’t run correctly.

  2. Press the New Macro button in the Macro palette. When you get the message about initializing ZBrush click Yes. This ensures that your macro will run correctly.

  3. Now set up ZBrush how you want. When you’re done press Macro>End Macro. Save the macro to the ZStartup\Macros\Misc folder and call the file StartupMacro.txt.

You should now have a new button called StartupMacro in the Misc submenu of the Macro palette. If it’s not there press the Reload All Macros button and it should appear.

It’s a good idea to test your macro to see that it runs correctly. Initialize ZBrush first, so that you’re starting from the default state, then press the button.

Changing the DefaultZScript:

Once you have your startup macro recorded you need to edit the DefaultZScript so that your macro is run automatically on startup. If you’ve followed my instructions exactly you can simply copy the attached file:

1.In the ZBrush 3.5 R3/ZScripts folder you’ll find a file called DefaultZScript.txt. Rename this DefaultZScript_bak.txt. This is so that you can restore the original start up if you want.

2.Put the attached DefaultZScript.txt in the ZBrush 3.5 R3/ZScripts folder.

  1. Restart ZBrush.

More detail - for those interested

All this edited DefaultZScript is doing is executing a bit of code that presses the macro button. It’s important that the code is correct and the macro button is actually there or the code will fail. If you get an error message saying that the interface item can’t be found then you’ll know you’ve made a mistake somewhere.

The full (revised) DefaultZScript code is below. The important bit is the IPress command. (It’s wrapped in an If statement because it is not a top level command and so can’t exist on its own.)


The code after IPress, is the button path. You can find this for any ZBrush button by holding Ctrl while the cursor is over the button. The button path will be shown at the bottom of the pop-up window.DefaultZScript.txt (65 Bytes)


thanks, i knew there was a easy way to set this up.

Sorry for digging up this old thread…
Is there any way to start ZB with the star shape instead of the sphere?

Record a macro which load the star (PolyMesh3D) and load this Macro like explain above.

Thank you, it’s working now :smiley: :smiley:

I m also using it yups its working fine when i use it first time. Thanks for sharing this useful and helping information. :-1:small_orange_diamond:+1:small_orange_diamond:-1:

is this still valid for zbrush 4r4?

Yes, it should work OK.

thanks, seems to work :slight_smile:


I have a startup macro that loads a default Dynawax Zproject. I first initialized Zbrush -> ‘New Macro’ -> (Init again) -> load my ZProject -> Choose a MatCap -> ‘End Macro’ -> Save “StartupMacro.txt”.

Everytime when I startup ZB4r4 I get this dialog box (see attached jpg). Is there a way to disable this message on startup, or should I record my startup macro some other way? Also, I would like to turn of the Spotlight menu on startup. Is that possible?


/ Tennet


Can you post the whole macro so I can take a look (just attach the text file to the post)? It might need editing.

Provided you have the latest version of ZBrush 4R4 (P2) then you can turn off Lightbox showing at startup. Simply turn off Preferences>Lightbox>Open At Launch and then save the configuration (Shift+Ctrl+i).

Do you have ZB 4R4 P2?

Yes, I am using 4R4 P2, so Lightbox has now been disabled on startup. Thanks!

Attached is my StartupMacro.txt. Hope it is possible to get rid of the “save changes dialog” on startup also. Thanks again.

StartupMacro.TXT (302 Bytes)StartupMacro.TXT (302 Bytes)

Thanks. This seems to be an issue with the default zscript, not the macro. The default zscript is running twice for some reason. To stop it, open the ZBrush 4R4/ZScripts/DefaultZScript.txt file in a text editor and replace the contents with this code:


Let me know if this does the trick.

Thanks Marcus,

Your code did the trick. I just had to edit the line “[IPress,Macro:Macros:Misc:StartupTest]” with the name of my macro “StartupMacro”. Now it works, no more startup dialogs. Thanks again!

/ Frederik

Oops, forgot to change that! Anyway, I’m glad you got it working. :slight_smile:

I might be late, but I have a startup macro supposed to set up brush preferences (like changing the default intensity, setting up a material, etc.) When I start ZBrush, it looks like that some action doesn’t happen (like alpha set to 28, etc. . So each time I had to run the macro manually, and then it’s OK. I duplicated the lines in the startupcode, and it seems that now it’s a bit more precise…
It is also a common issue, that the standard brush is adjusted, though I don’t tough it in my script.

Any help?StartUpMacro.TXT (919 Bytes)

Hi Jester,
Apologies for the delay in replying. I think part of the problem is that when ZBrush launches it does not have a mesh in Edit mode. This causes problems with the way the brush options are set. I experimented writing a macro that avoids this issue but it still didn’t set the brushes correctly.

What I suggest you do is to adjust your brushes how you want and then re-save them to the ZBrush 4R5\ZData\BrushPresets\ folder. Save them with their original names (ZBrush will automatically add a 1 to the end, so take this off) but make sure you back up the originals, or the whole BrushPresets folder, to another location before you start. That way you can restore the folder to its ‘factory’ state if you need to.

Your startup macro will then only need to set the material, Wax Preview and turn off Spotlight Projection. I have edited the macro for you and attach to this post.

A further note: I have not set the macro to select the ClayTubes brush as the default brush (instead of the Standard brush). The reason is that it will lose its alpha if it is selected when there is no model in edit mode.

StartUpMacro.TXT (403 Bytes)

HTH,StartUpMacro.TXT (403 Bytes)

Thanks Marcus, awesome explanation! I’ll check immediately!

So - I posted this in the ZScripting forum a few days back and didn’t get a reply - I figured I’d post it here as it isn’t really a ZScripting problem as such anyway and somebody might be able to help out.

I’ve been trying to setup a Startup Macro on my new work computer to define the startup material, brushes and brush settings but am having a bit of a problem in that it seems that a portion of the macro runs twice upon starting ZBrush. The startup macro does work and sets everything as I want but it runs through drawing the 3D object and then defining the brushes from there twice.

The Startup macro looks like this:

//ZBRUSH MACRO - Recorded in ZBrush version 4.5
[IButton,???,"Press to run this macro. Macros can be aborted by pressing the ëescí key.",
[IPress,Material:MatCap Red Wax]
[IPress,Transform: Edit]
[IPress,Alpha:Alpha Off]
[IPress,Alpha:Alpha 01]
[IKeyPress,SHIFT,[IPress,Alpha:Alpha Off]]
[IKeyPress,SHIFT,[IPress,Alpha:Alpha 01]]
[ISet,Draw:Focal Shift,0]
[IPress,Document:New Document]

I read that changing the brush settings and then saving over the default brush would get around me having to define them in a startup macro but every time I try and save over a default brush, ZBrush crashes on startup.

Anybody have any ideas what is going wrong or how to remedy this?