Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Cannot figure out how to delete a selected set

Cannot figure out how to delete a selected set

jforri20
Community Visitor Community Visitor
7,039 Views
4 Replies
Message 1 of 5

Cannot figure out how to delete a selected set

jforri20
Community Visitor
Community Visitor

I have been polymodleing with the 3 orthographic views and image planes. I'm trying to keep my work space as clean as possible but I keep having these selected sets pop up and I cant get rid of them. I started a brand new scene and created a simple cube, then added extra subdivisions and an image plane. Finally I selected the Image Plane and the top faces of the cube and isolated them. Now I have a new set called "modelPanel4ViewSelectedSet" and there are copies of the object and the image plane inside, but i cannot delete it even after taking out the copies (they vanish into thin air when pulled out). When I try I get: "//Error: file: C:/Progr.../doDelete.mel line 111: Non-deletable node 'modelPanel4ViewSelectedSet' cannot be deleted."

 

I'm sure there is a simple solution, I have little education with Maya and it's mostly self taught so if someone knows what is going on and what these sets are I would appreciate it greatly. I have never posted on the forum as most of the issues I run into I can find help with but cant find any on this topic and I just lost a days work of modeling so here I am lol.

0 Likes
7,040 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

Hey @jforri20,

The set which is created during 'isolate select' is Non-deletable node. When you come out from your isolation mode automatically the set will be gone.

The set is useful for having a selection of something(like meshes, faces etc.). These manually created sets you can edit.

For more info: https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Bas...

Message 3 of 5

aine_meehan
Community Visitor
Community Visitor

thanks for this. I also had this question. 

0 Likes
Message 4 of 5

wynand.lens
Explorer
Explorer

Yeah Mine is always there. It creates a new one when I go into isolate selection mode. How do I get rid of it? Also, LightEditorRoot, thats new right? Cluttering up my outliner...

 

 

 

0 Likes
Message 5 of 5

2425217248
Explorer
Explorer

不知道你是否解决了这个问题,我今天遇到了同样的情况,这个帖子好像还没有答案,为防万一我把我的代码留在这里给再遇到这个问题的人一些帮助,使用之前请保存文件

# 2024/08/19
# @TuTu
# Select the node you need to delete and put this code into python and click run
import maya.api.OpenMaya as om
import maya.cmds as cmds
def delete_mobject_by_name(node_name):
    try:
        cmds.sets(clear=node_name)
        sel_list = om.MSelectionList()
        sel_list.add(node_name)
        node = sel_list.getDependNode(0)
        dag_mod = om.MDagModifier()
        dag_mod.deleteNode(node)
        dag_mod.doIt()
        om.MGlobal.displayInfo("success")
    except Exception as e:
        om.MGlobal.displayError("error")
_dellist = cmds.ls(sl=1)
for i in _dellist:
    delete_mobject_by_name(i)