Hello,
I’m trying to set some keyframes from C++ by calling the SetAnimCurveKeys commands, but I can’t pass the “paths” argument correctly.
At the moment, I’m doing this:
auto commandBridge = carb::getCachedInterface<omni::kit::commands::ICommandBridge>();
auto iDictionary = carb::getCachedInterface<carb::dictionary::IDictionary>();
carb::dictionary::Item* kwargs = iDictionary->createItem(nullptr, "", carb::dictionary::ItemType::eDictionary);
auto pathsItem = iDictionary->createItem(kwargs, "paths", carb::dictionary::ItemType::eDictionary);
iDictionary->setStringAt(pathsItem, 0, footAttr.GetPath().GetString().c_str());
commandBridge->executeCommand("SetAnimCurveKeys", kwargs);
But I get this error:
[omni.anim.curve.core.scripts.commands] SetAnimCurveKeys: paths
TypeError: Expected None or list, got <class ‘tuple’>.
I checked the Python source code of the SetAnimCurveKeys command, and it expects a list or None. Is there a way to pass the pats argument as a list instead of a tuple?
Thanks
Alan