8 #ifndef LIBALMATH_ALMATH_SCENEGRAPH_QIANIM_SURGEON_H
9 #define LIBALMATH_ALMATH_SCENEGRAPH_QIANIM_SURGEON_H
11 #include <almath/api.h>
13 #include <boost/range/algorithm/for_each.hpp>
80 template <
typename Keys>
82 auto cur = boost::begin(keys);
83 if (cur == boost::end(keys))
88 while (next != boost::end(keys)) {
97 template <
typename Keys>
101 boost::for_each(keys,
108 namespace ActuatorCurve {
141 auto &attr = curve.get_child(
"<xmlattr>");
143 attr.erase(
"recordable");
boost::optional< T > optional
ALMATH_API void migrate_v1_to_v2(ptree &tangent, float max_abs_abscissa, Side side)
ALMATH_API void convert_unit(ptree &curve, Unit to, Unit from)
ALMATH_API void offset_frame(ptree &key, int value)
void migrate_v1_to_v2(ptree &curve)
ALMATH_API void put_fps(ptree &pt, int fps)
ALMATH_API ptree v2_root_from_xar_timeline(const ptree &xar_timeline)
ALMATH_API void migrate_tangents_v1_to_v2(optional< const ptree & > prev_key, ptree &key, optional< const ptree & > next_key)
ALMATH_API void migrate_smooth_symmetrical_v1_to_v2(ptree &key)
ALMATH_API ptree v2_root_from_v1_root(const ptree &v1_root)
boost::property_tree::ptree ptree
void migrate_xar_to_v2(ptree &curve, int fps)
ALMATH_API void fix_missing_unit(ptree &curve, bool verbose=false)
ALMATH_API std::vector< ptree > v2_roots_from_xar(const ptree &docroot)
void migrate_v1_to_v2(Keys keys)
auto get_keys(const ptree &pt) -> boost::select_second_const_range< decltype(boost::adaptors::filter(pt, Key::is_key))>