23 from __future__
import print_function
29 argv = argv[argv.index(
"--") + 1:]
41 bpy.ops.object.select_by_type(type=
"MESH")
42 sel_obs = bpy.context.selected_objects[:]
45 bpy.ops.ogre.export(filepath=os.path.join(mesh_dir, name +
'.scene'),
46 EX_COPY_SHADER_PROGRAMS=
False,
50 EX_MESH_OVERWRITE=
False,
54 EX_EXPORT_HIDDEN=
False,
55 EX_FORCE_CAMERA=
False,
60 EX_optimiseAnimations=
False)
63 for ob
in bpy.data.objects:
66 for keyword
in blacklist:
67 if ob.name.find(keyword) != -1:
70 if ob.type !=
'MESH' or skip_mesh ==
True:
74 bpy.ops.object.select_all(action=
"DESELECT")
82 bpy.context.scene.collada_export(filepath=os.path.join(mesh_dir, ob.name +
".dae"), selected =
True, include_uv_textures=
True, include_children=
True)
86 bpy.ops.object.select_all(action=
"DESELECT")
89 bpy.context.scene.objects.active = ob
91 print(
"%s meshes exported." % len(sel_obs))
93 bpy.ops.wm.quit_blender()