1. #1

    Default Canvas Color Palette (zb3.1 & zb3.5)

    Canvas Color Palette for zb3.5 and zb3.1.

    Like many of you, I loved marcus_civis' ZSwatch plugin. As a scripting exercise I wanted to make my own version with a slightly different twist.

    ccp_ui.jpg

    This plugin drops the active color to a user specified location on the canvas. You can arrange your palette on the top or bottom, left or right side, and orient it horizontally or vertically. You can save and load as many palettes as you wish.

    ccp_screen_highlight.jpg

    Canvas Color Palette use:




    • Using the left hand menu's color picker, or the color picker from the Color menu, select a color.
    • Decide if you would like your palette on the top or bottom. Press your selection: "top" for top or "bot" for bottom. ( Note: zb3.5 will toggle between the selections, zb3.1 will not )
    • Decide if you would like your palette on the left or right. Press your selection: "lf" for left or "rt" for right.
    • Decide if you would like a horizontal or vertical palette. Press your selection: "hor" for horizontal or "vrt" for vertical.
    • *Note* You only have to make the placement selections once, unless you would like to make another palette in a new location.
    • Adjust the "Width" and "Height" sliders to the size patch you would like.
    • Press one of the numbered buttons. Number "0" will place a color in the corner of the canvas, while "9" will place a color towards the middle of the canvas, but still on the edge.
    • Place up to 10 colors in each palette location. "0" overlaps in each corner.
    • As you paint, hover over a color you would like to use. Hit the "c" hotkey ( zb default ) to grab the color of your choice from any of your palettes and keep painting.
    Load/Save/Clear
    • The "Load" button pulls up a dialog box asking for a "zdt" file. If you have saved a palette previously, select it and your palette will load onto the canvas.
    • The "Save" button pulls up a dialog box to save your current palette.
    • *Note* I am using "zdt" because I found that extension in an example Zscript. I don't know if it is a valid ZBrush extension. It's worked for me so far....
    • The "Clear" button clears the canvas. If you have anything else dropped to the canvas, it will clear that too. The active tool stays on the canvas. It also clears the memory, so you can start a fresh palette.
    In the image above I have placed the buttons and sliders into the left hand menu directly under the color picker. To do the same:
    • Go to Preferences -> Custom UI -> Enable Customize
    • Press and hold "ctrl"
    • Drag and drop the button or slider to a new location
    • Repeat for the other buttons and sliders
    • Turn off Enable Customize
    • Save your UI and Config
    I've included a zb3.5 plugin as well as a zb3.1. I've also added the source script in case anyone would like to modify the script for their own use.


    -Toddp
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ccp_zbc_thumb01.jpg 
Views:	339 
Size:	22.5 KB 
ID:	165119  
    Attached Files Attached Files

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    Chicago
    Posts
    122

    Default

    Looks great! I will try it immediately!!!

  3. #3
    Senior Member Follow User Gallery
    Join Date
    Aug 2008
    Location
    Thailand
    Age
    52
    Posts
    1,073

    Default

    Great Color Palette! Thank you so much.

  4. #4
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    45
    Posts
    2,561

    Default

    Great plugin and a neat implementation, thank you Nice touch with the size of the buttons so that they fit in the quick menu (although the left side of my menu is wider )
    Mark

  5. #5

    Default

    Thanks for the enthusiasm. Tell me if it's working for you.

    [color=#9a9a9a]&thumb=1<font color=]ccp_zbc_thumb01.jpg" title="&thumb=1]ccp_zbc_thumb01.jpg">
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ccp_zbc_thumb01.jpg 
Views:	5655 
Size:	22.5 KB 
ID:	165221  

  6. #6
    Senior Member Follow User Gallery
    Join Date
    Nov 2003
    Location
    Chicago
    Posts
    122

    Default

    Works pretty well, thanks!

    I do have a couple of comments though:

    I could not see swatch 0, and I think I finally figured out why: My canvas size is slightly bigger than my screen. is there something in Zscript that can be done to remedy this?

    Also, it would be grand to have more swatches. Perhaps you can build a whole slew of them (50?) into the plugin menu and just let people pull out as many as they like, instead of limiting to 10?

    Is it possible to implement a stack of rows or columns instead of just one strip? perhaps A B C D E toggle buttons, where each letter indicates the next row or column? So if I want to add a 5th swatch to the 3rd column of swatches, I would toggle "C" then press "5"

    At any rate, nice script, thanks so much!!!

  7. #7
    Senior Member Follow User Gallery
    Join Date
    Apr 2006
    Location
    White Beach, Spain
    Posts
    145

    Default

    Do you know wheres the color picker button in ZB? i need to change the default "C" hotkey.

  8. #8
    Member Follow User Gallery
    Join Date
    Feb 2004
    Posts
    53

    Default

    alannoon - Thanks for the feedback.

    - I debated whether to account for a canvas that was larger than could be seen. There are plenty of zscript commands I could have used to place the palettes on screen. Ultimately I decided that it was better if they always appeared in a predictable location on the document even if it was off screen. As soon as the user would zoom out or scroll, new color patches would appear in a new location which was not preferable to me.

    - You can actually have 80 ( less 4 since the corners overlap ) patches of color by selecting a different side or orientation. I purposefully limited the number because I'm storing the data in memory so you can save and load them. Granted 1620 bytes ( 1.5K ) is very small, but I wanted to be minimally intrusive.

    - I thought about rows and columns of patch locations as well, but again wanting to keep things minimal, decided to go with what you see. I may make another version and do exactly as you describe.


    -Toddp

  9. #9
    Member Follow User Gallery
    Join Date
    Feb 2004
    Posts
    53

    Default

    Doqpelganger - I do not know of any equivalent button press that would give you the same functionality as the default "c" hotkey. My guess is that it is something similar to a zscript, but internal to the exe and/or not revealed to the user. I suggest one of the following workarounds:


    • Hover in the rgb/hsv box in the left hand menu. Press and hold the left mouse button. Drag to any location onscreen from which you would like to grab the color. Release the mouse button. The color should now be the active color.
    • Write an equivalent zscript. This may not be a viable solution for some ( many? ). If I have some extra time, I can write one and post it.
    -Toddp

  10. #10
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    A very interesting and useful solution.

    You could add a couple of buttons for color picking so that users could assign their own hotkeys. You need the code below

    [CODE]
    //commands for picking shaded color
    [IFreeze,
    [IKeyPress,ALT,[IClick,3352,[IHPos,3352,1],[IVPos,3352,1],([MouseHPos,1]-[IHPos,3352,1]),([MouseVPos,1]-[IVPos,3352,1])]]
    ]

    //commands for picking unshaded color
    [IFreeze,
    [IClick,3352,[IHPos,3352,1],[IVPos,3352,1],([MouseHPos,1]-[IHPos,3352,1]),([MouseVPos,1]-[IVPos,3352,1])]
    ]
    [/CODE]
    (You might need to change the item ID for ZB 3.1 Mini HSV Color selector, I've a feeling it might be 3331.)

    HTH,

  11. #11
    Senior Member Follow User Gallery
    Join Date
    Jul 2004
    Location
    Switzerland
    Posts
    157

    Default

    Cool Plug in very usefull thank you.
    If you make a color row with the size of 32x32 and then change the size to smaler numbers lets say half the size, then you can ad more colors to your row because the smaler overlay the biger one.

  12. #12
    Member Follow User Gallery
    Join Date
    Feb 2004
    Posts
    53

    Default

    marcus_civis - Thanks for the ideas. I was thinking of using PixolPick, but yours would allow for the shaded color as well.

    zayzcoon - Yes, that was my intention to allow for multiple sizes to overlap. Just be aware that you will only be able to save and load the last patch if multiple patches overlay each other.

    For example:

    • You select "top", "lf", "hor" orientation.
    • You set the patch to be 32x32.
    • You click "5".
    • You select a new color.
    • You adjust the size to be 32x16.
    • You click "5".
    • The script would overwrite ( in memory ) the 32x32 patch. You would see both patches, one on top of the other, but if you saved the palette, only the 32x16 patch would load.
    Another way to save/load overlapping palette patches would be to save the document and load it up in your next session.


    -Toddp

  13. #13
    Senior Member Follow User Gallery
    Join Date
    Aug 2004
    Location
    Boston, Ma
    Age
    35
    Posts
    428

    Default

    This is a very sweet and useful plugin...now no more go back to photoshop to get the colour i used for my models

  14. #14
    Senior Member Follow User Gallery
    Join Date
    Jul 2002
    Location
    Copenhagen
    Age
    45
    Posts
    2,561

    Default

    Doqpelganger - To change the hotkey for picking the main color simply assign a hotkey to the Color > Main Color swatch. This also works for the Secondary Color swatch. Note that you can only pick unshaded colors this way.
    Mark

  15. #15
    Senior Member Follow User Gallery
    Join Date
    Oct 2005
    Location
    Chicago
    Posts
    843

    Default

    Damn, I just found this and it's fantastic! This is exactly what I've been wanting for a long time. I can't believe with all of the powerful texturing tools ZB has, something like this isn't implemented as a base feature already. FYI, this works perfectly on Mac 3.2 as well! Great job!

Page 1 of 3 123 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
  •