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

    Setting ID_BASEOBJECT_COLOR?

    SDK Help
    0
    4
    429
    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 10/09/2007 at 15:42, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.111 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      I want to color a null object and a spline that the user links into my expression. I tried like this (for the null object) :

        
      Vector Target_Color(1,1,0);  
      Real Target_Radius = 25.0;  
        
      BaseObject     *SC_TargetObj = tag->GetData().GetObjectLink(TARGET_OBJ, doc);  
        
      SC_TargetObj->GetDataInstance()->SetLong(NULLOBJECT_DISPLAY, NULLOBJECT_DISPLAY_CIRCLE);  
      SC_TargetObj->GetDataInstance()->SetReal(NULLOBJECT_RADIUS, Target_Radius);  
      SC_TargetObj->GetDataInstance()->SetLong(ID_BASEOBJECT_USECOLOR, ID_BASEOBJECT_USECOLOR_ALWAYS);  
      SC_TargetObj->GetDataInstance()->SetVector(ID_BASEOBJECT_COLOR, Target_Color);  
      

      Setting NULLOBJECT_DISPLAY and NULLOBJECT_RADIUS works fine. The null object gets a cirle with the appropriate radius. But with ID_BASEOBJECT_USECOLOR and ID_BASEOBJECT_COLOR, nothing happens. No error message, but also no color.

      What's my mistake? Thanks for any help.

      Greetings,
      Jack

      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 11/09/2007 at 06:01, xxxxxxxx wrote:

        Is this the right way to put data into ID_BASEOBJECT_COLOR, anyway? How would you do this? Is there any example code in one of the example plugins?

        Regards,
        Jack

        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 11/09/2007 at 08:17, xxxxxxxx wrote:

          Try this instead for the last two values:

          SC_TargetObj->SetParameter(DescID(ID_BASEOBJECT_USECOLOR),GeData(ID_BASEOBJECT_USECOLOR_ALWAYS),0L);    
          SC_TargetObj->SetParameter(DescID(ID_BASEOBJECT_COLOR),GeData(Target_Color),0L);

          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 11/09/2007 at 10:25, xxxxxxxx wrote:

            And that's totally correct.
            Thanks again for a very helpful post!

            Greetings,
            Jack

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