ZBrushCentral

Question:load and display a Image in the subpalette

Excuse me, I am learning the zscript,I want to do a plug-in(for painting color).

The first functional, I will add a new subpalette on the Zplugin palette, click on the Zplugin palette to unfold it, there is a/more picture in it.
For Example:Snap2.jpg


I Use the ‘Image’ Command— It will load and display a Image in the zscript window ,
For Example:[Image,Color dish1.psd,1]

Now I can only display the picture in the Zscript window, I hope that it can be able to display on the[color=orange] ‘Color Mixer’ subpalette( Zplugin palette) , so that I can drag it to any location(except canvas)

How to write it?:slight_smile: Thank you very much!!!

Hi tdrs,

The only way you can have a picture in a plugin subpalette is by assigning an image to a plugin button. You put the file name in the ‘icon’ part of the IButton command:
http://www.zbrush.info/docs/index.php/ZScript_Command_Reference#Buttons_and_Sliders

Unfortunately. there’s no way to update this to a different image. So it’s no good for loading different color swatches during a ZBrush session or things like that. :frowning:

For more information on ZPlugins see here:
http://www.zbrush.info/docs/index.php/ZPlugin_Interfaces

marcus_civis:
Hi,Thanks for your help.I have already seen the Command.

[IButton, Button name, Popup info Text, Commands group to execute when button is pressed, Initially Disabled? (0:Enabled(ByDefault) NonZero:Disabled),

I do not understand this part of the contents.Can you give me a complete sample ?

My code,For Example:

//ZBRUSH Zplugin - Recorded in ZBrush version 3.1
[IShowActions,0]
[IConfig,3.1]
[ISubPalette,“Zplugin:Color Mixer”]
[IButton,“Zplugin:Color Mixer:Color disk”,“Color disk 1”,[Ipress,Zoom:AA half],“0”,“0”,“Alt+5”,“ZBRUSH_\ZStartup\ZPlugs\color.bmp”,“0”]
[IButton,“Zplugin:Color Mixer:Color disk”,“Color disk 2”,[Ipress,Zoom:Actual],“0”,“0”,“Alt+6”,“ZBRUSH_\ZStartup\ZPlugs\3.bmp”,“0”]
]
Some paragraphs of orange is not quite correct.:cry:

Hi tdrs,

Try this code instead. Note that where numerical values are used there are no “” around them. Also the hotkeys are indicated slightly differently. You should also give your buttons different names as otherwise they may not all appear.


[IConfig,3.1]

[ISubPalette,"Zplugin:Color Mixer"]

[IButton,"Zplugin:Color Mixer:Color disk 1","Color disk 1",
[IShowActions,0]
[Ipress,Zoom:AA half]
,0,0,ALT+'5',"ZBRUSH_\ZStartup\ZPlugs\color.bmp",0]

[IButton,"Zplugin:Color Mixer:Color disk 2","Color disk 2",
[IShowActions,0]
[Ipress,Zoom:Actual]
,0,0,ALT+'6',"ZBRUSH_\ZStartup\ZPlugs\3.bmp",0]

HTH,

Thank you very much!!!!!:+1: :+1: :+1: :+1: :+1: