#include <msp/datafile/collection.h>
+#include <msp/fs/utils.h>
#include "keyframe.h"
#include "pose.h"
void KeyFrame::set_pose(const Pose &p)
{
pose = &p;
- pose.keep();
}
add("scaling", &Loader::scaling);
}
+void KeyFrame::Loader::set_inline_base_name(const string &n)
+{
+ inline_base_name = n;
+}
+
void KeyFrame::Loader::pose(const string &n)
{
obj.pose = &get_collection().get<Pose>(n);
- obj.pose.keep();
}
void KeyFrame::Loader::pose_inline()
{
RefPtr<Pose> p = new Pose;
load_sub(*p, get_collection());
- obj.pose = p;
+ get_collection().add((inline_base_name.empty() ? FS::basename(get_source()) : inline_base_name)+".pose", p.get());
+ obj.pose = p.release();
}
void KeyFrame::Loader::position(float x, float y, float z)