1. #1
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default Cycling through SelectionTools

    EDIT: Whups. Wrong Forum. Can this be moved to the Scripting Help Section. Sorry about that !

    Hey,
    trying to adapt Marcus's ToggleBrush Script to cycle through all of Zbrushs ever increasing Mask Selection Modes (Lasso, Rectangle, Curve etc.) with one hotkey. The way I see it (novice ...) I just need to add more cycles to the original Macro.
    Now the question is why can't I store Selection Modes with the IGet,Brush:Item Info and what do I need to use instead ?



    Thanks for reading.
    Jens
    Last edited by campi; 10-04-11 at 07:48 AM.
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  2. #2
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default

    Ok, badly phrased - let me try again:

    "Item Info" will return me the currently active Brush. However the currently "active" (even if not currently used via ctrl) Mask Mode (Item Info 43-48) will only be revealed by Zbrush once Ctrl has been pressed.

    Following the "Toggle Brush" macro Sample from Marcus I want to find out the currently "active" Mask Mode and then cycle through the brush infos upwards. So if Item 46 is active (once again - only once Ctrl is pressed) it would go 47,48 and then jump back to 43.

    But how do I find the currently active Mask Mode via the "Item Info" without pressing CTRL first ?
    Last edited by campi; 10-05-11 at 07:03 AM.
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  3. #3
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,671

    Default

    If you want to cycle through several brushes you don't really need to store the selection, you just declare a list of the brushes and then have an index variable which is incremented each time so the next in the list is chosen.

    The attached macro shows the method. You could add any number of brushes to the list if you wanted, though I'm not sure how useful that would be.

    There is a minor drawback: the first time you use the hotkey you'll get a message about the brush being 'selected as the active mask brush'. So long as you choose the 'skip' option this won't show again.

    Download: CycleMaskBrushes.txt


    Edit: I'm not sure it is possible to get the current Mask Brush selection through zscript (at least, I haven't found a way).

    HTH,

  4. #4
    Senior Member User Gallery
    Join Date
    Feb 2007
    Location
    Wellington, NZ
    Posts
    157

    Default

    Works flawlessly. So much for my Zscript Try-Out
    You should put that in the Small & Useful ZScript Section ! Very handy.
    Jens Kafitz
    Sr. Texture Artist, Weta Digital


  5. #5
    Senior Member User Gallery
    Join Date
    Jul 2003
    Location
    Budapest, HUN
    Posts
    522

    Default

    By the way i sthere any script to switch between the last used and current brushes?
    Cheers,


    Szabolcs Matefy "Jester"

    Senior Character Artist
    Crytek Budapest

    Certified Softimage Trainer

  6. #6
    Moderator User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    7,671

    Default

    Quote Originally Posted by Jester View Post
    By the way i sthere any script to switch between the last used and current brushes?
    Not as such (it's not possible to record the current brush using zscript) but there is a 'favourite brush toggle' which you may find useful : Useful-small-ZScripts-and-Macros : Brush Toggle

  7. #7
    Senior Member User Gallery
    Join Date
    Jul 2003
    Location
    Budapest, HUN
    Posts
    522

    Default

    Thanks! I give it a try!
    Cheers,


    Szabolcs Matefy "Jester"

    Senior Character Artist
    Crytek Budapest

    Certified Softimage Trainer

Posting Permissions

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