Skip to content

Instantly share code, notes, and snippets.

@Roumenov
Last active September 13, 2019 20:15
Show Gist options
  • Save Roumenov/8e8a8d25d43c5ce44f41c996be65c714 to your computer and use it in GitHub Desktop.
Save Roumenov/8e8a8d25d43c5ce44f41c996be65c714 to your computer and use it in GitHub Desktop.
loading and deleting shelves with pathSetup commands.
import vo_maya
reload(vo_maya)
for item in os.listdir(vo_maya.VO_SHELF_PATH):
#shelf names looke like 'shelf_vo_polyTools.mel'
shelf_name = 'vo_' + item.split('_')[2].replace('.mel','')
print(shelf_name)
ps.delete_shelf(shelf_name)
shelf_path = os.path.normpath(os.path.join(vo_maya.VO_SHELF_PATH,item)).replace('\\', '/')
ps.load_shelf(shelf_path)
print(item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment