ZBrushCentral

Startup Macro Help

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.",
[IShowActions,0]
[IConfig,4.5]
[IPress,Material:MatCap Red Wax]
[IPress,Material:Skin]
[IPress,Tool:PolyMesh3D]
[CanvasStroke,(ZObjStrokeV02n74=H2CDV21CH2CDV21BH2CEV21CH2CFV21FH2D0V222H2D2V229H2D3V22FH2D3V236H2D5V23DH2D5V246H2D5V24CH2D6V253H2D7V25BH2D7V261H2D8V267H2D8V26DH2D8V271H2D8V275H2D9V27AH2D9V27FH2D9V285H2D9V28AH2DAV28EH2DBV295H2DBV299H2DCV29DH2DEV2A3H2DFV2A8H2E0V2ACH2E1V2AFH2E2V2B4H2E3V2B7H2E3V2B9H2E5V2BDH2E6V2C0H2E6V2C4H2E7V2C7H2E7V2CAH2E8V2CFH2E9V2D4H2EAV2D9H2EAV2DDH2EBV2E2H2ECV2E6H2EDV2EAH2EDV2EFH2EDV2F2H2EDV2F6H2EDV2FAH2EDV2FDH2EEV302H2EEV305H2EFV308H2EFV30AH2F1V30DH2F1V30FH2F2V312H2F3V315H2F4V318H2F5V31AH2F5V31DH2F7V31FH2F8V322H2FAV325H2FCV327H2FDV329H2FFV32CH300V32EH302V32FH302V330H303V330H304V330H305V330H305V330)]
[IPress,Transform: Edit]
[IPress,Stroke:Dots]
[IPress,Stroke:FreeHand]
[IUnPress,Stroke:LazyMouse]
[IPress,Alpha:Alpha Off]
[IPress,Alpha:Alpha 01]
[IKeyPress,SHIFT,[IPress,Stroke:Dots]]
[IKeyPress,SHIFT,[IPress,Stroke:FreeHand]]
[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?

Hi,

Apologies for the delay in replying. For the macro repeating itself, did you try the solution here :
http://www.zbrushcentral.com/showthread.php?79709-Setting-up-a-macro-to-run-on-startup&p=989914&viewfull=1#post989914

As an alternative to saving over default brushes you can simply save them as new custom brushes to the ZStartup/BrushPresets folder. They will then be there every time ZBrush starts, and you could then simply get your macro to select the one you want.

HTH,

Thanks Marcus - changing those lines in my DefaultZScript worked perfectly. My macro now runs only once on startup and sets all my brushes exactly as I want them.

Great! :slight_smile: