Last active
December 28, 2015 09:29
-
-
Save traversaro/7479806 to your computer and use it in GitHub Desktop.
Script for extracting meshes from arboris-python collada files
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 bpy | |
#unselect everything | |
# <insert code here, this can vary depending on your situation> | |
bpy.ops.object.select_all() | |
# gather list of items of interest. | |
candidate_list = [item.name for item in bpy.data.objects if (item.name == "l_hand_mesh" or item.name == "l_hand")] | |
# select them only. | |
for object_name in candidate_list: | |
bpy.data.objects[object_name].select = False | |
# remove all selected. | |
bpy.ops.object.delete() | |
# remove the meshes, they have no users anymore. | |
#for item in bpy.data.meshes: | |
# bpy.data.meshes.remove(item) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment