ZBrushCentral

Custom sized shelf boxes and importing pngs for UI

What’s the process of adding in custom png’s like this color swatch? I came across Cryrid’s UI a few days ago over on Polycount. He posted the script but I couldn’t get it to load so I figured I’d just try making my own. This is what his looks like.

Thank you for any advice!

Attachments

ui_2.jpg

gaps on sides.png

Cryrid gives his code in this thread:
http://polycount.com/discussion/90444/zbrush-custom-ui-showcase

Basically you need to create a plugin button that has the image file specified in its parameters. You would then make the button part of your custom UI.

[ISubPalette,“ZPlugin:Cryrid UI”]

[IButton,“ZPlugin:Cryrid UI:QuickColor”,“Quick Colors”,
,1575 /width/, “CryridUI\color1575_12.psd”/image/, 12 /height/]
//end button

Ok that makes sense. The process of making a custom sized plugin button is where you get into writing scripts huh? So if I wanted to adjust the height I’d just changed it in the .txt file and resave it.

If you look at the code I posted you’ll see the button has a width of 1575 and a height of 12. Those are pixels that correspond to the image size.

You can use that code as a guide for your own buttons. Create a text file in a text editor like Notepad and then load it using the ZScript>Load button. If your code is OK then ZBrush will create a ZSC file in the same location as your text file. If you put that in the ZStartup\ZPLugs64 folder your buttons will be available each time ZBrush starts.

Yep makes sense :slight_smile: Only thing left is why the psd files aren’t loading with the plugin buttons. The script is working, just don’t have the images loading. I have the psd’s in the ZStartup/Zplugin so it should be showing up. To no avail though. Instead, the buttons have question marks on them.

The question mark means that the script can’t find the image file. Either the file name is wrong in the code or the image file isn’t in the right place. If your code just has the file name (no folder or path) then the image file needs to be in the same folder as the script.

Having the script in the Zscript folder instead of ZStartup/ZPlugs was the issue. Thanks for the help Marcus! :+1: