diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-04-19 12:59:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-04-19 12:59:41 +0400 |
commit | 1d1602db101896251d38d8cfa3c699bf916248a1 (patch) | |
tree | 866a3bc646a6fa5bde947e764f7deeea93d733b4 /io_scene_fbx | |
parent | b0fd9c806a58ae80c35be9683deb8bbfefbb8991 (diff) |
fix [#27042] FBX export - missing selected objects item
also option to export lamps was missing.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r-- | io_scene_fbx/__init__.py | 3 | ||||
-rw-r--r-- | io_scene_fbx/export_fbx.py | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 4dce5502..33651d2a 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -77,10 +77,11 @@ class ExportFBX(bpy.types.Operator, ExportHelper): options={'ENUM_FLAG'}, items=(('EMPTY', "Empty", ""), ('CAMERA', "Camera", ""), + ('LAMP', "Lamp", ""), ('ARMATURE', "Armature", ""), ('MESH', "Mesh", ""), ), - default={'EMPTY', 'CAMERA', 'ARMATURE', 'MESH'}, + default={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH'}, ) mesh_apply_modifiers = BoolProperty(name="Modifiers", description="Apply modifiers to mesh objects", default=True) diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py index 64cd79b9..ee0ebdd4 100644 --- a/io_scene_fbx/export_fbx.py +++ b/io_scene_fbx/export_fbx.py @@ -204,7 +204,7 @@ header_comment = \ def save_single(operator, scene, filepath="", GLOBAL_MATRIX=None, context_objects=None, - object_types={'EMPTY', 'CAMERA', 'ARMATURE', 'MESH'}, + object_types={'EMPTY', 'CAMERA', 'LAMP', 'ARMATURE', 'MESH'}, mesh_apply_modifiers=True, mesh_smooth_type='FACE', ANIM_ENABLE=True, @@ -1798,13 +1798,13 @@ def save_single(operator, scene, filepath="", for ob_base in context_objects: # ignore dupli children - if ob_base.parent and ob_base.parent.dupli_type != 'NONE': + if ob_base.parent and ob_base.parent.dupli_type in {'VERTS', 'FACES'}: continue - obs = [(ob_base, ob_base.matrix_world)] + obs = [(ob_base, ob_base.matrix_world.copy())] if ob_base.dupli_type != 'NONE': ob_base.dupli_list_create(scene) - obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list] + obs = [(dob.object, dob.matrix.copy()) for dob in ob_base.dupli_list] for ob, mtx in obs: # for ob, mtx in BPyObject.getDerivedObjects(ob_base): |