diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 88aa2a6f6..c9d99bf92 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -174,6 +174,10 @@ def GetName(obj): ## Sets a name to the object def SetName(obj, name): + if isinstance( obj, Mesh ): + obj = obj.GetMesh() + elif isinstance( obj, Mesh_Algorithm ): + obj = obj.GetAlgorithm() ior = salome.orb.object_to_string(obj) sobj = salome.myStudy.FindObjectIOR(ior) if not sobj is None: