ZBrushCentral

Question: Need help understanding Notes

Hello everyone!
I am quite new to zscripting
I am trying to write a Pie-menu-like thing in zbrush.

For that I want to call out note centered on mouse position.

Zscript command reference about notes left me with some questions:

  1. What “Optional path of an interface item to be pointed out (default:none)” means and how exactly it works?
    2)Prefered distance of the note from the specified interface item (default:48) - Can I specify mouse cursor as an interface item and if yes, how?

If that was pointed out somewhere else, then I am sorry.

Attachments

Screenshot_1.jpg

Screenshot_1.jpg

Lots to read. http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/nuts-bolts/
There are sample files as well. I posted some text files(scripts), some have a choice(gradient or not).
Good luck.

Thank you a lot! Im gonna read all of it!
Still that does not answer my question as there does not seem to be any description about “None functions” in “Note interface” section.

I just wanna be able to call a Note interface where my mouse currently is :cry:

Here is a file which will hopefully help you get started. Have a look at it, gets some info about tools and subtools etc.

Hi Anton,

I’m afraid those two functions no longer work. The parameters have to be there - in other words you need to put the right number of commas into your zscript code - but ZBrush will ignore any values you put in. (In ZBrush 2 you could use a Note to point to a button or slider on the interface. It was a useful feature for tutorials written in zscript. But in later versions many of those features no longer work.)

HTH,

marcus_civis, this is a solid info! thank you! now I at least know I have to dig in some other place/

Thank you!

remind me i had a similar annoying issue when i tried to make the [mesh3dGet,2,xyzbounds] few days ago ^^
it just simply has never been implemented, so it impossible to get the XYZ bounds value of the current subtool / Ztrool ? ( i even don’t know ) :slight_smile:

f​:slight_smile:celess,
If you simply want the size then you can use the values in Tool>Geometry>Size.

nope i need to reverse the equation to recompute the right scaling value of the model

about scaling in Zbrush :

obj file format has no scale variable support
to define the model scale ratio zbrush apply some math
Scale in Zbrush :
1 unit = 1*2 ( global scale is always 2.00002)
if you have a cube of 1’1’1 and a scale of 1 in maya, after the importing in Zbrush

[QUOTE]XYZ size = 2.0002
X = 2.00002
Y = 2.00002
Z = 2.00002

Now if you have a box of 1’2’3 with a scale of 1 in maya, after the importing in zbrush
all independent Scale Axis value are defined on the boundary box

XYZ = 2.00002
X = 0.66668 = 12/3
Y = 1.33335 = 2
2/3
Z = 2.00002 = 1

Here the biggest value of the boundary box, become the value to apply math to other axis.
Z = 3.0 units in maya, it makes the value to be the biggest value.
Zbrush compute some more value that are important for the moment you will export the model back into your 3d editor.
This Value are automatically adjusted in Tool:Export :Scale , X/Y/Z offset.
When these value are changed, the model will always load with the wrong scaling.
when you export from Zbrush, the inverse math is apply, and utilize the value from tool:Export palet, so the new mesh will reflect the unit and scaling that were setup from maya/ 3dsmax etc…

[/QUOTE]
This is the reason why i wanted to access to XYZ bounds data. resolve the scaling when you get back to 3dsmax for exmaple.

You can use the Tool>Export>Scale slider to find out what auto-scaling ZBrush has done when importing a mesh. ZBrush’s ‘ideal’ size is a 2 units cube, so will auto-scale to fit.

You can avoid auto-scaling by selecting the Polymesh3D Star and setting the Tool>Export>Scale slider to 1 before importing.

yes thats what i am doing already, but imagine that value as changed , so there is non more possibility to find the older scale ratio ^^

sorry Anton to hijack your post this way :stuck_out_tongue:

Faceless, no problem) it’s of no use to me anyway)
and that scaling problem of yours- pretty annoyng indeed. ran into similar issue about a week ago.

About my issue:
At least relative position of buttons inside of notes seems to work. I’ll see what can be done in that direction

You can position the NoteIButtons anywhere if you create a hidden button that covers the interface. For example, this will show a button at the cursor (use a hotkey for best result). The plugin button will be in the Zplugin>Misc Utilities menu.

[IButton,“Zplugin:Misc UTilities:Test Note”,
[VarSet,btnW,140]
[VarSet,btnH,100]
[NoteIButton," ", 0 , 1 ,1, 6 ,[IWidth,1008]+2,([IHeight,1000]+20) ,0 /color/ ,0 /text color/, 0,1,0]
[NoteIButton, “Hello World!”/text/,/image/,0 /pressed?/, 0 , [MouseHPos,1]-(btnW/2), [MouseVPos,1]-(btnH/2) , btnW /width/, btnH /height/, 0xFF0000/color/ , 0xFFFFFF/text color/ , , /text opacity/ , /image opacity/ ]
[Note, , , , 0 , , , , , ,0 ,0]
]

Note this doesn’t take into account when the cursor might be close to the edge of the interface - but it’s simple enough to code that appropriately.

Whoa, marcus_civis , thats exactly what I needed! Thank you a lot! A LOT!

PS:
"[IWidth,1008]+2,([IHeight,1000]+20) "

thats some zbrush logic right there :smiley:

Tried to do the same myself for half a day - was not succesful at all.

Thank you again!

Anton,

Interface items have a numerical ID which you can get by examining the View Window Id slider in Preferences>Utilities (or there’s a zscript command which will return it). The ID can be used instead of the path as I’ve done here - 1008 is the Title bar across the top of the interface, and 1000 is the left tray divider, so getting their width/height gives the ZBrush window dimensions.

If you’re using numerical IDs, note that most of those in the Tool palette are not useful.

I cannot describe, how useful that might be!
Marcus, you taught me so much in just one evening! Thank you again!

You’re welcome, Anton! :slight_smile: