supertuxkart-sourceforge-migration / stk-migration-test2

0 stars 0 forks source link

Rotated armatures #171

Open supertuxkart-sourceforge-migration opened 10 years ago

supertuxkart-sourceforge-migration commented 10 years ago

Author: auria

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/ticket/171

supertuxkart-sourceforge-migration commented 10 years ago

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

supertuxkart-sourceforge-migration 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")
supertuxkart-sourceforge-migration commented 10 years ago

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

supertuxkart-sourceforge-migration 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...