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

    GetInputState

    SDK Help
    0
    4
    391
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 02/12/2003 at 08:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:    Mac  ;  
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hi.

      I want to get mouse status (up, down) in my COFFEE expression. Then I have got following code from SDK documentation, and tried to execute it. But it does not work. What is wrong?

      main(doc,op)
      {
      // Poll the mouse device, left mouse button
      var state = GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT);

      // Check if the mouse button is depressed
      if (state->GetData(BFM_INPUT_VALUE) == 0.0)
           {
                println("mouse up");
           }
      }

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 02/12/2003 at 09:24, xxxxxxxx wrote:

        Hi Toshio,
        this works only for userareas in COFFEE afaik.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 02/12/2003 at 09:29, xxxxxxxx wrote:

          Quote: Originally posted by 3D Designer on 02 December 2003
          >
          > * * *
          >
          > Hi Toshio,
          >
          > this works only for userareas in COFFEE afaik.
          >
          >  
          >
          >
          >
          >
          > * * *

          Thanks, Samir.

          Then what is the "userarea"? I am sorry but please teach me.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 02/12/2003 at 10:01, xxxxxxxx wrote:

            OK, I read bit about the userarea. But my object is detecting mouse status while the mouse is running on the "Editor View".

            I will change my question, and I have to explain why I need it.

            Until the R8.5, expressions were not executed while mouse down. So I could select "10 points" by Live Selection tool without running the expression. And after mouseup, for example, it calcurated center position of them, and moved them to there.

            However from the R8.5, expressions are executed everytime even when mouse down. This means the expression should move points after selecting "2 points", but "10 points".

            In my case (center position), the results becomes completely different, therefore I have to add some code to my expressions to prevent this.

            Then my first idea was disabling the expression if the mouse is down. If someone have better (or possible) ideas, please teach me.

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