Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Get ObjectType in xpresso COFFEE node

    SDK Help
    0
    4
    325
    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 04/08/2005 at 05:23, xxxxxxxx wrote:

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

      ---------
      Hi.
      My very first attempt using COFFEE, please be kind 🙂
      For this I am using a COFFE xpresso Node.
      I'm trying to get a 0 or 1 value if a SplineObject is connected to Input1 of a COFFE node. If it is not a SplineObject or if no object is connected then output is 0. If SplineObject is present then output = 1.

      Input1 is a "Link" Output1 is "Real".

      The code so far is:

        
      main()  
        
      {  
      var object = Input1->GetObject();  
        
      if (Input1= OBJECT_SPLINE)  
      {  
      Output1=1;  
      }  
      else Output1=0;  
      }  
      

      This gives "No Errors" in editor. But the COFFE Node doesnt work...
      I am studying the SDK also but this is pretty new to me.

      Cheers
      Lennart

      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 04/08/2005 at 06:23, xxxxxxxx wrote:

        For compares (if, while) use "==", not "=". Common mistake. 🙂

        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 04/08/2005 at 14:26, xxxxxxxx wrote:

          Thanks kuroyume0161!
          I've managed to make my very first cup of Coffe!
          I'll try taking it a step further.
          If Input is Spline, pass a position along it, if not pass vector(0,0,0)
          Wish me luck...
          The code ended up:

          <CODE>
          main()

          {
          var Type = Input1 ->GetType();

          if (Type == OBJECT_SPLINE)

          {
          Output2=TRUE;
          }
          else Output2=FALSE;
          }
          </CODE>

          Cheers
          Lennart

          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 04/08/2005 at 14:58, xxxxxxxx wrote:

            I'm hot! (Well, happy anyway...)

            Input2 and Output2 being vectors.

              
            main()  
              
            {  
            var Type = Input1 ->GetType();  
              
            if (Type == OBJECT_SPLINE)  
              
            {  
            Output1=TRUE;  
            Output2=Input2;  
            }  
            else   
            {Output1=FALSE;  
            Output2=(0.0.0);  
            }  
            }  
            

            Cheers
            Lennart

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