ZBrushCentral

Useful small ZScripts and Macros for ZBrush 4 & 4R3

This thread is intended as repository for useful small zscripts, plugins and macros. Sometimes there’s a simple zscript solution to a problem or need that may not warrant a major plugin but will none-the-less be useful to users. If you have written such a zscript, plugin or macro please share it here so that users can easily find it and benefit. Thanks! :slight_smile:

Note: some of the plugins or macros posted here may not work correctly with ZBrush 4R3. Those that have been updated for 4R2 will say so.


Index


Large Menus (this post - see below)

Proxy buttons for Toggle Symmetry, x, y, z, r and Enable Customize

Lasso - Paint mask/selection toggle

Smaller UI configuration

Multi OBJ importer

Numpad

ZSphere Mesh Insert

Beta Turntable Plus for ZBrush 4, 4R3, 4R6

Flip UV’s vertically on import and export

Y Axis Rotation - in increments

Init ZBrush and load Startup Document

All SubTools macro

Cubics

Materials to Texture Map (updated May 29 2012)

Seamless Textures

Axis Rotate

Favorite Brush toggle

Scale Offset Copy/Paste

Fit Mesh

Export All BPR passes

Document MaxResize

Duplicate Element

Tool Position 4.2

Spinner

Refresh Texture

Custom Symmetry Buttons


Large Menus

This is for those people that find the ZBrush palette titles a little small. It’s a set of buttons that can be added to a custom interface to give access to the palettes. The images can be edited to suit the user’s requirements.

Unzip and put the Large_Menus.zsc file and MenusImages folder in the ZStartup/ZPlugs folder. Restart ZBrush and there will be a Large Menus menu in the ZPlugin palette. When creating a custom interface, the buttons can be Ctrl+Alt+dragged to where you want.

Note that when a palette is open in the right or left tray the ‘large menu’ button will do nothing.

1 Like

Hi Marcus.
As I already said in another thread, thank you very much, for me this script is really useful.:+1:
One simple question: Is it possible to modify the script to obtain the same behaviour of the original menus, that is that when single clicking on a palette, the others open simply hovering the mouse over them?

Grazie, ciao

Unfortunately not - this is the best that can be done with zscript.

Ok, no problem, the script is really useful also in this way.
Thanks again.

Ciao

[attach=215790]proxy buttons.jpg[/attach]

Here are six, miniaturized “proxy” buttons that can be used in place of their menu counterparts to save space when inserted on your customized interface (these smaller buttons are especially useful for Tablet PC users.)

  1. sym = toggle symmetry on/off
  2. x = toggle x symmetry
  3. y = toggle y symmetry
  4. z = toggle z symmetry
  5. r = toggle radial symmetry
  6. UI-ed = toggle Enable Customize button and off.

For those who are constantly tweaking their interface, the handy UI-ed button can be permanently placed on the interface where the HUGE Enable Customize button would not fit.

Unzip ZB4 proxy buttons.zsc into the ZStartup/Zplugs folder. Then, look for the buttons in the ZPlulgin/Svengali subfolder next time you start ZBrush.

ZB4 proxy buttons.txt file included.

Sven

Attachments

proxy buttons.jpg

Hi Svengali,

thanks for the script, it can be handy, considering that, if I understood well, there is not possibility in ZB to associate a key to y, z and radial simmetry. One question: I put the buttons in my Ui, but they don’t change appearence when activated (there is no visual difference between on and off) . Is it normal?

Ciao

@ Antlab,

That’s correct, the x,y,z,r proxy buttons don’t change or toggle appearance.

What indicates whether they are active? — The single, dual or multiple red-cursor dots over the model.

Sven

I’m afraid I don’t zscript so I hope it’s not out of order to put a suggestion/request here.

I am constantly switching my selection and masking brushes (mainly between marquee/pen and lasso brushes). Now I could put buttons for these brushes in the UI to make selection easier, but would it be possible to have just one single button - a ‘lasso’ button - that sets both the lasso mask and lasso selection brushes as active when on, and the marquee selection and pen masking brushes as active when off? I think this would cut down on the more tedious brush selection changes and one button would take up less real estate.

I had actually done that already (which is why I thought it would be good to start this repository!):

The little plugin in the zip will give you the old Lasso button behaviour. Unzip and put the file in you ZStartup/ZPlugs. Restart ZBrush and you will have a Marcus Tools menu in the ZPlugin palette. In that will be a switch named Lasso.

The switch will toggle the Lasso and Paint mask/selection brushes. With the Paint mask selected you will be able to drag a rectangle from outside the model, just as in 3.5. You can assign a hotkey to the switch if you wish.

The first time you use the switch in a session you may have to press it twice, depending on your setup. You may also get the message about selecting the mask option, which you can get rid of for the rest of the session.

Hi Sven,

thanks for the confirmation. Your script is nice, allowing a more fluid action during sculpting, without the need to continuosly open the Transform Menu.

Ciao

On smaller displays some buttons in the standard UI are off the screen. (They are still available in the Transform palette but obviously that’s not as convenient.)

This configuration will solve the issue:

  1. Unzip the file to your ZBrush 4.0\ZStartup folder.
  2. Start ZBrush and press Preferences>Congig>Load UI. Select the SmallerUI.cfg file from the ZBrush 4.0\ZStartup folder.

The adjusted UI will be loaded. Buttons that are on the lower right column in the default UI have been moved to the top right-hand side. You may need to close the right tray (with the Tool palette in it) in order for them to appear - to do this click on the divider.

If you are happy with the new layout save it as your custom interface by pressing Shift+Ctrl+i.

>> Download here <<

Hey all, this tool was developed as a excercise in learning how to marry C code and ZScript. The tool allows you to import multiple obj files at once instead of one at a time. It also allows you to optionally select on of the objs to import as the ‘main tool’ and the other objs as subtools of that one. there’s also an option for recursing subdirectories when searching for valid obj files.

I’ve heard tell that Subtool Master already does all this so maybe this tool is utterly useless…though it was still a good learning platform for me :slight_smile:

also, there IS a dll here so i’m not sure that this is in the right thread. apologies if not. Just wanted to share this plugin and ZScript with the community out there in case it was of some use.

attached is an image of the UI with some notes as well as the installer in the zip file.

just run the installer and install it to the ZStartup\Macros folder and there should be a subpalette called Robo Tools under the Tool palette.

lastly, HUGE thanks to Marcus_civis who’s been tremendously helpful and patient with my never ending questions regarding ZScripting and calling through to a dll!!

enjoy!

Attachments

MOI_UI.jpg

Chan,

Great! Thanks for sharing. :slight_smile:

Note: I think you should include the RoboToolPalette.zsc in the install.

At the moment users need to load the RoboToolPalette.txt through the ZScript:Load button the first time so that the code is compiled, after which the plugin will be automatically loaded each session.

Cheers,

Is it possible to combine the lasso and paint mask/selection like in 3.5 when lasso was active? I don’t use the rectangular mask/selection :frowning:

Hey Marcus, I didn’t have any trouble with getting the button to show up with just the .txt files in the ZStartup\Macros folder. i deleted the .zsc files and restarted ZB and the button still showed up and functioned as expected. having said that, here’s a new installer that installs the .zsc files for both RoboToolPalette.txt and MOI.txt.
thanks!

That’s how it works.

This little plugin is for entering slider values without using the keyboard. It’s a ZBrush 4 version of one originally posted in this thread.

[attach=219161]Numpad.jpg[/attach]

Installation
Unzip the file and put the Numpad4.zsc in your ZStartup/ZPlugs folder. Restart ZBrush and there will be a new Numpad menu in the ZPlugin palette, with a single Numpad button.

You need to assign a hotkey to the Numpad button. Ctrl+Alt+click on the button and then press the hotkey you want to use. Store the hotkey by pressing Preferences>Hotkeys>Store.

Instructions
Hold your cursor over a slider and press the hotkey. The interface will appear and you can enter a value by pressing the buttons. Press the = button (or Enter on the keyboard) to enter the value into the slider.

Attachments

Numpad.jpg

The mannequins are made by inserting polymeshes into a ZSphere structure. You can also use this technique to create chains and similar structures which can be edited and posed (as Joseph Drust shows here).

This plugin makes inserting the meshes easy, with two meshes being used, one for the local mesh that replaces the ZSpheres and one for the connecting spheres. (Individual meshes can be replaced by hand afterwards if you wish.)

Unzip the file and put the ZSphereMeshInsert.zsc file and ZSphereMeshInsertData folder in the ZStartup/ZPlugs. After restarting ZBrush there will be an Add Mesh to ZSphere button in the Zplugin>Marcus Tools menu.

With your ZSphere selected, press the button. You will be asked to select two meshes from disk, one for the local mesh and one for the connector mesh. The plugin will then create a new structure with the meshes inserted.

The zip includes two chain link ZTLs which can be used to make a chain.

In the tutorial mentioned, one can choose to do either ‘local’ or ‘connector’ but the plugin forces the use of both at the same time.

Is there a way I can use only ‘local’?
Basically when I follow the plugin messages, my chain link sizes are not consistent even though my zspheres are all the the same size.

Brandon,

I’ve updated the plugin so that if you only choose a local or connector mesh then the operation will go ahead with just that - simply cancel the open file dialog for the one you want to omit.