PDA

View Full Version : Curve Menu


campi
09-23-09, 06:53 PM
Hey,
I was just wondering how to put a "Curve Dialogue" in my menu. It seems to me that Zbrush Curve Options are treated a lot different from other menu items (considering that you can't even move them around with STRG in customUI). So do I have to hardcode this dialogue into my menu ??

TVeyes
09-23-09, 08:44 PM
Are you trying to load curve files (.zcv) into curve interface items? Or edit the curve itself ?

The Curve interface items behave differently from other interface items but I have no idea why. For example, Brush > Tablet Pressure > Size does not exist until one of the tablet pressure curves has been opened. It can't be to conserve memory as once one of the tablet pressure curves is activated the tablet pressure interface items exist for all brushes, including undo/redo for each curve (5 tablet pressure curves * 1 undo each * 97 brushes uses about 4 MB).

But I digress. The curve editor itself would be a bit tricky to code but the main controls and modifiers are easy enough to recreate. You just need to perform some conditional tests before, for example, changing the focal shift of the curve.

It would help to know specifically what you are trying to create.

campi
09-23-09, 10:26 PM
Nothing that complicated no :)
All I want to do is de-clutter the Zbrush Interface and create streamlined interfaces for texturing, sculpting etc. Just reassemble existing Menu items into new ones. It's just the whole curve edit thing that I can't really access, so I figures I would need to edit the script itself to resinsert the AlphaCurve (as an example) into the new menu.

TVeyes
09-24-09, 12:02 AM
I am afraid the curve edit interface is the only interface item that cannot be repositioned, AFAIK. But just because an item can be repositioned does not mean it will appear in subsequent zbrush sessions.

If you find a custom UI interface item has disappeared the next time you start ZBrush it is because it does not exist in the interface at all times (or you forgot to save the UI :)). For example, the ZSphere > ZSketch buttons can be repositioned but as they only exist in the ZSphere tool they will not appear after restarting ZBrush. Quite annoying actually, but I am sure there is a good reason.

Disco Stu
09-24-09, 08:21 AM
Maybe to force people to use shift+a :D

TVeyes
09-24-09, 04:14 PM
That could be it Disco Stu :D

I know the current setup makes it possible to detect which type of tool is currently selected, i.e if [IExists, Tool:ZSketch:ZSketch Edit] then it is a zsphere tool. But this could just as easily be done using the underused interface item flags. The bitmask flag of an interface item should easily be able to tell if it is a Polymesh, Parametric, ZSphere or 2.5D brush.