1. #1
    Senior Member Follow User Gallery
    Join Date
    Nov 2010
    Sydney, Australia

    Default Trying to make ctrl-shift-tab switch from SelectRect to SelectLasso

    Hiya guys, I've been struggling to find a way to stay fast making lots of visibility selections with the SelectLasso and creating polygroups, but I'm working with dynameshes and it's pot luck whether I get that row select when I ctrl-shift-LMB or ctrl-shift-RMB on an existing polygroup. SelectRect doesn't do this, but it's terrible for selecting. SelectLasso is amazing for selecting but is stuck with this row select if you ctrl-shift-click an edge.

    My goal then is to be able to keep ctrl-shift held and hit tab to switch modes (or ideally to turn off the unwanted feature entirely). The problem is, when I assign this macro to ctrl-shift-tab IPress (and also IKeyPress) leaves ZBrush thinking ctrl-shift has been released. Is there a way to change the Brush without losing held down keys just like if I ctrl-shift-lmb click on SelectLasso?

    Thanks guys!


    [IButton,???,"Toggle Select Lasso",

    //[Note, [IModGet, Brush:SelectRect]]
    //does nothing - memory block already exists

    , //else (when memory size is 0 and so doesn't exist)
    [MVarDef,m_lassoStatus, 1]//creates memory block
    [MVarSet,m_lassoStatus, 0, 0]
    ]//end of If command

    [VarSet, lassoStatus, [MVarGet, m_lassoStatus, 0]]
    //[Note, lassoStatus]
    [If, lassoStatus == 0,
    [MVarSet, m_lassoStatus, 0, 1]
    , // [Else]
    [MVarSet, m_lassoStatus, 0, 0]
    ] // [End If]

    ]//end of macro button

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004



    As far as I know, it's not possible to implement your idea exactly as you want. I think part of the problem is how ZBrush interprets hotkey presses associated with macros (and plugins). You need to lift modifier keys like Ctrl and Shift every time you want the hotkey to register.

    The best solution I could think of is a different approach but one that might work OK for you. The macro below will hide the polygroup under the cursor. You don't need to click or anything, just press whichever hotkey you assign to the button while holding the cursor over a polygroup.

    The macro temporarily switches to the SelectRect and then back to the SelectLasso. Note that there isn't a way (that I could find), to record which Select brush is selected, so this will always switch to the SelectLasso after showing the polygroup.

    //ZBrush macro
    [IButton,???,"Show polygroup under cursor",
    ,,.5]//end of macro button


  3. #3
    Senior Member Follow User Gallery
    Join Date
    Nov 2010
    Sydney, Australia


    Amazing as always Marcus! We prob went theough the same tests trying to get the state or the select brushes i tried just looking at stroke too.

    Your hotkey solution is nice, it solves the core problem of reducing multiple clicks down to ome action, plus this is just a sweet tool on its own. It means i can set up mask the group under my mouse too, nice. With a wacom it’s always easy to add a few pixels movement when you tap, this will get rid of a lot of misclicks.

Tags for this Thread

Posting Permissions

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