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

    How to Set Animation Keyframes from a data fle?

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 643 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 15/07/2012 at 04:13, xxxxxxxx wrote:

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

      ---------
      Hello,

      I'm making C++ plugin which enables to set animation keyframes on a C4D scene camera (or an object) from a data file which contains frame, position, rotation, etc, for example:

      Frame, positionX, positionY, positionZ, rotationH, rotationP, rotationB, fovV, fovH
      1, 10.0, 20.0, 14.0, 0.0, 0.0, 0.0, 10, 10
      2, 11.0, 21.0, 14.0, 0.0, 0.0, 1.0, 9, 10
      3, 12.0, 22.0, 14.0, 0.0, 0.0, 2.0, 8, 10
      ...

      I've succeed to read those values but don't know to apply them to a camera object.

      Concerning this, I have no idea what class and what methods I have to refer to.

      Thank you in advance for you kind reply 🙂

      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 15/07/2012 at 06:28, xxxxxxxx wrote:

        For the position and rotation you would use those values to set the camera's global matrix. For the FOV settings, get the camera object's base container and set them in that. Don't forget to call yourcameraobj->Message(MSG_UPDATE) when you're done.

        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 15/07/2012 at 06:43, xxxxxxxx wrote:

          Thanks, spedler for your precious time to answer this question.

          Then I have one more question.

          Is it possible to record the animation keyframes from those value? (like keyframe baking) 🙂

          Thank you for those who read this question.

          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 15/07/2012 at 08:09, xxxxxxxx wrote:

            I'm sure it is possible, but I've never done it so I can't advise much. At a guess you would create a CTrack and add CKeys to it... but I don't know if that's so, or the exact workflow involved.

            Someone here will know, for sure.

            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 15/07/2012 at 09:41, xxxxxxxx wrote:

              On my plugins site there's a C++ plugin called "Quick Steps".
              I include the source code for all of those plugins:https://sites.google.com/site/scottayersmedia/plugins.

              Inside of that plugin code there are a couple of keyframe baking methods that should help you get started with baking keys.

              -ScottA

              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 15/07/2012 at 17:21, xxxxxxxx wrote:

                Thank you very much, spedler for your kind and quick response.

                Your advice was so much helpful to me.

                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 15/07/2012 at 17:23, xxxxxxxx wrote:

                  Thank you for your enormous and marvelous answer for that, ScottA.

                  I've not tried your source code yet, I've already visited your site and downloaded them to analyse and apply to my projects.

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