Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Command plugin click detection

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 148 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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)   
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post