Code: Select all
file_name = self.Object.Proxy.Type.get("Type").replace("Fem::", "FEM_")
Shouldn't it?
bernd wrote:
please compare git commit 5829fc4
Moderator: bernd
Code: Select all
file_name = self.Object.Proxy.Type.get("Type").replace("Fem::", "FEM_")
bernd wrote:
Code: Select all
No icon returned for MeshRegion
{'Type': {'Type': 'Fem::FemMeshRegion'}}
Code: Select all
self=App.ActiveDocument.MeshRegion.ViewObject.Proxy
self.Object.Proxy.Type # {'Type': {'Type': 'Fem::FemMeshRegion'}}
self001=App.ActiveDocument.MeshRegion001.ViewObject.Proxy
self001.Object.Proxy.Type # 'Fem::MeshRegion'
Code: Select all
self001.Object.Proxy.Type = 'Fem::MeshRegion'
Code: Select all
def __setstate__(self, state):
#if state:
# self.Type = state
print (self, " ", state)
So, in some of your __getstate__ methods you return an inappropriate dict.<femobjects._FemMeshRegion._FemMeshRegion object at 0x7fe9f97441d0> {'Type': {'Type': 'Fem::FemMeshRegion'}}
<femobjects._FemMeshGmsh._FemMeshGmsh object at 0x7fe9f9610f60> {'Type': 'Fem::FemMeshGmsh'}
<femobjects._FemMeshGmsh._FemMeshGmsh object at 0x7fe9e40420b8> {}
<femobjects._FemMeshRegion._FemMeshRegion object at 0x7fe9e4042240> {}