diff options
Diffstat (limited to 'tools/export/blender25')
-rw-r--r-- | tools/export/blender25/io_scene_dae/__init__.py | 5 | ||||
-rw-r--r-- | tools/export/blender25/io_scene_dae/export_dae.py | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tools/export/blender25/io_scene_dae/__init__.py b/tools/export/blender25/io_scene_dae/__init__.py index fe8a383383..29fa6ed114 100644 --- a/tools/export/blender25/io_scene_dae/__init__.py +++ b/tools/export/blender25/io_scene_dae/__init__.py @@ -108,6 +108,11 @@ class ExportDAE(bpy.types.Operator, ExportHelper): description=("Export all actions for the first armature found in separate DAE files"), default=False, ) + use_anim_skip_noexp = BoolProperty( + name="Skip (-noexp) Actions", + description="Skip exporting of actions whose name end in (-noexp). Useful to skip control animations.", + default=True, + ) use_anim_optimize = BoolProperty( name="Optimize Keyframes", description="Remove double keyframes", diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py index 867b0a00e7..801eb7ae4c 100644 --- a/tools/export/blender25/io_scene_dae/export_dae.py +++ b/tools/export/blender25/io_scene_dae/export_dae.py @@ -317,6 +317,7 @@ class DaeExporter: def export_mesh(self,node,armature=None,shapename=None): + mesh = node.data if (node.data in self.mesh_cache) and shapename==None: return self.mesh_cache[mesh] @@ -475,7 +476,12 @@ class DaeExporter: self.writel(S_GEOM,3,'<source id="'+meshid+'-texcoord-'+str(uvi)+'">') float_values="" for v in vertices: - float_values+=" "+str(v.uv[uvi].x)+" "+str(v.uv[uvi].y) + try: + float_values+=" "+str(v.uv[uvi].x)+" "+str(v.uv[uvi].y) + except: + # I don't understand this weird multi-uv-layer API, but with this it seems to works + float_values+=" 0 0 " + self.writel(S_GEOM,4,'<float_array id="'+meshid+'-texcoord-'+str(uvi)+'-array" count="'+str(len(vertices)*2)+'">'+float_values+'</float_array>') self.writel(S_GEOM,4,'<technique_common>') self.writel(S_GEOM,4,'<accessor source="#'+meshid+'-texcoord-'+str(uvi)+'-array" count="'+str(len(vertices))+'" stride="2">') @@ -1156,6 +1162,8 @@ class DaeExporter: for x in bpy.data.actions[:]: if x.users==0 or x in self.action_constraints: continue + if (self.config["use_anim_skip_noexp"] and x.name.endswith("-noexp")): + continue bones=[] #find bones used |