Delete Multiple Attributes


Hi there. I was wondering if there is a command to delete multiple attribute on ShapeNode and on TransformNode on multiple selected objects. This make me crazy because i’m doing this by hand because on Delete Attribute even with multiple selected Attribute, the delete is step by step, one at time. There are hundreds of Attributes.

Thank you in advance


No there isn’t one but like all life’s other problems it can be solved with python :cool:. I wrote a script once for something similar, here’s a quick and dirty hack of it for your purposes. It does NOT convert transforms to shapes (since you want to process attributes on both). Also, if nothing is selected, it automatically looks at ALL transforms and shapes.

import maya.cmds as cmds
from functools import partial

class MassDeleteAttrWindow(object): 
    def __init__(self):
            self.window = 'massDeleteAttrWin'
            self.title = 'Mass Delete Attributes'
            self.size = (600, 800)
    def create(self):
        if cmds.window(self.window, exists=True):
            cmds.deleteUI(self.window, window=True)
        self.window = cmds.window(
            title = self.title,
            widthHeight = self.size
        self.mainForm = cmds.paneLayout(configuration='horizontal3', ps=((1,100,80), (2,100,10)))
        self.uiList = cmds.textScrollList(allowMultiSelection=True)
        self.btnDelete = cmds.button(label='Delete!', command=partial(self.doDelete))
        self.btnRefresh = cmds.button(label='Refresh Selection', command=partial(self.doRefresh))
    def getSelection(self):
        self.selection =
        if self.selection == []:
            self.selection =, shapes=True) 
    def listCustomAttrs(self):
        attrs = []
        for node in self.selection:
            customAttrs = cmds.listAttr(node, ud=True)
            if customAttrs:
        return sorted(list(set(attrs)))
    def doDelete(self, *args):
        attrs = cmds.textScrollList(self.uiList, q=True, selectItem=True)
        for node in self.selection:
            for attr in attrs:
                if cmds.objExists(node) and cmds.attributeQuery(attr, node=node, exists=True):
                    cmds.deleteAttr(node + '.' + attr)
        for attr in attrs:
            cmds.textScrollList(self.uiList, e=True, removeItem=attr)
    def doRefresh(self, *args):
        cmds.textScrollList(self.uiList, e=True, removeAll=True)
        cmds.textScrollList(self.uiList, e=True, append=self.listCustomAttrs())
    def show(self):

win = MassDeleteAttrWindow()


Thank you very much. IS awesome



Just found this… five years later! Awesome code, really a life saver. Thank you so much!


2023 and Autodesk has 0 plans for anymore functionality to apply commands to all selected objects, than what the Attr Spreadsheet editor was made with, 20yrs ago. Something that other apps have had fully functional, for literally decades. Basic functionality is not something anyone should have to code - that is for special-use stuff.