loaded properties are presistant per default

refs #2504

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1325 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Matthias Möller
2015-08-03 13:06:58 +00:00
parent 118ec2f102
commit b6c10de490

View File

@@ -199,7 +199,10 @@ void assignCustomProperty(std::istream& _in, BaseImporter& _bi, Handle _h, const
//get/add property //get/add property
typename Handle2Prop<T,Handle>::PropT prop; typename Handle2Prop<T,Handle>::PropT prop;
if (!_bi.kernel()->get_property_handle(prop,_propName)) if (!_bi.kernel()->get_property_handle(prop,_propName))
{
_bi.kernel()->add_property(prop,_propName); _bi.kernel()->add_property(prop,_propName);
_bi.kernel()->property(prop).set_persistent(true);
}
//read and assign //read and assign
T in; T in;
@@ -211,7 +214,10 @@ void assignCustomProperty(std::istream& _in, BaseImporter& _bi, Handle _h, const
//get/add property //get/add property
typename Handle2Prop<std::vector<T>,Handle>::PropT prop; typename Handle2Prop<std::vector<T>,Handle>::PropT prop;
if (!_bi.kernel()->get_property_handle(prop,_propName)) if (!_bi.kernel()->get_property_handle(prop,_propName))
{
_bi.kernel()->add_property(prop,_propName); _bi.kernel()->add_property(prop,_propName);
_bi.kernel()->property(prop).set_persistent(true);
}
//init vector //init vector
int numberOfValues; int numberOfValues;