Fix motion generator
parent
e145793af0
commit
307965e3e8
|
@ -4,6 +4,7 @@
|
|||
#include "motionsgenerator.h"
|
||||
#include "posemeshcreator.h"
|
||||
#include "poserconstruct.h"
|
||||
#include "posedocument.h"
|
||||
|
||||
MotionsGenerator::MotionsGenerator(RigType rigType,
|
||||
const std::vector<RiggerBone> *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<QString, std::map<QString, QString>> translatedParameters;
|
||||
postDocument.toParameters(translatedParameters);
|
||||
m_poser->parameters() = translatedParameters;
|
||||
}
|
||||
m_poser->commit();
|
||||
auto insertResult = m_poseJointNodeTreeMap.insert({{poseId, frame}, m_poser->resultJointNodeTree()});
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "posepreviewsgenerator.h"
|
||||
#include "posemeshcreator.h"
|
||||
#include "poserconstruct.h"
|
||||
#include "posedocument.h"
|
||||
|
||||
PosePreviewsGenerator::PosePreviewsGenerator(RigType rigType,
|
||||
const std::vector<RiggerBone> *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<QString, std::map<QString, QString>> translatedParameters;
|
||||
poseDocument.toParameters(translatedParameters);
|
||||
poser->parameters() = translatedParameters;
|
||||
poser->commit();
|
||||
|
||||
PoseMeshCreator *poseMeshCreator = new PoseMeshCreator(poser->resultNodes(), *m_outcome, m_rigWeights);
|
||||
|
|
Loading…
Reference in New Issue