[Bf-extensions-cvs] [22052a4] master: FBX: since we have more and more options differing between new 7.4 and legacy 6.1, add a draw() func (temp, to be removed once we get rid of 6.1).
Bastien Montagne
noreply at git.blender.org
Thu Mar 27 17:54:27 CET 2014
Commit: 22052a47dcc5e12dc60559adc9014c7f0a3f3050
Author: Bastien Montagne
Date: Tue Mar 25 17:49:34 2014 +0100
https://developer.blender.org/rBA22052a47dcc5e12dc60559adc9014c7f0a3f3050
FBX: since we have more and more options differing between new 7.4 and legacy 6.1, add a draw() func (temp, to be removed once we get rid of 6.1).
===================================================================
M io_scene_fbx/__init__.py
===================================================================
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index e5288e2..f348cbd 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -192,6 +192,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
),
default='Y',
)
+ # 7.4 only
bake_space_transform = BoolProperty(
name="Bake Space Transform",
description=("Bake space transform into object data, avoids getting unwanted rotations to objects when "
@@ -229,24 +230,47 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
name="Include Loose Edges",
default=False,
)
+ # 7.4 only
use_tspace = BoolProperty(
name="Include Tangent Space",
description=("Add binormal and tangent vectors, together with normal they form the tangent space "
"(will only work correctly with tris/quads only meshes!)"),
default=False,
)
+ # 7.4 only
use_custom_properties = BoolProperty(
name="Custom Properties",
description="Export custom properties",
default=False,
)
+ # 6.1 only
use_armature_deform_only = BoolProperty(
name="Only Deform Bones",
description="Only write deforming bones",
default=False,
)
+ # Anim - 7.4
+ bake_anim = BoolProperty(
+ name="Baked Animation",
+ description="Export baked keyframe animation",
+ default=True,
+ )
+ bake_anim_step = FloatProperty(
+ name="Sampling Rate",
+ description=("How often to evaluate animated values (in frames)"),
+ min=0.01, max=100.0,
+ soft_min=0.1, soft_max=10.0,
+ default=1.0,
+ )
+ bake_anim_simplify_factor = FloatProperty(
+ name="Simplify",
+ description=("How much to simplify baked values (0.0 to disable, the higher the more simplified"),
+ min=0.0, max=10.0, # No simplification to up to 0.05 slope/100 max_frame_step.
+ default=1.0, # default: min slope: 0.005, max frame step: 10.
+ )
+ # Anim - 6.1
use_anim = BoolProperty(
- name="Include Animation",
+ name="Animation",
description="Export keyframe animation",
default=True,
)
@@ -256,7 +280,7 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
default=True,
)
use_default_take = BoolProperty(
- name="Include Default Take",
+ name="Default Take",
description=("Export currently assigned object and armature animations into a default take from the scene "
"start/end frames"),
default=True
@@ -273,7 +297,9 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
soft_min=1.0, soft_max=16.0,
default=6.0, # default: 10^-4 frames.
)
+ # End anim
path_mode = path_reference_mode
+ # 7.4 only
embed_textures = BoolProperty(
name="Embed Textures",
description="Embed textures in FBX binary file (only for \"Copy\" path mode!)",
@@ -297,6 +323,44 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
options={'HIDDEN'},
)
+ def draw(self, context):
+ layout = self.layout
+ is_74bin = (self.version == 'BIN7400')
+
+ layout.prop(self, "version")
+ layout.prop(self, "use_selection")
+ layout.prop(self, "global_scale")
+ layout.prop(self, "axis_forward")
+ layout.prop(self, "axis_up")
+ if is_74bin:
+ layout.prop(self, "bake_space_transform")
+
+ layout.separator()
+ layout.prop(self, "object_types")
+ layout.prop(self, "use_mesh_modifiers")
+ layout.prop(self, "mesh_smooth_type")
+ layout.prop(self, "use_mesh_edges")
+ layout.prop(self, "use_tspace")
+ if is_74bin:
+ layout.prop(self, "use_custom_properties")
+ layout.prop(self, "bake_anim")
+ layout.prop(self, "bake_anim_step")
+ layout.prop(self, "bake_anim_simplify_factor")
+ else:
+ layout.prop(self, "use_armature_deform_only")
+ layout.prop(self, "use_anim")
+ layout.prop(self, "use_anim_action_all")
+ layout.prop(self, "use_default_take")
+ layout.prop(self, "use_anim_optimize")
+ layout.prop(self, "anim_optimize_precision")
+
+ layout.separator()
+ layout.prop(self, "path_mode")
+ if is_74bin:
+ layout.prop(self, "embed_textures")
+ layout.prop(self, "batch_mode")
+ layout.prop(self, "use_batch_own_dir")
+
@property
def check_extension(self):
return self.batch_mode == 'OFF'
More information about the Bf-extensions-cvs
mailing list