auriamg / stk-code

The code base of supertuxkart
Other
0 stars 0 forks source link

Rotated armatures #127

Open auriamg opened 10 years ago

auriamg commented 10 years ago

The track export script and/or the B3D exporter has trouble with rotated armature objects :

http://forum.freegamedev.net/viewtopic.php?p=12711#p12711

Migrated-From: https://sourceforge.net/apps/trac/supertuxkart/t/ticket/171

auriamg commented 10 years ago

Author: auria This is to be done along 2.5 scripts, which are scheduled for 0.7.3 atm

auriamg commented 10 years ago

Author: auria This patch makes it kind of better but we're not there yet :

--- blender_25/stk_track.py (revision 9644)
+++ blender_25/stk_track.py (working copy)
@@ -1074,8 +1074,13 @@
             shape="shape=\"%s\""%shape
         if not ipo: ipo=[]
         # Note: Y and Z are swapped!
-        f.write("  <object type=\"animation\" model=\"%s\" %s %s%s>\n"% \
-                (name, getXYZHPRString(obj), shape, looped))
+        
+        if parent and parent.type=="ARMATURE":
+            f.write("  <object type=\"animation\" model=\"%s\" %s %s%s>\n"% \
+                    (name, getXYZHPRString(parent), shape, looped))
+        else:
+            f.write("  <object type=\"animation\" model=\"%s\" %s %s%s>\n"% \
+                    (name, getXYZHPRString(obj), shape, looped))
         self.writeIPO(f, ipo)
         f.write("  </object>\n")
auriamg commented 10 years ago

Author: hikerstk Not critical for a release, postponing till 0.8

auriamg commented 10 years ago

Author: auria In the end this would appear to be a duplicate of the twisted ghost issue, or the local space export issue.

Leaving it open for now because there is a nice test case in there...