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

    Animate Document

    SDK Help
    0
    12
    817
    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 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.

      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 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.

        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 01/07/2004 at 18:46, xxxxxxxx wrote:

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

          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 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 [email protected], or post the code here.

            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 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...

              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 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...

                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 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.

                  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 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?

                    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 04/08/2004 at 17:45, xxxxxxxx wrote:

                      Yes, that would be one way to fake playback.

                      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 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.

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