ZBrushCentral

Perspective/Ortho script help

marcus_civis, super!
Can you help me make a script?
The idea of pushing a button and the camera turns from perspective to the orthographic view(nearest view).
After a couple of strokes, clicks back into perspective.
I hope you understand my English
video example:

//youtu.be/3BCq0IIpiMg

Safronov3D press the key “p” and you switch from ortho to perspectiv view … press the “shift” key you lock the view to front or side view

Not having to press P each time was the underlying idea as I understood it.
I’d like to see this too but mapped to the default Shift key - probably not doable with a script.

There’s a handy script here to help with views, not sure why it hasn’t made it into ZBrush out of the box yet. Still works, follow installation instructions. Happy ZBrushing.
http://www.zbrushcentral.com/showthread.php?161588-quot-Axis-quot-Plugin-for-ZBrush-4r2

thx O/MI, it’s much more action and the camera does not remember its previous position. The idea is that when you have the perspective shifted to a nearby orthographic view and remembered the previous position of the camera.
1st press: Remember Camera position, Shift+Stroke, Perspective Off.
2nd press: back to camera position, Perspective on.

PS you works is awesome

I agree that the Axis Plugin is not as straightforward - also the beauty of Zbrush’s nearest Ortho Snap is that it comes along without any UI…

Hi Safronov3D,

I’m glad you like the scripts & macros. :slight_smile:

What you want to do is only partly possible - there are drawbacks. It’s not possible to monitor the ZBrush interface from a script, so you can’t get a script to switch perspective back on after a few sculpting strokes or seconds have elapsed. Also, any script you create will interrupt the sculpting process a little - you can’t have the mouse button pressed and the script work.

However, it is possible to write a toggle button that will work well with a hotkey. When you assign a hotkey it’s best to choose a single key, don’t use Shift/Ctrl/Alt as they don’t work so well (and you can’t use any of them on their own).

The attached code is for a simple plugin that basically does this:

  • if perspective is ON then it stores the model position, turns perspective off and snaps to the nearest ortho view.
  • if perspective is OFF then the previously stored position is restored and perspective turned on.

To test the code, save the file to your ZBrush /ZStartup/Zplugs folder, then press the Load ZScript button in the ZScript palette and select the file. You only need to do this once - ZBrush will create a ZSC file which will be loaded automatically when ZBrush starts.

The button will be in the ZPlugin palette in a sub-palette called Marcus Tools.

It may be you decide that you can adjust the script to work better for your needs. You can learn about zscripting here: http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/

Download the script here:

Thank you very much for your detailed reply and for the script. :+1:
Love to scripts and macros taught me in Maya. Now can’t imagine comfortable work without them in other programs.