Revert "FBX Import: corrected import camera. Added setting camera (invert or not invert)."

While it's nice to see attempts to fix cameras (their orientations are know
broken in some case for ages), this commit has several issues:

 - It did not get any review.
 - It changes default behavior.
 - It adds yet another parameter.
 - It does not actually fixes anything, nor does it explain anything.

The first two points in particular are red lights.

But the last two are also more and more annoying, unless someone can provide
a good, valid understanding of how camera orientation is supposed to work
in FBX, am fairly not keen on accepting any more hack like that.
This is just adding more parameters that users just don’t understand,
and which generates by themselves even more bug reports.

This reverts commit 9eddf664d6.
This commit is contained in:
Bastien Montagne 2020-01-24 17:06:12 +01:00
parent 96e3c6f25d
commit 5352ac7e84
3 changed files with 4 additions and 17 deletions

View File

@ -193,17 +193,12 @@ class ImportFBX(bpy.types.Operator, ImportHelper):
),
default='X',
)
use_prepost_rot: BoolProperty(
name="Use Pre/Post Rotation",
description="Use pre/post rotation from FBX transform (you may have to disable that in some cases)",
default=True,
)
camera_invert: BoolProperty(
name="Camera Invert",
description="import inverted camera or not",
default=False,
)
def draw(self, context):
pass
@ -314,7 +309,6 @@ class FBX_PT_import_transform_manual_orientation(bpy.types.Panel):
layout.prop(operator, "axis_forward")
layout.prop(operator, "axis_up")
layout.prop(operator, "camera_invert")
class FBX_PT_import_animation(bpy.types.Panel):

View File

@ -1259,5 +1259,4 @@ FBXImportSettings = namedtuple("FBXImportSettings", (
"nodal_material_wrap_map", "image_cache",
"ignore_leaf_bones", "force_connect_children", "automatic_bone_orientation", "bone_correction_matrix",
"use_prepost_rot",
"camera_invert",
))

View File

@ -61,7 +61,7 @@ convert_deg_to_rad_iter = units_convertor_iter("degree", "radian")
MAT_CONVERT_BONE = fbx_utils.MAT_CONVERT_BONE.inverted()
MAT_CONVERT_LIGHT = fbx_utils.MAT_CONVERT_LIGHT.inverted()
MAT_CONVERT_CAMERA = fbx_utils.MAT_CONVERT_CAMERA
MAT_CONVERT_CAMERA = fbx_utils.MAT_CONVERT_CAMERA.inverted()
def validate_blend_names(name):
@ -1769,10 +1769,7 @@ class FbxImportHelperNode:
else:
# camera and light can be hard wired
if self.fbx_type == b'Camera':
if settings.camera_invert:
correction_matrix = MAT_CONVERT_CAMERA.inverted()
else:
correction_matrix = MAT_CONVERT_CAMERA
correction_matrix = MAT_CONVERT_CAMERA
elif self.fbx_type == b'Light':
correction_matrix = MAT_CONVERT_LIGHT
@ -2330,9 +2327,7 @@ def load(operator, context, filepath="",
automatic_bone_orientation=False,
primary_bone_axis='Y',
secondary_bone_axis='X',
use_prepost_rot=True,
camera_invert=False,
):
use_prepost_rot=True):
global fbx_elem_nil
fbx_elem_nil = FBXElem('', (), (), ())
@ -2472,7 +2467,6 @@ def load(operator, context, filepath="",
nodal_material_wrap_map, image_cache,
ignore_leaf_bones, force_connect_children, automatic_bone_orientation, bone_correction_matrix,
use_prepost_rot,
camera_invert,
)
# #### And now, the "real" data.