Skip to content

Instantly share code, notes, and snippets.

@splinecraft
Created March 27, 2018 02:20
Show Gist options
  • Save splinecraft/00c5d992ce76bd6974b88f3d3a3df5e3 to your computer and use it in GitHub Desktop.
Save splinecraft/00c5d992ce76bd6974b88f3d3a3df5e3 to your computer and use it in GitHub Desktop.
import pymxs
rt = pymxs.runtime
def delete_similar_named_objs(in_name):
rt.select(rt.objects)
to_delete = []
for s in rt.selection:
if in_name in s.name:
to_delete.append(s) # using rt.delete(s) doesn't get all the objects for some reason
rt.delete(to_delete)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment