summaryrefslogtreecommitdiff
path: root/tools/export/blender25
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-12-07 02:04:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-12-07 02:04:20 -0300
commitc79be979d47daae613d1b1bbc732a30a74f56543 (patch)
tree9edaf684a8d3ff47b124d03e04c01f927c197255 /tools/export/blender25
parentf7c9a4a0a8ab770dfe565c31c7c47585beb53594 (diff)
Batch of Bugfixes
-=-=-=-=-=-=-=-=- -Fixed Export UV XForm (should work now). #923 -Fixed enforcement of limits in property editor. #919 -Fixed long-standing bug of export editings in script inheritance. #914, #859, #756 -Fixed horrible error reporting in shader language. #912 -Added kinematic collision with plane (please test well). #911 -Fixed double animation track insert when using 2D rigs. #904 -VKey updates offset parameter in sprite edition. #901 -Do not allow anymore a script to preload itself. (does not fix #899, but narrows it down) -Avoid connection editor from overriding selected text. #897 -Fixed timer autostart. #876 -Fixed collision layers in 3D physics. #872 -Improved operators in shader #857 -Fixed ambient lighting bug #834 -Avoid editor from processing gamepad input #813 -Added not keyword #752 Please test!
Diffstat (limited to 'tools/export/blender25')
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py24
1 files changed, 19 insertions, 5 deletions
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
index 8b1d2e296a..c41b60f2e6 100644
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ b/tools/export/blender25/io_scene_dae/export_dae.py
@@ -1438,11 +1438,16 @@ class DaeExporter:
return tcn
def export_animations(self):
-
+ tmp_mat = [] # workaround by ndee
+ for s in self.skeletons: # workaround by ndee
+ tmp_bone_mat = [] # workaround by ndee
+ for bone in s.pose.bones: # workaround by ndee
+ tmp_bone_mat.append(Matrix(bone.matrix_basis)) # workaround by ndee
+ tmp_mat.append([Matrix(s.matrix_local),tmp_bone_mat]) # workaround by ndee -> stores skeleton and bone transformations
+
self.writel(S_ANIM,0,'<library_animations>')
-
if (self.config["use_anim_action_all"] and len(self.skeletons)):
cached_actions = {}
@@ -1473,13 +1478,18 @@ class DaeExporter:
bones.append(dp)
allowed_skeletons=[]
- for y in self.skeletons:
+ for i,y in enumerate(self.skeletons): # workaround by ndee
if (y.animation_data):
for z in y.pose.bones:
if (z.bone.name in bones):
if (not y in allowed_skeletons):
allowed_skeletons.append(y)
y.animation_data.action=x;
+
+ y.matrix_local = tmp_mat[i][0] # workaround by ndee -> resets the skeleton transformation.
+ for j,bone in enumerate(s.pose.bones): # workaround by ndee
+ bone.matrix_basis = Matrix() # workaround by ndee -> resets the bone transformations. Important if bones in follwing actions miss keyframes
+
print("allowed skeletons "+str(allowed_skeletons))
@@ -1498,16 +1508,20 @@ class DaeExporter:
self.writel(S_ANIM_CLIPS,0,'</library_animation_clips>')
- for s in self.skeletons:
+ for i,s in enumerate(self.skeletons): # workaround by ndee
if (s.animation_data==None):
continue
if s in cached_actions:
s.animation_data.action = bpy.data.actions[cached_actions[s]]
else:
s.animation_data.action = None
+ for j,bone in enumerate(s.pose.bones): # workaround by ndee
+ bone.matrix_basis = tmp_mat[i][1][j] # workaround by ndee -> resets the bone transformation to what they were before exporting.
else:
self.export_animation(self.scene.frame_start,self.scene.frame_end)
-
+
+
+
self.writel(S_ANIM,0,'</library_animations>')
def export(self):