diff --git a/src/motionsgenerator.cpp b/src/motionsgenerator.cpp index c577fb1d..7cf47d2d 100644 --- a/src/motionsgenerator.cpp +++ b/src/motionsgenerator.cpp @@ -4,6 +4,7 @@ #include "motionsgenerator.h" #include "posemeshcreator.h" #include "poserconstruct.h" +#include "posedocument.h" MotionsGenerator::MotionsGenerator(RigType rigType, const std::vector *rigBones, @@ -234,7 +235,11 @@ const JointNodeTree &MotionsGenerator::poseJointNodeTree(const QUuid &poseId, in m_poser->reset(); if (frame < (int)frames.size()) { const auto ¶meters = frames[frame].second; - m_poser->parameters() = parameters; + PoseDocument postDocument; + postDocument.fromParameters(&m_rigBones, parameters); + std::map> translatedParameters; + postDocument.toParameters(translatedParameters); + m_poser->parameters() = translatedParameters; } m_poser->commit(); auto insertResult = m_poseJointNodeTreeMap.insert({{poseId, frame}, m_poser->resultJointNodeTree()}); diff --git a/src/posepreviewsgenerator.cpp b/src/posepreviewsgenerator.cpp index 26e6a469..c1bbec03 100644 --- a/src/posepreviewsgenerator.cpp +++ b/src/posepreviewsgenerator.cpp @@ -3,6 +3,7 @@ #include "posepreviewsgenerator.h" #include "posemeshcreator.h" #include "poserconstruct.h" +#include "posedocument.h" PosePreviewsGenerator::PosePreviewsGenerator(RigType rigType, const std::vector *rigBones, @@ -47,7 +48,11 @@ void PosePreviewsGenerator::process() Poser *poser = newPoser(m_rigType, m_rigBones); for (const auto &pose: m_poses) { - poser->parameters() = pose.second; + PoseDocument poseDocument; + poseDocument.fromParameters(&m_rigBones, pose.second); + std::map> translatedParameters; + poseDocument.toParameters(translatedParameters); + poser->parameters() = translatedParameters; poser->commit(); PoseMeshCreator *poseMeshCreator = new PoseMeshCreator(poser->resultNodes(), *m_outcome, m_rigWeights);