Question: PropertySet command....

I ran across the following in a sample script and was trying to figure it out:

[PropertySet,Caption,0,1]//font size
[PropertySet,Caption,1,1]//alignment
[PropertySet,Caption,2,.8]//intensity
[PropertySet,Caption,3,[RGB,255,255,255]]//font color
[PropertySet,Caption,6,-1]//gradient (-1, no gradient)

I am assuming that this is modifying the properties of the Caption settings. I am trying to get more information on how this is being done. (How do you know what flags modify what settings in the Caption?) The Caption command only has a place for specifying the text, it doesn’t mention the ability to modify any of the other settings. I tried to see if the PropertySet command had some information but the online command reference doesn’t list the PropertySet command. It is listed in the index (hyperlink) at the bottom of the page, but it doesn’t link to anything in the article.

Not sure why that is missing but note that this only applies to text displayed in the ZScript Window at the bottom of the UI (press hotkey ‘H’ to get it to appear) and some of the associated commands no longer work as expected. (If you test the example in the online docs you’ll see it doesn’t display or work correctly.)

[PropertySet,The base command name (Title,SubTitle,Caption), Property Index, The new Value]

Modifies the setting of Title, SubTitle and Caption text
Property Indexes:
0 = Font size (1=small, 2=medium, 3=large)
1 = Alignment (0=center, 1=left, 2=right)
2 = Opacity (0 - 1)
3 = color (0x000000 <-> 0xffffff)
4 = Border Size
5 = BackColor1 (0x000000 <-> 0xffffff)
6 = Gradient Mode (-1 = None, 0 = flat, 1 = HGrad, 2 = VGrad, 3 = DHGrad, 4 = DVGrad)
7 = BackColor2 (0x000000 <-> 0xffffff)

e.g.:
[PropertySet,Title,1,1] //sets left alignment for Title settings

Is there a way to know which commands in the command reference no longer work as expected? I am really interested in ZScripting but I will really get lost if I can’t tell whether I am doing something wrong or if the commands are just not working right :slight_smile:

Thanks Marcus!

It is only the commands that affect the ZScript Window display. Nothing actually fails, it is just that they don’t behave as they did. For example, it is difficult to place a section on top of an image as the Pen commands don’t seem to affect the position of the section. This technique is used in the Tutorial Window Interface example given in the docs. Some of the relevant commands are:

Image
Property
FontSetColor, etc.
PenMove, PenMoveLeft, etc.
Caption
Title
PaintRect

These commands are left over from when zscripts were used extensively for tutorials (several versions back). Most people who try zscripting now are keen to write a plugin, so that the buttons, sliders or switches are part of the ZBrush interface.

HTH,

Thanks for the information. That is a great help. So I am safer sticking with the plugin based scripting methods then. Good to know. I’m sure I’ll have more questions to come. Thanks for the help!

There’s not really a separate plugin method, it’s simply a matter of the UI display. In fact I use the standard zscript for most of my testing because you can update it simply by reloading the zscript, whereas with a plugin you generally need to restart ZBrush. Start with the basics of using a few buttons and sliders to do what you want, and then progress from there. It’s easy to make a plugin from a zscript once everything is working how you want.