ZBrushCentral

Many questions on ZScripts and plugins

Like I said, quite a few :eek: :

  1. Is there any way of using [Note…] or multiple instances of it, to point out several controls all at the same time?

  2. Is there any way of taking a screen grab of an annotated screen, and putting it into a specific file?

  3. When I use ‘Note’ to indicate Transform:Edit, it shows the one on the shelf, if that control exists on the shelf (as it does in the default configuration). When I use ‘IShow’, it shows the one in the Transform Palette. Is there a way for Note to show both?

Also, using IShow to show this doesn’t actually work (at least not when the Edit button is grayed out.) In fact, the cursor behaves a bit loopily, going off to one side of the Transform menu before going to it, and then it points a bit away from the ‘Edit’ control.

  1. Pressing either of the left or right divider bars both result in a recorded command [IPress DIVIDER]. It plays back correctly, but I don’t know how. How can I differentiate between left and right?

  2. Is there any public information on writing C plugins for ZBrush? Basically, just some C code that can talk to ZBrush using memory blocks and standard ZScript commands. (I would imagine that something like Projection Master is built in this way.)

That’s all for now :slight_smile: Thanks.
Ken

  1. Yes. For each item you want pointed out have a separate note with -1 as the duration. This combines it with the last note (which should have 0 or above as the duration), thus:

[Note, ,Draw:RgbIntensity,-1]
[Note, ,Draw:ZIntensity,-1]
[Note,"These two items",,0]

2.Not sure what you mean here. It is possible to add images to notes. Put the file name after the 12 comma.

3.Yes, with a bit of Note-trickery. Here’s the code (I’ve put it inside a button so that you can test it):

[IButton,"Press",,
[ISet,Standard,1]
[IPress,Tool:PolyMesh3D]
[CanvasClick,-1000,-1000,-900,-900]
[ISet,Transform:Edit,1]
[Note,,30000,-1,,250,400, ,0.2,0.069,0.145,0.133,]
[Note,"These are the two Edit buttons",1062,0,,250]
]

This works by pointing out a second but different item (in this case the Transform palette) and then adjusting the frame to cover the Edit button. Notice that a polymesh3D is drawn off-canvas. If you have an object in Edit mode this wouldn’t be necessary.

  1. [IClick,1000]//left divider
    [IClick,1001]//right divider
    You can find the numerical window ID by looking at the Preferences>Utilities>View Window Id slider.

  2. There’s not much info at present but you can call dlls using the FileExecute command (TVeyes may be able to help with this as he has experimented). But zscripting memory commands are quite versitile on their own. I’ve not looked at PM closely but I think it is a straightforwad zscript based on 3Dcopy.

Marcus, that was incredibly helpful. As to question 2), it involves doing written (as opposed to ZScript) tutorial material. Basically, I’m wondering if I can use a ZScript to set up the ZBrush window the way I like it (objects, notes, etc), and then at that point issue a ZScript command which will write an image of that screen to a specified file.

Many thanks,
Ken

  1. Is there any way to refer to the Shelf when using the Note command. I mean the ‘inverted U’ shaped workspace around the canvas area, as it appears in the default ZBrush startup screen. I’d like to be able to refer to it and have it highlighted as I do. Unfortunately, Marcus’ tip for finding window IDs, while extremely useful for everything else, doesn’t reveal anything for the shelf.

  2. Is there a name for the Transform:Draw button? Of the modal buttons in Transform, it’s the only one I haven’t been able to refer to by name.

  3. Is there a way to obtain names of buttons, as there is for there IDs? Or is there a list of the ‘nonobvious’ names anywhere.

Thanks again,
Ken

  1. When using the Note command to highlight an interface item you can define the size of the frame. Check the Zscript Command Reference for more info on the frame values.

2+3) You can find the Interface Item Path by holding CTRL with the cursor over the item. At the bottom of the interface description is the Interface Item Path.

If your are going to highlight the button(s) of a ZPlugin you should use the Interface Item Path and not the Window ID. The Window ID will change all depending on the order that the Zplugin files are loaded(alphabetically).

  1. As TVeyes suggests, you can change the Note frame size to cover more than one item. You could point out the top shelf by using the ID 1011, and making the frame larger.

  2. Transform: Draw Pointer is the path you want. Use the method TVeyes suggests when you need to find the path of interface items.

On capturing an image of the ZB interface:
It’s not possible to do what you want from within ZBrush. There are various ways to capture images of the canvas and export them, but not (as far as I’m aware) the whole interface. And there’s a problem if you want Notes displayed: they effectively disable the interface while they’re on display, which scuppers anything you want to do while they’re there. The only way to do what you want is to use a special dll or the Print Screen button on the keyboard.