+ bool res = false;
+ if(viewer_type != SVTK_Viewer::Type())
+ return res;
+
+ _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toUtf8() );
+ CORBA::Object_var anObj = SMESH::SObjectToObject( obj );
+
+ if ( !CORBA::is_nil( anObj ) )
+ {
+ SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( anObj );
+ if ( ! ( res = !mesh->_is_nil() ))
+ {
+ SMESH::SMESH_subMesh_var aSubMeshObj = SMESH::SMESH_subMesh::_narrow( anObj );
+ if ( ! ( res = !aSubMeshObj->_is_nil() ))
+ {
+ SMESH::SMESH_GroupBase_var aGroupObj = SMESH::SMESH_GroupBase::_narrow( anObj );
+ res = !aGroupObj->_is_nil();
+ }
+ }
+ }
+ return res;