Command plugin click detection



  • On 06/10/2014 at 11:07, xxxxxxxx wrote:

    I can only get this to work with a right click. It's like it's ignoring/over writing my left click commands. Any idea how to fix this?

      
        def Message(self, msg, result) :   
            bc = c4d.BaseContainer()   
      
            left_click = c4d.gui.GetInputState(c4d.BFM_INPUT_MOUSE,c4d.BFM_INPUT_MOUSELEFT, bc)   
            right_click = c4d.gui.GetInputState(c4d.BFM_INPUT_MOUSE,c4d.BFM_INPUT_MOUSERIGHT, bc)   
              
            if left_click:   
                if bc[c4d.BFM_INPUT_VALUE] == 1:   
                   print ("left click")   
                return super(MyDialog, self).Message(msg,result)   
              
            if right_click:   
                if bc[c4d.BFM_INPUT_VALUE] == 1:   
                   print ("right click")   
                return super(MyDialog, self).Message(msg,result)   
    

Log in to reply