X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fsavecanvas.cpp;h=af459cb0f50b1b206e2bd6e5bcdcdb25fd69964e;hb=b890431f7577909e7c5887b21b0456267ce1faa4;hp=768219551e9f3a05c6bc3d03d41e9303e56de269;hpb=1967f77108f0b1e1e00b4ed81ad636c50ccb351a;p=synfig.git diff --git a/synfig-core/src/synfig/savecanvas.cpp b/synfig-core/src/synfig/savecanvas.cpp index 7682195..af459cb 100644 --- a/synfig-core/src/synfig/savecanvas.cpp +++ b/synfig-core/src/synfig/savecanvas.cpp @@ -92,10 +92,12 @@ xmlpp::Element* encode_keyframe(xmlpp::Element* root,const Keyframe &kf, float f } -xmlpp::Element* encode_real(xmlpp::Element* root,Real v) +xmlpp::Element* encode_real(xmlpp::Element* root,Real v, bool s=false) { root->set_name("real"); root->set_attribute("value",strprintf(VECTOR_VALUE_TYPE_FORMAT,v)); + if(s) + root->set_attribute("static", s?"true":"false"); return root; } @@ -212,7 +214,7 @@ xmlpp::Element* encode_value(xmlpp::Element* root,const ValueBase &data,Canvas:: switch(data.get_type()) { case ValueBase::TYPE_REAL: - return encode_real(root,data.get(Real())); + return encode_real(root,data.get(Real()), data.get_static()); case ValueBase::TYPE_TIME: return encode_time(root,data.get(Time())); case ValueBase::TYPE_INTEGER: