1. #1
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,730

    Default Finished ZScript : Zwatch color palette

    Hi All,

    swatch.jpg

    This is a little utility that I wrote to learn about ZScripts. It is basically a reworking of a script by Jaycephus here (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.

    121 welcome.

    Edit : A new version is available: see later in this thread.

    Cheers,
    Marcus
    Attached Files Attached Files
    Last edited by marcus_civis; 08-24-04 at 11:53 AM.

  2. #2
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    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.


    Thanks!!

  3. #3
    Senior Member User Gallery
    Join Date
    Apr 2001
    Location
    ITALY
    Posts
    1,270

    Default

    I'm glad to see another zscripter in action

    Nice utility...and with source too!!!

    Go on.

    cameyo

  4. #4
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,730

    Default

    Many thanks for the encouragement!

    Marcus

  5. #5
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    Hi marcus


    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!

  6. #6
    Senior Member User Gallery
    Join Date
    Apr 2001
    Location
    ITALY
    Posts
    1,270

    Default

    Aminuts,
    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...

    cameyo

  7. #7
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    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!

  8. #8
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,730

    Default

    Hi aminuts,

    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...

    HTH,

    Marcus
    Attached Files Attached Files

  9. #9
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    hi Marcus,

    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!

    I will let you know what happens.

  10. #10
    Senior Member User Gallery
    Join Date
    Jan 2003
    Location
    NYC
    Posts
    1,625

    Default

    Hi Marcus,

    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.

    Keep Scripting!

    Sven

    p.s. no problems here on Load and Save.

    [edit]
    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.
    Last edited by Svengali; 08-21-04 at 11:01 AM.

  11. #11
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,730

    Default

    Hi aminuts,
    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.

    Hi Sven,
    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.

    Marcus

  12. #12
    New Member User Gallery
    Join Date
    Aug 2004
    Posts
    1

    Thumbs up Thanks!

    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.

  13. #13
    Senior Member User Gallery
    Join Date
    Dec 2003
    Location
    Chicago
    Posts
    5,537

    Default

    woohoo Marcus,


    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!!!

    And I am going to blow it up with overusage!!!! Well I should say I will blow up my dinosaur computer first!!


    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!

  14. #14
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,730

    Default Update, including new name... ZSwatch

    ZSwatch.jpg

    Hi Zeph,

    Thanks for your kind words, I'm glad you find it useful.

    Hi aminuts,

    Glad you got it working! Now there is a new version:

    1)A name change. 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. 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

    Marcus
    Attached Files Attached Files
    Last edited by marcus_civis; 08-25-04 at 02:35 AM.

  15. #15
    Senior Member User Gallery
    Join Date
    Apr 2001
    Location
    ITALY
    Posts
    1,270

    Default

    Very good!!!!

    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.

    cameyo

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •