1. #1
    New Member Follow User Gallery
    Join Date
    Jun 2017
    Posts
    5

    Question How to set color values in DefaultZscript?

    Hello!
    I am new at scripting. I`ve been trying to assign black color (as a startup) to Draw: Grid color, but neither Iset nor IColorSet expressions work. Could you, please, help me out with the right expression to do that
    Thank you)

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    4,194

    Default

    I did some to set the background color, link to thread below this post.

  3. #3
    New Member Follow User Gallery
    Join Date
    Jun 2017
    Posts
    5

    Default

    Thank you, Doug!
    After a few trials and errors I realized that color value in this case mist be a single number - 0, instead of 0,0,0 ,as I used to try.

    [ISet,Draw:Grid Color,0]

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

    Default

    Yes, it's a single value. For black this will be 0. But it's not combined RGB but combined RGB/65536. So for specific RGB values you might use code like this:

    [VarSet,gCol,[RGB,254,55,127]]
    [VarDiv,gCol,65536]//divide by 65536
    [ISet,Draw:Grid Color,gCol]



    Also, as I'm sure you know but for the benefit of anyone else reading this, you need to set the RGB FRame slider to 0 to see the grid color:

    [ISet,Draw:RGB Frame,0]


    And also, a good way to find out what's happening for specific interface items is to record a zscript of the actions you want and then look at the resulting text file.

    HTH,

  5. #5
    New Member Follow User Gallery
    Join Date
    Jun 2017
    Posts
    5

    Default

    Thank you, Marcus)

    That is very useful information for my possible future zbrush customization!

Posting Permissions

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