GetInputState



  • 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");
         }
    }



  • 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.



  • 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.



  • 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.


Log in to reply