Created
March 27, 2018 02:20
-
-
Save splinecraft/00c5d992ce76bd6974b88f3d3a3df5e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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