diff --git a/src/Mod/Fem/femguiobjects/ViewProviderFemConstraint.py b/src/Mod/Fem/femguiobjects/ViewProviderFemConstraint.py index 995827c86f..9ac32cc9ed 100644 --- a/src/Mod/Fem/femguiobjects/ViewProviderFemConstraint.py +++ b/src/Mod/Fem/femguiobjects/ViewProviderFemConstraint.py @@ -97,8 +97,7 @@ class ViewProxy(object): FreeCAD.Console.PrintError(message + "\n") return True - def __getstate__(self): - return None - + # a few objects had this method in their class before the move to this base class + # these objects will give a setAttr failed error on document loading without this method def __setstate__(self, state): return None diff --git a/src/Mod/Fem/femobjects/FemConstraint.py b/src/Mod/Fem/femobjects/FemConstraint.py index 56001fe94b..2a962c2a19 100644 --- a/src/Mod/Fem/femobjects/FemConstraint.py +++ b/src/Mod/Fem/femobjects/FemConstraint.py @@ -37,4 +37,10 @@ class Proxy(object): self.Object = obj # keep a ref to the DocObj for nonGui usage obj.Proxy = self # link between App::DocumentObject to this object + # a few objects had this method in their class before the move to this base class + # these objects will give a setAttr failed error on document loading without this method + def __setstate__(self, state): + if state: + self.Type = state + ## @}