ZBrushCentral

Marcus can your ChooseBrush2.txt have another macro with in it to select a brush?

Marcus Thanks for the ChooseBrush macro you posted a while back.
I am trying to make a change to it and wondering if it is possible?

I have been looking at Marcus’s macro ChooseBrush2.txt

This macro will remember the last brush size you used, from a custom palette of brushes, as long as you run the macro first before selecting a brush from the palette.

If you want to use this by poping up your palette, then this macro is a one key solution, it pops up your palette, you then select your brush,and will then remember any size setting you apply to the brush.

If you want to have your palette in the tray, always on screen, then you need to run the macro and then, select your brush.

I was wondering if I could incoperate into this macro, with another macro command that selects a specific brush.

So for example if I have four brushes that I use a lot and want them to be at their selected size as I change back and forth between them, could I have a macro to first do what Marcus’s macro does and then add the appropriate command to select a particular brush.

So that I would in my case have four macros one for each brush, that would select a brush and add the last size set feature of Marcus’s macro, for that brush.

I tried to add this into the end [IPress,Brush:Standard] but it did not work, see below. Thanks.

//ZBRUSH MACRO by marcus_civis - save file to ZStartup/Macros/Misc folder

[IConfig,4.8]
[VarDef,curBrush,[IGet,Brush:Item Info]]
[If,[MemGetSize,Mem_BrushDrawS],[MVarDef,Mem_BrushDrawS,200,0]]

[Sleep,0.0001,
[If,((result & 2 == 2)||(result & 8 == 8)),
[If,curBrush != [IGet,Brush:Item Info],
[VarSet,curBrush,[IGet,Brush:Item Info]]
[If,[MVarGet,Mem_BrushDrawS,curBrush]>0,
[ISet,Draw:Draw Size,[MVarGet,Mem_BrushDrawS,curBrush]]
]
]
]
[SleepAgain]
,10,result]

[IButton,???,“Pick a brush and store/restore Draw Size”,
[VarSet,curBrush,[IGet,Brush:Item Info]]
[MVarSet,Mem_BrushDrawS,curBrush,[IGet,Draw:Draw Size]]
[VarSet,myMenu,“MY BRUSHES”]//change to custom palette name
[If,[IExists,myMenu],[IShow,myMenu][IPress,Brush:Standard]]

,0.5]

Hi Susan,

You need to have a separate macro for each different brush but otherwise it is easy. I’ve attached an example for the Standard brush. You just need to change the line with [IPress,Brush:Standard] to whichever brush you want to select and then save the file with a new name. You can do this for as many different brushes as you want.

Standard.txt (637 Bytes)

HTH,Standard.txt (637 Bytes)

Thanks Marcus, I got that working for the four brushes I use most for drawing.

And I found that as long as I long as I use those brushes the brush size is reset to where it last was with one of those brushes by using their macros.

But It looks like if I use a brush that I have not written a macro for, then if use one of the brushes that I have written a macro for and I select that brush by using the macro the brush will not reset.

I FOUND THE ABOVE NOT TRUE ON FURTHER EXAMINATION

Does this sound like the expected behavior with this macro? Would there be away to use the non macroed brushes and still have the macroed ones reset when selecting them with their macros?

Thanks

Hi Susan,

That’s a restriction of the macros, I’m afraid. The problem is keeping track of the draw size. Macros can’t monitor the ZBrush interface the whole time, so if you select a brush without using one of the macros they have no way of recording the change. If you use them in conjunction with the original macro that popped up the brush palette (and/or the custom menu version), all should be well.

So I just wanted to clarify how I used this macro, for any readers.

I have a few custom brushes always in my tray, but they are in different custom pallets, for different typed of actions I do.
So I did not want to use this macro in conjunction with a pop up feature, where if you use the macro to pop up the whole brush palette or a custom brush palette it will then remember the size of any brush you use with those pallets.

So I created a macro button for each individual brush that I wanted to add the size memory to as Marcus suggested, and then replaced the brush icons I had in my custom pallets with the macros buttons instead. This works fine. And to correct what I previously stated in my post above, if you are using it this way and then you select a brush in a normal way with out this macro, it does not affect the size memory function of the brushes you are using with the macro.

Thanks Susan, that’s useful. :+1: