ZBrushCentral

4R8 startup macro

Hey all
I need a little help setting up a startup macro for 4R8.
Before 4R8 my custom default zscript looked like this:

//startup
[If,1,
[IPress,Macro:Macros:Misc:Fu-startup-01]
]

[pd]

As of 4R8 the default zscript is:

//startup

[If,[MemGetSize,startup_mem],
[IPress,“Zplugin:Misc Utilities:Home Page”]
,
[IPress,“Zplugin:Misc Utilities:Home Page”]
[MVarDef,startup_mem,1,0]
]

[pd]

How do I combine both these scripts so that they both run at startup? If I simply put them one after another like this:

//startup
[If,1,
[IPress,Macro:Macros:Misc:Fu-startup-01]
]

[If,[MemGetSize,startup_mem],
[IPress,“Zplugin:Misc Utilities:Home Page”]
,
[IPress,“Zplugin:Misc Utilities:Home Page”]
[MVarDef,startup_mem,1,0]
]

[pd]

or the other way around I only get the first one to run.

I don’t really need the home window to show up every time I start Zbrush but I would still like to see it once an update is available (hence I changed the option for it only to show once there are updates).
Pretty sure I’m getting the basic syntax wrong… any help would be appreciated.

cheers
Rafal

Good question… I’m still beginner, but realized too, that the start-up must be different than before

You can’t press the macro button in the DefaultZScript and still get the Home Page to show. The reason is that once the macro button is pressed the rest of the DefaultZScript code doesn’t run.

What you can do though is to copy the relevant code from inside the button of your “startup” macro to the DefaultZScript. You just have to make sure it goes right after the comma and just before the second [IPress,“Zplugin:Misc Utilities:Home Page”].

The image hopefully shows how to do it but let me know if you’ve any questions.

Startup-macro.jpg

Note that this method will only work for macros that don’t press any plugin buttons, as then the Home Page will not show.

@marcus_civis

Thank you sir from the bottom of my OCD heart!
Worked like a charm - my macro fires on startup and the Home Page as well.

cheers
Rafal

That’s great Rafal, and you’re welcome. :+1: