read/write keyframes with custom datatype [SOLVED]
-
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. -
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.
-
On 07/05/2015 at 06:38, xxxxxxxx wrote:
this means the keyframes will automatically get loaded/saved similar to my CustomDataType?
-
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.
-
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. -
On 07/05/2015 at 07:31, xxxxxxxx wrote:
Ah yes, if it's just about reading/writing data you're fine without InterpolateKeys().
-
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.