1. #1
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,687

    Default 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.

    3. 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.)

    [CODE][If,1,
    [IPress,Macro:Macros:Misc:StartupMacro]
    ]
    [pd][/CODE]

    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.
    Attached Files Attached Files

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Jun 2003
    Posts
    2,466

    Default

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

  3. #3
    Member Follow User Gallery
    Join Date
    Dec 2007
    Posts
    73

    Default

    Sorry for digging up this old thread...
    Is there any way to start ZB with the star shape instead of the sphere?
    My system specs: Win 7 Professional 64bit, Quad Core Intel i7 3930K @ 3,20GHz, 16GB RAM, NVIDIA GeForce GTX650, ZBrush 4R6

  4. #4
    Pixologic Follow User Gallery
    Join Date
    Apr 2004
    Location
    Bordeaux, France
    Age
    38
    Posts
    1,071

    Default

    Record a macro which load the star (PolyMesh3D) and load this Macro like explain above.
    Pixologic official: Blog | Twitter | Facebook | Google+ | Pinterest | tumblr
    __________________________________________________ __________________________________
    My personal 3D - 3D Printing blog: polysculpt.com

  5. #5
    Member Follow User Gallery
    Join Date
    Dec 2007
    Posts
    73

    Default

    Thank you, it's working now
    My system specs: Win 7 Professional 64bit, Quad Core Intel i7 3930K @ 3,20GHz, 16GB RAM, NVIDIA GeForce GTX650, ZBrush 4R6

  6. #6
    New Member Follow User Gallery
    Join Date
    Jun 2010
    Posts
    2

    Default

    I m also using it yups its working fine when i use it first time. Thanks for sharing this useful and helping information.
    Rose.....

  7. #7
    Senior Member Follow User Gallery
    Join Date
    Apr 2006
    Location
    Vienna
    Age
    40
    Posts
    281

    Default

    is this still valid for zbrush 4r4?

  8. #8
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,687

    Default

    Quote Originally Posted by MichaelMaehring View Post
    is this still valid for zbrush 4r4?
    Yes, it should work OK.

  9. #9
    Senior Member Follow User Gallery
    Join Date
    Apr 2006
    Location
    Vienna
    Age
    40
    Posts
    281

    Default

    thanks, seems to work

  10. #10
    Senior Member Follow User Gallery
    Join Date
    May 2008
    Location
    Stockholm, Sweden
    Age
    36
    Posts
    156

    Default

    Hi,

    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?

    Thanks!

    / Tennet

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	zb_4r4_startup_02.jpg 
Views:	77 
Size:	56.1 KB 
ID:	334756  

  11. #11
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,687

    Default

    Quote Originally Posted by tennet View Post
    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?
    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).

  12. #12

  13. #13
    Senior Member Follow User Gallery
    Join Date
    May 2008
    Location
    Stockholm, Sweden
    Age
    36
    Posts
    156

    Default

    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

  14. #14
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    8,687

    Default

    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:

    [CODE]
    //startup
    [If,[MemGetSize,startup_mem],,
    [MVarDef,startup_mem,1,0]
    [IPress,Macro:Macros:Misc:StartupTest]
    ]
    [pd][/CODE]

    Let me know if this does the trick.

  15. #15
    Senior Member Follow User Gallery
    Join Date
    May 2008
    Location
    Stockholm, Sweden
    Age
    36
    Posts
    156

    Default

    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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •