import maya.cmds as cmds
# Get a list of all objects in the scene
all_objs = cmds.ls()
# Create an empty list to store non-joint objects
non_joints = []
# Check each object and append it to the non_joints list if it is not a joint
for obj in all_objs:
if cmds.nodeType(obj) != 'joint':
non_joints.append(obj)
# Delete all objects in the non_joints list
cmds.delete(non_joints)
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme