ZBrushCentral

Trying to clear views through macro...impossible?

Is there a way to clear views through macro? I’ve tried, “clear all views” and “clear to” but nothing gets recorded, bummer because it would’ve been a real time saver for what i need.

Thanks.

It’s not possible to call plugins from other plugins or macros. This is because only one macro or plugin can be active at a time.

Can you explain a bit more about what are you trying to do? I may be able to find a solution.

Hi,
Ah i see, i might have an alternate solution without macros with less clicking involved…but still more clicking than i’d like!.

I’m trying to automate matcap baking across multiple subtools (one subtool at a time), maybe there’s something that already exists for that, not sure.

I want to macro record something like this:
-Clear views at the macro start.
-Position the active subtool in front view, back, left and right.
-As the views are created i want to store them in Zapplink properties.
-Hit Zapplink and process ends here.

You might be able to use [IPress, Document:Zapplink Properties: Clear All] , but I don’t know if there is a way to bypass the confirmation dialogue that pops up.

I’m not clear how you are using ZAppLink to bake the MatCap. Are you using the Character Strip in some way?

Have you tried the MatCap Baker plugin on the Download Center (at the bottom of the page). It only works with the selected subtool but has a lot of options.

Here’s an example method they might be using:

Because this doesn’t require Textures, it wont require UV and be dependent on how they are oriented (so no noticeable seams in the matcap bake) - the result is just polypaint they can immediately begin to edit. The downside is that because it uses the document view as the baking method then can cause the image of the mesh to be projected onto itself for more complex shapes (example: arms being baked to the side of a character in an A-pose). Sometimes Projection Master’s auto fade will cover these areas up, but other times it wont which is why a mesh might need to be broken down into simpler subtools for this method.

Exactly what Cyrid described. It’s just an additional pass i use for hand painting. It doesn’t require any UV’s and the polypaint is baked with xnormal. I will check [IPress, Document:Zapplink Properties: Clear All] is a viable option

As an alternate method i am merging most of the subtools together and “click hide” what i want to bake based on views that are already set. I could also clean up manually afterwards but automating it would be even lazier, or as i like to call it…more productive! :lol:

Thanks for the replies, i will take another shot and see how it goes.

OK, many thanks both of you, I understand now.

Actually it would be possible to write a plugin to do the material bake in ZBrush without using Photoshop at all - I will look into that.

In the meantime this little plugin may help with what you want to do. Unzip the file to your Desktop, open any containing folder created by the unzipping and then copy the ZDeleteViews.zsc file to your ZBrush 4R8\ZStartup\ZPlugs64 folder. Restart ZBrush.

There should now be two new buttons and a switch at the bottom of the ZAppLink Properties sub-palette in the Document palette.

The Clear Views button will simply clear the existing Views without producing a pop-up.

The Adjust Views button will adjust the current subtool so that it fits in the document. You need to have views already set up for the model. If the ZApp switch is ON then after adjusting the views the ZAppLink button is pressed to send that subtool to Photoshop.

You could press the Clear Views or Adjust Views buttons from a macro. You’ll need to edit the macro in a text editor like Notepad and add this line (change the name for Clear Views):

[IPress,“Document:ZAppLink Properties:Adjust Views”]

This needs to be just before the last line which has a single bracket ‘]’. That makes sure the command is inside the button.

ZDeleteViews02.zip (4.31 KB)ZDeleteViews02.zip (4.31 KB)

Wow that is very generous of you. I’ve just done a quick manual test without macros and it’s almost perfect. The only issue i’m running into is when i apply the adjust view to other subtools, their size is not “framed” as big as the initial one, the following subtools get half resolution projection if you will, if that could be fixed then it would be perfect.

Thank you very much for your help.

OK, I’ve updated it in the post above. Make sure you remove/replace the previous one.

This version has a slider and a new button. The Fit button works like the standard framing (‘F’) except that it gets its scale from the Fit Adjust slider. The smaller values will give a smaller model. This means that you can have the model fit nicely in the document instead of overlapping slightly as can happen with the standard fit.

The point of this is that the AdjustViews button uses the same values, so you should be able to quickly set up a model and get consistent results.

HTH,

Even better! A real time saver, after the views are setup, just a few clicks and you’re done. Thanks again, very much appreciated!