ZBrushCentral

No-Get-Info: StrokesGetInfo

This is a question for anybody who knows about the [StrokesGetInfo] command inside ZBrush.

In Davey’s Fantastic Command Reference he says the following about it:

======================================

[StrokeGetInfo, Stroke-type Variable, Info number, Point index (0 based)]
Output: StrokeInfo result
Retrieves the information from a specified Stroke (depending on the Info Number)

Info Number can be 0 through 9:
0 = Total Number of Points
1 = Indexed H Position
2 = Indexed V Position
3 = Indexed Pressure
4 = Minimum H Position Overall
5 = Minimum V Position Overall
6 = Maximum H Position Overall
7 = Maximum V Position Overall
8 = Maximum Radius
9 = Index of Point at Maximum Radius
10 = Maximum Horizontal Distance Traveled
11 = Maximum Vertical Distance Traveled
12 = Total Distance
13 = Twirl Count
14 = Indexed Z (deduced)
15 = Indexed Key Press

The Point Index is the sequential number of the point you wish to study. A Point Index of 0 means the first point in the stroke. Supply a Point Index only if Info Number is “Indexed”, that is 1, 2, 3, 14 or 15.

Note: StrokeGetInfo only works on a single stroke, created by pressing “Export Last” in the “Stroke:Inventory” palette, by using StrokeGetLast, or by loading from a file with StrokeLoad.

Example:

[StrokeGetInfo,[StrokeGetLast],0]

gives you the total number of points in the last stroke drawn.

======================================

I just need a few clarefications.

Though some of the Info-gets I understand, what do 0, 1, 2, 8, 9, 13, 14, and 15 tell you?

Thanks for any info. :slight_smile:

One more question. Can I make the arrow keys hotkeys for IButtons?

are you working on another brilliant project muvlo…sorry i cant help you

Hi, Muvlo.

I see I’ve made a typo; it says:
“Info Number can be 0 through 9:”

… and then I list 15 Info Numbers. Oops. Sorry if it’s confusing.

Whenever you draw a brushstroke, it’s made up of lots of separate points. You can see the points if you use the Dots-type stroke and the Simple Brush, for example.

You should know that this command only works on one single stroke, that is, from mouse click to mouse release (or tablet pen press to tablet pen release).

Some of the Info Numbers don’t require a point index, they just give you information on the whole stroke. You can leave out the point index if you like.

0 tells you how many separate points (“dots”) are in the brush stroke. No point index needed.

1 needs a point index. It tells you the horizontal position of that point on the canvas. If you use the command [StrokeGetInfo,some stroke ,1,0] it should tell you the horizontal position of the first point in the stroke (where the button was first pressed).

2 is the same thing; it’s the vertical position.

8 measures the distance from the starting point to the furthest point in the stroke, and tells you how far that distance is. No point index needed.

9 tells you which point is the furthest away, by giving you its point index. You can use this point index in another StrokeGetInfo command. No point index needed.

13, the Twirl Count, tells you how many times the stroke “loops” on itself. You know how the Hook Brush grows larger, the more times you twirl clockwise (and shrinks the more times you twirl counterclockwise)? Number 13 tells you how many times you twirled during the brushstroke. I believe a negative value means you twirled counterclockwise, but I’d have to verify that. No point index needed.

14: A stroke is not a 3D object – it’s only made up of horizontal and vertical points, although each point can also have a pressure value. Info Number 14 “deduces”, or tries to calculate, the Z position of that indexed point. Point index required.

15: This leads into your other question about arrow keys. In the Preferences palette, you’ll find a keyboard slider that tells you the numeric value of any key press/combination. Info Number 15 gives you that value.

Find that slider in the Preferences palette, and try out a few key combinations… you’ll be happy to know that you can use these numbers as hotkeys within the IButton command.

The only drawback to using the arrow keys as hotkeys is, the number you get on your keyboard is likely to be different for other users. Some have extended keyboards, some use Mac vs. PC, some have specialized keyboards, some use European keyboard layouts etc.

So my advice is, even though it’s possible to use specialty keys as hotkeys, your ZScript will be more publishable if you stick to standard letters and modifiers, i.e. SHIFT+ALT+‘R’

Any other questions, I’m happy to help.

dave

Thank you Z-wizard Davey! :slight_smile: Waddles off to ZBrush, opens Notepad… :slight_smile:

Thanks for editing and explaining Davey. I am sure that the information will be useful .