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-05-03 12:49:14 +0400
committerChris Foster <cdbfoster@gmail.com>2011-05-03 12:49:14 +0400
commit1d5be62ef22d9615d86c6baa34166abef59e3637 (patch)
tree5dc0fd16e341ab3a3c54393a4bf06e27576858c0
parent03cd82803f62b72ec58f654fed03a5891092b5af (diff)
- Fix for parent/child relationships.
-rw-r--r--io_export_directx_x.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index ea9edb1e..c1e52f7e 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -18,9 +18,9 @@
bl_info = {
"name": "DirectX Model Format (.x)",
"author": "Chris Foster (Kira Vakaan)",
- "version": (2, 1),
+ "version": (2, 1, 1),
"blender": (2, 5, 7),
- "api": 36302,
+ "api": 36339,
"location": "File > Export > DirectX (.x)",
"description": "Export DirectX Model Format (.x)",
"warning": "",
@@ -97,7 +97,7 @@ def ExportDirectX(Config):
print("Done")
if Config.Verbose:
- print("Generating Object list for export...")
+ print("Generating Object list for export... (Root parents only)")
if Config.ExportMode == 1:
Config.ExportList = [Object for Object in Config.context.scene.objects
if Object.type in ("ARMATURE", "EMPTY", "MESH")
@@ -146,6 +146,9 @@ def ExportDirectX(Config):
Config.Whitespace -= 1
Config.File.write("{}}} //End of Root Frame\n".format(" " * Config.Whitespace))
+
+ if Config.Verbose:
+ print("Objects Exported: {}".format(Config.ExportList))
if Config.ExportAnimation:
if Config.IncludeFrameRate:
@@ -256,14 +259,16 @@ def WriteObjects(Config, ObjectList):
WriteArmatureBones(Config, Object, ParentList)
if Config.Verbose:
print(" Done")
-
- if Config.ExportMode == 1:
- ChildList = GetObjectChildren(Object)
- if Config.Verbose:
- print(" Writing Children...")
- WriteObjects(Config, ChildList)
- if Config.Verbose:
- print(" Done Writing Children")
+
+ ChildList = GetObjectChildren(Object)
+ if Config.ExportMode == 2: #Selected Objects Only
+ ChildList = [Child for Child in ChildList
+ if Child in Config.context.selected_objects]
+ if Config.Verbose:
+ print(" Writing Children...")
+ WriteObjects(Config, ChildList)
+ if Config.Verbose:
+ print(" Done Writing Children")
if Object.type == "MESH":
if Config.Verbose: