Skip to content

Instantly share code, notes, and snippets.

@MitchellKehn
Last active July 12, 2018 00:01
Show Gist options
  • Save MitchellKehn/ee13a031566de117080e510d74a88212 to your computer and use it in GitHub Desktop.
Save MitchellKehn/ee13a031566de117080e510d74a88212 to your computer and use it in GitHub Desktop.
Select all objects in a read geo scene based on whether or not they have a specific substring in their name
search = str(nuke.getInput("select items with this in their name:"))
for node in nuke.selectedNodes("ReadGeo2"):
scene_view = node['scene_view']
all_items = scene_view.getAllItems()
scene_view.setSelectedItems([item for item in all_items if item.find(search) >= 0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment