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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Check InputState in COFFEE [CLOSED]

    SDK Help
    0
    2
    204
    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
      Helper
      last edited by

      On 08/06/2015 at 06:22, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hello, 
      I am trying to check if a modifierkey is pressed when I run a coffee Script.

      I tried this code:

      var bc = new(BaseContainer);
      	var state = bc->GetInputState(BFM_INPUT_KEYBOARD, BFM_INPUT_CHANNEL);
        
      

      But That doesnt work.

      With Python I use this Code which Works:

      bc = c4d.BaseContainer()
          if c4d.gui.GetInputState(c4d.BFM_INPUT_KEYBOARD,c4d.BFM_INPUT_CHANNEL,bc) :
              print "Qualifier Bitwise:",bc[c4d.BFM_INPUT_QUALIFIER]
        
      
      

      Is there a way to check if a modifierkey is pressed when the Coffee-script gets fired?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 08/06/2015 at 09:03, xxxxxxxx wrote:

        Hi Holger,

        I'm afraid the good old COFFEE SDK provides no means to simply get the input state of an input device.
        The only functions in there are in the GeUserArea class. And you probably don't have a dialog to make use of it.
        By the way, you are trying to call GetInputState() on a BaseContainer. That is bound to fail, even if there were functions to achieve something like this.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post