ZBrushCentral

Question:Zscript to zplugin ?

Hi Guys,

Wanted to know how do we put our script as a plugin ? I put it into my zplugins palette but when I click on the button, I always have to load/launch my script before (Zbrush says to me that it’s a compact plugin and that I have to load it before)

Any ideas ? (sry I just have started zscripting 2 days ago, I’m still a newbie :frowning: )

Thank you in advance

All you need to do is define a new sub-palette for your plugin, and then make sure that all the buttons, sliders & switches that your plugin has are named with the whole palette>sub-palette>name. See the “ZPlugin Code” section on this page:

http://docs.pixologic.com/user-guide/customizing-zbrush/zscripting/interfaces/zplugin-interface/

Thank you Marcus, but I did it, but I always need to load my script before to use it by the subpalette…

Here is my code (for the subpalette) that I put at the end of my code:

[ISubPalette,“Zplugin:MyPlugs”,2]
[IButton
,
,
[IShowActions,0]
[RoutineCall,sLevel]
,152,.125
]

Make sure the [ISubPalette] line goes before all your buttons and sliders. And don’t forget to name the buttons and sliders using the full path like this:

[ISubPalette,“Zplugin:MyPlugs”,2]
[IButton,“Zplugin:MyPlugs:MyButton”,“Pop up info about this button” ,
[IShowActions,0]
[RoutineCall,sLevel]
,152,.125
]

When you first load your zscript TXT file, ZBrush will create a ZSC file with the same name. In order for your plugin to load automatically every time you start ZBrush, put the ZSC file in the ZBrush 4R7\ZStartup\ZPlugs64 folder. This installs the plugin for ZBrush 64 bit. (To install for ZBrush 32 bit, copy the ZSC file in the ZBrush 4R7\ZStartup\ZPlugs folder.)

HTH,

Hey guys,

Sorry to bring up an old post. I’ve been having trouble getting my plugin to show up on launch and I’m wondering if I’m missing a step somewhere. My steps are:

  1. I wrote a zscript in .txt format
  2. I then ran that script in Zbrush
  3. ZBrush generated a .zsc file from my zscript in the /ZScript folder
  4. I copy and pasted the .zsc file that Zbrush generated into the /ZPlugs64 folder

When I restart Zbrush the plugin does not show up in the ZPlugin tab. The script works when I run it as a script and shows up in the ZPlugin tab with all of the buttons showing up and working. Is there a step here that I’m missing?

Thanks

Can you post the zscript here, or give me a link?

Absolutely,

Thanks MarcusArtifacts.TXT (9.98 KB)

Thanks, that’s useful. Your script buttons are all wrapped inside of a macro button - that was causing the problem.

Artifacts_rev.TXT (9.99 KB)Artifacts_rev.TXT (9.99 KB)

I see, you don’t need the button to generate the .zsc file it gets generated when you load the script up. Thanks so much for looking into this Marcus!! Everything works now.