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

    Exporting animation not working in R12

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 208 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 08/02/2011 at 03:20, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      The code I'm using to export animation tracks (rotation, translation and scale) is not working anymore in R12...

      I always have the same value returned whatever time I use.

      It's like this :

        
      BaseObject *op (parameter of the function)   
      BaseTime time;   
      float lastfr=doc->GetMaxTime().GetFrame(doc->GetFps());   
      float firstfr=doc->GetMinTime().GetFrame(doc->GetFps());   
      float fps=(float)doc->GetFps();   
      float starttime=0.0f;   
      float endtime=(lastfr-firstfr)/fps;   
      for(float curtime=0.0f;curtime<=endtime;curtime+=(1/25.0f))   
      {   
          time.SetNumerator(curtime);   
          time.SetDenominator(1.0f);   
          nafx.doc->AnimateObject(op,time,ANIMATEFLAGS_NO_PARTICLES);   
        
          myfile<<op->GetRelPos().x<<" "<< op->GetRelPos().x <<" "<< op->GetRelPos().x;   
          myfile<<op->GetRelRot().x<<" "<< op->GetRelRot().x <<" "<< op->GetRelRot().x;   
          myfile<<op->GetRelScale().x<<" "<< op->GetRelScale().x <<" "<< op->GetRelScale().x;   
      }   
      

      Any idea ?

      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 08/02/2011 at 03:32, xxxxxxxx wrote:

        How is the object animated, by tracks or by expressions?

        cheers,
        Matthias

        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 08/02/2011 at 03:52, xxxxxxxx wrote:

          All objects are animated by tracks.

          Regards,

          Gil

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