1

Is there an equivalent of the MEL setKeyframe command in the Maya C++ API? It seems to exist for python (maya.cmds.setKeyframe) but I grepped the C++ include directory and didn't find anything relevant. Nor have I found any hints in the SDK documentation.

Avi Ginsburg
  • 10,323
  • 3
  • 29
  • 56
  • Check here http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__cpp_ref_class_m_fn_anim_curve_html – Ale_32 Jan 25 '16 at 13:38
  • [Related question](http://stackoverflow.com/questions/31574938/maya-duplicate-animcurve-in-the-api-c) – DrHaze Jan 25 '16 at 14:26
  • 1
    No the scripting api and the extension api are not equivalent. They have different purposes. You MAY want to read [this](http://www.creativecrash.com/forums/api/topics/new-to-the-api-then-read-this-33) before you go any further. Its old but still as relevant today as it was then. – joojaa Jan 29 '16 at 12:41

1 Answers1

1

Did you tried MFnAnimCurve class ?, it has functions like addKey and addKeyframe() http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__cpp_ref_class_m_fn_anim_curve_html and http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__cpp_ref_class_m_fn_anim_curve_html which will be the one you looking for I think and .. there is a python example in python maya group https://groups.google.com/forum/#!topic/python_inside_maya/0QIopdTL5G0.. Hope that helps

Achayan
  • 5,720
  • 2
  • 39
  • 61