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

    Invalid description ID of object

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 471 Views
    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 Offline
      Helper
      last edited by

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

      On 30/12/2009 at 09:57, xxxxxxxx wrote:

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

      ---------
      Hello,

      I have a simple C.O.F.F.E.E - Script and when I pull play, it works fine but if I want to render it, it does not work anymore.

      The script goes between 0 and 100% of an align to spline tag.

      I get that Error:
      COFFFEE ERROR!
      (17) Invalid description ID of object
      File: expression
      Line: 6

      var k=1;  
      main(doc,op)  
      {  
      var Spos;  
      var fosp=op->GetFirstTag();  
      if (fosp#ALIGNTOSPLINETAG_POSITION == 0) k=1;  
      if (fosp#ALIGNTOSPLINETAG_POSITION == 1) k=0;  
      if (fosp#ALIGNTOSPLINETAG_POSITION >= 0 & k==1) Spos=0.02;  
      if (fosp#ALIGNTOSPLINETAG_POSITION <= 1 & k==0) Spos=-0.02;  
      fosp#ALIGNTOSPLINETAG_POSITION=fosp#ALIGNTOSPLINETAG_POSITION+Spos;  
      }
      

      I have the same 'animation' with XPresso via flip-flop and the render is ok.

      What is wrong with ALIGNTOSPLINETAG_POSITION?

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

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

        On 30/12/2009 at 11:12, xxxxxxxx wrote:

        At render Cinema uses a copy of your document.
        (So you can still keep working on your document while rendering)
        That render document has hidden tags, thus "GetFirstTag()" could be anything.

        You need to search for your tag by its ID.
        You might use a function for this like:

          
        GetTheTag(op,type)   
        {   
        var tag = op->GetFirstTag();   
        while (tag){   
        if (tag->GetType() == type) return tag;   
        tag = tag->GetNext();   
        }   
        return NULL;   
        }   
          
        main(doc,op)   
        {   
        var theTag = GetTheTag(op,ID); // ie GetTheTag(op,Taligntospline) or GetTheTag(op,5699)   
        if(!theTag) return;   
        // Your code   
          
        }   
        

        Cheers
        Lennart

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

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

          On 31/12/2009 at 05:30, xxxxxxxx wrote:

          Thank you, but I get the same error.

          Is there an other way to get the tag?

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

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

            On 31/12/2009 at 07:59, xxxxxxxx wrote:

            Maybe, but this is how I and most of us do I think.
            You might check any spelling in the code, sometimes copy and paste can trick you.
            The following works just fine here (having a Cube with an AlignToSpline Tag to it)
            The cube travels back and forth.

              
            GetTheTag(op,type)   
            {   
            var tag = op->GetFirstTag();   
            while (tag){   
            if (tag->GetType() == type) return tag;   
            tag = tag->GetNext();   
            }   
            return NULL;   
            }   
              
            var k=1;   
              
            main(doc,op)   
              
            {   
            var Spos;   
            var fosp=GetTheTag(op,Taligntospline);   
            if(!fosp) return;   
            if (fosp#ALIGNTOSPLINETAG_POSITION == 0) k=1;   
            if (fosp#ALIGNTOSPLINETAG_POSITION == 1) k=0;   
            if (fosp#ALIGNTOSPLINETAG_POSITION >= 0 & k==1) Spos=0.02;   
            if (fosp#ALIGNTOSPLINETAG_POSITION <= 1 & k==0) Spos=-0.02;   
            fosp#ALIGNTOSPLINETAG_POSITION=fosp#ALIGNTOSPLINETAG_POSITION+Spos;   
            }   
            

            Cheers
            Lennart

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

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

              On 01/01/2010 at 05:34, xxxxxxxx wrote:

              Happy New Year,

              Yes you are right. I copy and paste and do not really looked at the syntax. Now it works fine. Thank you.

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