PLA with COFFEE

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

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

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 http://www.plugincafe.com/forum/display_topic_threads.asp?ForumID=4&TopicID=242. (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);

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