0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

python maya remove all except joints

Posted at
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)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?