Animate Document



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

    On 25/06/2004 at 06:03, xxxxxxxx wrote:

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

    ---------
    Hi,
    I want to call "Navigation->Play Forwards" function under the Timeline. Is AnimateDocument() the function to use? But when I call doc->AnimateDocument(ANIMATE_QUICK) nothing seems to happen. I have already put all the tracks and keys inside the timeline. Can any one tell me how should I proceed?



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

    On 28/06/2004 at 01:09, xxxxxxxx wrote:

    Did you try without ANIMATE_QUICK?



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

    On 28/06/2004 at 02:33, xxxxxxxx wrote:

    Hi Mikael,
    I am trying something like this.
    1. For each object in the document
             1.a) Create Visibility Track + Sequence + Visibility Keys
    After this loop is finished... I put the following statements...

        
        
        
        
        doc->AnimateDocument(ANIMATE_QUICK);  
        doc->Message(MSG_UPDATE);  
        GeEventAdd(REDRAW_ALL);  
        
        
        
        
    

    Here instead of ANIMATE_QUICK I tried all other parameters also, but its not working. Do I have to put these statements inside the track creation loop? I am not very clear about this AnimateDocument function...
    Looking forward ur reply. Thanks.
    Rgds, Charles.



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

    On 30/06/2004 at 21:31, xxxxxxxx wrote:

    I cannot confirm this bug. This code seems to work fine in 7.303, executed in a menu plugin:

        
        
        var obj = doc->GetFirstObject();  
        var track = new(VisibilityTrack);  
        var seq = new(VisibilitySequence);  
        var key = new(VisibilityKey);  
        var bc = key->GetContainer();  
        bc->SetData(VISIBILITYKEY_VALUE, 0);  
        key->SetContainer(bc);  
        seq->InsertKey(key);  
        track->InsertSequence(seq);  
        obj->InsertTrack(track);  
        GeEventAdd(DOCUMENT_CHANGED);  
        doc->AnimateDocument(ANIMATE_QUICK);
    

    Note that values other than 0.0 of visibility doesn't make any difference in the editor, only when rendered.



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

    On 01/07/2004 at 18:46, xxxxxxxx wrote:

    Mikael shall I email you my source code to find out the pbm?



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

    On 04/07/2004 at 21:32, xxxxxxxx wrote:

    The best would be if you could use the working code posted to see what's different in your code, and see if that explains the error. Failing that, please remove as much code as possible, while still making sure the error is reproducable, and send the project to sdk_support@maxon.net, or post the code here.



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

    On 19/07/2004 at 19:36, xxxxxxxx wrote:

    Mikael,
    I tried to create a simple menu plugin with the sample code you have given. But still I cannot see the animation. At the same time, creation of visibility track and parameters are okay. Here is the code that I used, and I am using XL V7.303

        
        
        
        
          
        // Testing Plug-in ID... 
        
        
        
        
        var PLUGIN_ID = 999999;
        
        
        
        
        class mnuAnimation: MenuPlugin  
        {  
         public:  
          mnuAnimation();  
          GetID();   
          GetName();   
          GetHelp();   
          Execute(doc);  
        }
        
        
        
        
        mnuAnimation::mnuAnimation()   
        {   
         super();   
        }
        
        
        
        
        mnuAnimation::GetID()    
        {   
         return PLUGIN_ID;  
        }
        
        
        
        
        mnuAnimation::GetName()        
        {   
         return "Animate";   
        }
        
        
        
        
        mnuAnimation::GetHelp()        
        {}
        
        
        
        
        mnuAnimation::Execute(doc)  
        {   
         //Sample code from Mikael... 
        
        
        
        
         var obj = doc->GetFirstObject();  
         var track = new(VisibilityTrack);  
         var seq = new(VisibilitySequence);  
         var key = new(VisibilityKey);  
         var bc = key->GetContainer();  
         bc->SetData(VISIBILITYKEY_VALUE, 0);  
         key->SetContainer(bc);  
         seq->InsertKey(key);  
         track->InsertSequence(seq);  
         obj->InsertTrack(track);  
         GeEventAdd(DOCUMENT_CHANGED);  
         doc->AnimateDocument(ANIMATE_QUICK);
        
        
        
        
        }
        
        
        
        
        main()  
        {  
         Register(mnuAnimation);  
        }  
        
    

    When I call run this, nothing is happening in the time palette. In fact, the time bar should start to move right, which is not happening...
    Looking forward your help...



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

    On 26/07/2004 at 19:06, xxxxxxxx wrote:

    Hi Mikael,
    Hope you'ld have gone thro' the code I sent. Is there any news for me? Sorry to distrub you Mikael. For me the code looks fine but I couldnt get the result. So looking forward your views...



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

    On 31/07/2004 at 04:10, xxxxxxxx wrote:

    AnimateDocument() simply animates the current frame. There's no way that I can see to start actual animation playback, like if you pressed the play buttton, especially not from C.O.F.F.E.E.



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

    On 03/08/2004 at 19:02, xxxxxxxx wrote:

    Mikael,
    Am I correct to say that I have to loop thro' all the frames one by one and call AnimateDocument() function to achieve my target?



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

    On 04/08/2004 at 17:45, xxxxxxxx wrote:

    Yes, that would be one way to fake playback.



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

    On 04/08/2004 at 18:36, xxxxxxxx wrote:

    Oh ok Mikael, Thanx. I'll try for that.
    But what I feel, this is one of the basic function we should have in our SDK. Hope in C++ SDK we have this. If not, in up coming versions, SDK should come with this function.


Log in to reply