From 3ada01e557a22b66e1aa515c5bd35a540bf93fb1 Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Thu, 6 Sep 2018 01:17:18 +0300 Subject: [PATCH] BaseFeature: save self type as property for proxy recovery --- lattice2BaseFeature.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lattice2BaseFeature.py b/lattice2BaseFeature.py index 486db9f..c50c558 100644 --- a/lattice2BaseFeature.py +++ b/lattice2BaseFeature.py @@ -105,7 +105,8 @@ class LatticeFeature(object): def __init__(self,obj): # please, don't override. Override derivedInit instead. - self.Type = "latticeFeature" + obj.addProperty('App::PropertyString', 'Type', "Lattice", "module_name.class_name of this object, for proxy recovery", 0, True, True) + obj.Type = self.__module__ + '.' + type(self).__name__ prop = "NumElements" obj.addProperty("App::PropertyInteger",prop,"Lattice","Info: number of placements in the array")