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:
Cinema 4D Version: R13
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
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
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.
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.
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.
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.
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.
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.