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

    PLA with COFFEE

    SDK Help
    0
    4
    328
    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 07/09/2004 at 08:17, xxxxxxxx wrote:

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

      ---------
      Hi all,
      I'm a new COFFEE user and I'm dealing with a problem. I have to create a Point Level Animation for a PolygonObject using COFFEE; my code is something like:

          
          
          
          
          var track = new(PLATrack);
          
          
          
          
          var sequence = new(PLASequence);
          
          
          
          
          var key = new(PLAKey);
          
          
          
          
          var nVtx = op->GetPointCount();  
          var lst = new(array, nVtx);  
          
          
          
          
          
          // Here a loop filling the vertex array
          
          
          
          
           
          
          
          
          
          var tag = new(PointTag);  
          tag->SetData(lst); // THIS IS THE LINE NOT WORKING - IT RETURNS FALSE  
          key->SetPointTag(tag);
          
          
          
          
          var time = new(BaseTime);  
          time->SetFrame(0, 30);  
          key->SetTime(time);
          
          
          
          
          var T1 = new(BaseTime);  
          T1->SetFrame(0, 25);  
          var T2 = new(BaseTime);  
          T2->SetFrame(90, 25);
          
          
          
          
          sequence->SetT1(T1);  
          sequence->SetT2(T2);  
          sequence->InsertKey(key);
          
          
          
          
          track->InsertSequence(sequence);  
          op->InsertTrack(track);
          
          
          
      

      The creation code works well, the PLA track appears in the timeline with the key at the right time. The problem is that no vertex data is attached to the PointTag and so the object's vertices don't move.
      Functions like key->GetPointTag()->GetDataCount() returns 0.
       
      Have some suggestions?...
       
      Thanks
       
      Riccardo

      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 09/09/2004 at 01:47, xxxxxxxx wrote:

        Maybe someone could tell me how do this using the C++ SDK? I saw the COFFEE and C++ SDKs are very similar.
        Thanks...
        Riccardo

        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 10/09/2004 at 14:59, xxxxxxxx wrote:

          The question has been answered before in the thread https://developers.maxon.net/forum/topic/919. (Found this by searching for PLAKey.)
          Basically you need to use the VariableChanged trick to increase the point count of the new key:

              
              
                var vc = new(VariableChanged);    
                vc->Init(0, nVtx);    
                key->Message(MSG_POINTS_CHANGED,vc);
          
          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 13/09/2004 at 02:27, xxxxxxxx wrote:

            Thanks a lot Mikael, it works fine...
             
            Riccardo

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