ZBrushCentral

Select Last material?

Hi,

I’d like to be able to switch between two material, one material being constant and the other could be any material.

I want to swith from a custom material that could help me to see my work better, this is the constant material, from any material and coming back to this last material.

Is it possible to do something like that with a macro?

That would be something like, if A material is not selected select A material, and if A material is selected switch back to last material selected before A was selected.
Amazing coding skill you see :smiley:

I don’t know if I was clear but if not at least I am able to make a macro to swich between 2 choosen material.

Thanks.

You could assign a hotkey to the material. That would probably be the easiest.

This is adapted from a macro I did for brushes. It allows you to set two Materials so that a single hotkey will toggle between them.

Save the file to the ZStartup/Macros/Misc folder and either restart ZBrush or press Macro>Reload all Macros. There will be a new ‘MaterialToggle’ button in the Macro>Misc menu.

You need to assign a hotkey to the button in order for it to work. It’s best to choose a single key rather than using a modifier like ‘Alt’ as in that case both keys would need to be released each time.

Click the button any time to store a Material. The macro stores a ‘primary’ Material and a ‘secondary’ Material. All this means is that if you select a different Material and then press the hotkey the primary Material will be selected.