Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Foster <cdbfoster@gmail.com>2011-02-09 09:49:21 +0300
committerChris Foster <cdbfoster@gmail.com>2011-02-09 09:49:21 +0300
commitb781657f437870bf2c14dd5901388de0fdf4ef52 (patch)
tree3ea7dcbf0e3495c0ec9a94fd1aab083115120b9d /io_export_directx_x.py
parentc05f4813b650b8b4d45c172c549947e562bf71aa (diff)
Fixed some minor formatting issues and added support for engines that do not natively recognize the AnimTicksPerSecond template.
Diffstat (limited to 'io_export_directx_x.py')
-rw-r--r--io_export_directx_x.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index bb655064..9bb5410c 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -18,9 +18,9 @@
bl_info = {
"name": "Export DirectX Model Format (.x)",
"author": "Chris Foster (Kira Vakaan)",
- "version": (2, 0),
- "blender": (2, 5, 5),
- "api": 33427,
+ "version": (2, 1),
+ "blender": (2, 5, 6),
+ "api": 34736,
"location": "File > Export",
"description": "Export to the DirectX Model Format (.x)",
"warning": "",
@@ -197,6 +197,13 @@ def GetMaterialTexture(Material):
def WriteHeader(Config):
Config.File.write("xof 0303txt 0032\n\n")
+
+ if Config.IncludeFrameRate:
+ Config.File.write("template AnimTicksPerSecond {\n\
+ <9E415A43-7BA6-4a73-8743-B73D47E88476>\n\
+ DWORD AnimTicksPerSecond;\n\
+}\n\n")
+
if Config.ExportArmatures:
Config.File.write("template XSkinMeshHeader {\n\
<3cf169ce-ff7c-44ab-93c0-f78f62d172e2>\n\
@@ -733,7 +740,7 @@ def WriteKeyedAnimationSet(Config):
Rotation[1] = ((RotationFCurves[1][Keyframe] if Keyframe in RotationFCurves[1] else Object.rotation_euler[1]) if RotationFCurves[1] else Object.rotation_euler[1])
Rotation[2] = ((RotationFCurves[2][Keyframe] if Keyframe in RotationFCurves[2] else Object.rotation_euler[2]) if RotationFCurves[2] else Object.rotation_euler[2])
Rotation = Rotation.to_quaternion()
- Config.File.write("{}{}{:9f},{:9f},{:9f},{:9f};;".format(" " * Config.Whitespace, (str(Keyframe - bpy.context.scene.frame_start) + ";4;").ljust(8), - Rotation[0], Rotation[1], Rotation[2], Rotation[3]))
+ Config.File.write("{}{}{:9f},{:9f},{:9f},{:9f};;".format(" " * Config.Whitespace, (str(Keyframe - bpy.context.scene.frame_start) + ";4;").ljust(8), -Rotation[0], Rotation[1], Rotation[2], Rotation[3]))
if Keyframe == AllKeyframes[-1]:
Config.File.write(";\n")
else:
@@ -1226,4 +1233,4 @@ def unregister():
if __name__ == "__main__":
- register()
+ register() \ No newline at end of file