ZBrushCentral

An Alternative UI Path Declaration

While looking up the interface item path of a button in the Tool palette, I stumbled upon a weird path name. In fact a whole group of them. I did a test to see what effect the interface path name would have on my own code and it turned out none; it worked exactly the same as before. Then I forgot all about it and where I found the peculiar path names.

What am I going on about?

It turns out you can prefix a single alphanumeric character in front of your IButton / ISlider / ISwitch name and then a punctuation mark. So [IButton, “ZPlugin:N.MyButton” ,…] would still show up in the interface as a button called MyButton and not N.MyButton.

So what can you do with a path name like ZPlugin:W.PressHere? I have absolutely no idea :smiley:

I thought it might be a way of defining which items to include in an [IDialog,…]. Maybe a way to create sections within a subpalette (does not seem to have an effect). Or maybe, just maybe, it is Pixolator toying with us. Yep, that has got to be it.

Does anyone know what it can be used for or have any ideas on what it’s purpose is?

Hmmn… Maybe this way you can have 2 or more buttons with the same name in the same subPalette ?

Of course! Thank you Dargelos, I never thought of that. It works fine using multiple buttons with the same name but different postfix, placed in the same subpalette.

The only reason for having multiple buttons with the same name, in the same subpalette, would probably be to toggle button images, yes? We could already do that but I guess with a prefix added to the button name, zscript recordings will work when using the button as the names stay the same.

The following will create two buttons in ZPlugin > zDLL. When the zscript is first loaded the memory block variable ensures we hide the second button and each button press simply hides itself and shows the other button. Pretty much how I normally would toggle an image on a button (by using two buttons) except that this should be recordable.

ButtonToggle.jpg