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:
authorPhilipp Oeser <info@graphics-engineer.com>2019-09-04 13:46:01 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2019-09-04 13:53:23 +0300
commite4f2d4b1791d3688be19dde03c01d47ee3718c0c (patch)
tree32372a8896ee8d310a5f42779d3008bf8686a351 /io_scene_fbx
parent01e5dd5dd8f03b647b207a88d5a9bafd1cc49dc5 (diff)
Fix T69482: Fbx export crashes blender
Reviewers: Severin Maniphest Tasks: T69482 Differential Revision: https://developer.blender.org/D5671
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/__init__.py47
1 files changed, 23 insertions, 24 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 7f89ef3a..20ea9987 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -593,6 +593,29 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
def draw(self, context):
pass
+ @property
+ def check_extension(self):
+ return self.batch_mode == 'OFF'
+
+ def execute(self, context):
+ from mathutils import Matrix
+ if not self.filepath:
+ raise Exception("filepath not set")
+
+ global_matrix = (axis_conversion(to_forward=self.axis_forward,
+ to_up=self.axis_up,
+ ).to_4x4())
+
+ keywords = self.as_keywords(ignore=("check_existing",
+ "filter_glob",
+ "ui_tab",
+ ))
+
+ keywords["global_matrix"] = global_matrix
+
+ from . import export_fbx_bin
+ return export_fbx_bin.save(self, context, **keywords)
+
class FBX_PT_export_main(bpy.types.Panel):
bl_space_type = 'FILE_BROWSER'
@@ -785,30 +808,6 @@ class FBX_PT_export_bake_animation(bpy.types.Panel):
layout.prop(operator, "bake_anim_simplify_factor")
- @property
- def check_extension(self):
- return self.batch_mode == 'OFF'
-
- def execute(self, context):
- from mathutils import Matrix
- if not self.filepath:
- raise Exception("filepath not set")
-
- global_matrix = (axis_conversion(to_forward=self.axis_forward,
- to_up=self.axis_up,
- ).to_4x4())
-
- keywords = self.as_keywords(ignore=("check_existing",
- "filter_glob",
- "ui_tab",
- ))
-
- keywords["global_matrix"] = global_matrix
-
- from . import export_fbx_bin
- return export_fbx_bin.save(self, context, **keywords)
-
-
def menu_func_import(self, context):
self.layout.operator(ImportFBX.bl_idname, text="FBX (.fbx)")