View Full Version : Finished ZScript : Zwatch color palette
08-16-04, 04:00 AM
This is a little utility that I wrote to learn about ZScripts. It is basically a reworking of a script by Jaycephus here (http://22.214.171.124/zbc/showthread.php?t=8571) (many thanks Jay). My version simply stores a swatch of 30 colors with the ability to save and load other swatches. I post it in case anybody might find it useful.
Edit : A new version is available: see later in this thread.
08-16-04, 09:16 AM
Cool!! I for one will find it very handy as I find the picker doesn't always do exactly what I want and have wish I had something like this for when I am working on a skin texture.
I'm glad to see another zscripter in action :D
Nice utility...and with source too!!!
08-17-04, 01:37 AM
Many thanks for the encouragement!:D
08-19-04, 10:59 PM
I tried your script and everything worked great until I tried to load a saved file. And dang it I just forgot the error it gave me....something about inputs exceeding limits of the script ....something like that.
Now it could be my fault as I was trying to run it within PM and come to think of it I haven't tried loading it first and seeing if it stays active when I go to pm. So I will try that and see what happens first before I bother you more. Sorry, I am tired and brain is a bit foggy.
I think someone posted some lines you can use to make this a plug-in rather than a zscript....I know I saved them and will try to find the link. This would make a great plugin!
i think it is very difficult to turn this script into plugin, because the color are written with SectionBegin, etc.
Maybe with new info from Pixologic...;)
08-20-04, 11:25 PM
Thanks for the heads up Cameyo!
I have been meaning...and well itching lately to look into Zscripting. Was kinda waiting for Pixologic to post their sdk or pdf on scripting and plugins...however they are going to release that info...before I did but I reckon I better get started now in order to catch on to the deluge of info I am sure will come soon!!
Ps. Aminuts fan of Cameyo too! I sure miss Frenchy around here!
08-21-04, 05:04 AM
I'm sorry that you've been having problems. Do you get this error every time you try to load a saved file? If so, have you altered your ZBrush setup from the standard? I've tested the script alongside PM and not had any trouble. Any info you can give me will help.
I've put together a plugin version that loads the script into the ZScript window (as cameyo says, I think it's not possible to have it open the whole time) either by pressing a button under the ZPlugin menu (which can be dragged to where you want) or by using the keyboard hotkey "B" (if this conflicts with one you already use, let me know). I'm working on the script automatically loading a default palette so that you don't have to reload the palette every time... but that's not ready yet...
08-21-04, 09:43 AM
Yeah, I have changed zbrush from standard setup and it did do it everytime. I haven't had a chance to try it the way I mentioned below....am going to shortly. I will also checkout this new one and see if that works any differently for me.
Thanks for taking the time! I know I am gonna use this alot once I get it going!:D
I will let you know what happens.
08-21-04, 10:24 AM
Excellent! Especially for a first Script. One quick suggestion: Why not save the entire active palette each time a color changes? It only takes a second and that way if anyone jumps out of Zwatch, the palette reloaded when they return is absolutely current.
p.s. no problems here on Load and Save.
I just tried the plug-in and, not sure why, but it installs in my SNAPS group, not a separate group called COLOR. Hmm. If you want, send me the script and I'll have a look.
08-21-04, 02:08 PM
Let me know if you have any luck. I confess I've not much idea as to why you're having problems. It may be to do with the way the script identifies the color blocks but if that's the case I would have thought that it wouldn't run at all.
Many thanks for your encouragement! I'd like to do as you suggest with saving the colors... and I'm working on it!:) Have sent you an email with the plugin "load" code. Many thanks for offering to take a look.
Thank you kindly for this script. Being able to see my color swatches helps me pick out which color i need next rather than having to use windows swatch picker.
08-21-04, 09:27 PM
I tried the plugin version when I had a moment earlier and it worked Great!!!! Only suggestion now would be a .....load last palette button so I don't have to go thru the steps to reload it in PM.
I know your new to this but you did a great job here!! And if it's in your scope then cool, if not or not yet.....cool too!.....I have been looking at the script stuff in Z2 lately and ohhh boy....not exactly hard.....but when first looking...a tad overwhelming for me anyway so I can understand the processes you went thru to do this and post it for us to check out!....I applaud you and your first attempt you did a great job!!!:tu: :tu:
And I am going to blow it up with overusage!!!!:D Well I should say I will blow up my dinosaur computer first!!:rolleyes:
oh yeah.... will try your first version again I hope tomorrow to see if I get same results and if so give you any relevant info I can. Chances are if it worked for Sven then I probably did something funky or maybe no mem when I tried to use it or something silly like that. Will let you know!
08-24-04, 11:48 AM
Thanks for your kind words, I'm glad you find it useful.
Glad you got it working! Now there is a new version:
1)A name change.:D I decided that "ZSwatch" would follow convention and be better than the slightly unpronouncable Zwatch.
2) Default palette that is loaded whenever ZSwatch is called. This is changed everytime the open palette is changed so all settings are preserved. If you've loaded a palette those settings are unchanged until you save over it.
3)A "Clear" button for setting the palette to grey. Useful for starting a new palette.
4)Brightness slider. This changes... brightness.:D The setting is preserved with saved files (including default) so that underlying colors are unchaged. (The slider is set to 0 when a color is stored.) There is a reset button to the right of slider.
5) Space for two more sliders.;) Not sure when but I hope to add Hue and Saturation...
NB. Despite my best efforts, palettes saved with the earlier version will not load into this. Sorry about that. If I can resolve this I'll post an update.
I hope its useful!
121 welcome and code is available if you email me...
Edit: version updated
Can you send to me the source?
Only a small hint: try to use [FontSetSizeLarge] to do bigger color buttons...some variations are difficult to see with small color.
08-25-04, 02:40 AM
Thanks!:D The source will be in your mail shortly.
I've just updated it - version 1 (Zwatch) palettes will now load. :) (I made a silly mistake with the code...)
You may be right about the colour rectangle size... I tried to make the whole thing small so that it was easy to use without a lot of scrolling. Perhaps I will make a larger version but I'll have to redo the background image etc...
Nice script Marcus. Looking forward to its evolution;)
09-15-04, 11:17 AM
I am working on an update that complements cameyo's ZColor (http://www.zbrushcentral.com/zbc/showthread.php?p=173136).
10-17-05, 07:28 AM
I am going to try this out today. Does anyone know if there is any other way to save colors in the color palette? Thanks.
10-17-05, 07:35 AM
I recommend you try the latest version of ZSwatch :
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.