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

    read/write keyframes with custom datatype [SOLVED]

    SDK Help
    0
    7
    724
    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

      On 05/05/2015 at 19:14, xxxxxxxx wrote:

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

      ---------
      I have a custom data type, I can read and write it fine to a hyper file, but I don't know how to read and write the data if it is animated.

      so what I want to know is:
      1- detect the animated description "loop over its keys"
      2- read these keys.
      3- write these keys back.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 07/05/2015 at 01:57, xxxxxxxx wrote:

        Hi Mohamed,

        CustomDataType plugins do not need to worry about animation as this is handled by CKey class.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 07/05/2015 at 06:38, xxxxxxxx wrote:

          this means the keyframes will automatically get loaded/saved similar to my CustomDataType?

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 07/05/2015 at 06:56, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            this means the keyframes will automatically get loaded/saved similar to my CustomDataType?

            Yes, if you overload CustomDataTypeClass::InterpolateKeys method and implement it as expected.

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              On 07/05/2015 at 07:14, xxxxxxxx wrote:

              aha, so the data is saved/loaded no matter what, I see from documentation ::InterpolateKeys is just for mixing between keys, which is not the problem right now "I'm just aware of saving all data at different key frames and load them, from what you say and what I understand, it means there is no additional work needed for this, please correct me about this point"

              about my CustomDataType, it is totally dynamic "vector of GeData, dynamic descriptions".
              in this thread, https://developers.maxon.net/forum/topic/8706/11403_huge-problem-with-getddescription-solved , there is a portion of how the description is created.

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                On 07/05/2015 at 07:31, xxxxxxxx wrote:

                Ah yes, if it's just about reading/writing data you're fine without InterpolateKeys().

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  On 16/05/2015 at 21:27, xxxxxxxx wrote:

                  thanks Yannick for the info, everything went fine and keyframes got saved automatically as you mentioned , you can mark this as solved.

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