Fix #105088: FBX Camera Focus Distance is interpreted as millimeters #105124
@ -5,7 +5,7 @@
|
||||
bl_info = {
|
||||
"name": "FBX format",
|
||||
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier, @Mysteryem",
|
||||
"version": (5, 11, 4),
|
||||
"version": (5, 11, 5),
|
||||
"blender": (4, 1, 0),
|
||||
"location": "File > Import-Export",
|
||||
"description": "FBX IO meshes, UVs, vertex colors, materials, textures, cameras, lamps and actions",
|
||||
|
@ -686,7 +686,7 @@ def fbx_data_camera_elements(root, cam_obj, scene_data):
|
||||
elem_props_template_set(tmpl, props, "p_double", b"SafeAreaAspectRatio", aspect)
|
||||
# Depth of field and Focus distance.
|
||||
elem_props_template_set(tmpl, props, "p_bool", b"UseDepthOfField", cam_data.dof.use_dof)
|
||||
elem_props_template_set(tmpl, props, "p_double", b"FocusDistance", cam_data.dof.focus_distance * 1000 * gscale)
|
||||
elem_props_template_set(tmpl, props, "p_double", b"FocusDistance", cam_data.dof.focus_distance * gscale)
|
||||
# Default to perspective camera.
|
||||
elem_props_template_set(tmpl, props, "p_enum", b"CameraProjectionType", 1 if cam_data.type == 'ORTHO' else 0)
|
||||
elem_props_template_set(tmpl, props, "p_double", b"OrthoZoom", cam_data.ortho_scale)
|
||||
|
@ -2169,7 +2169,7 @@ def blen_read_camera(fbx_tmpl, fbx_obj, settings):
|
||||
|
||||
camera.type = 'ORTHO' if elem_props_get_enum(fbx_props, b'CameraProjectionType', 0) == 1 else 'PERSP'
|
||||
|
||||
camera.dof.focus_distance = elem_props_get_number(fbx_props, b'FocusDistance', 10 * 1000) / 1000 * global_scale
|
||||
camera.dof.focus_distance = elem_props_get_number(fbx_props, b'FocusDistance', 10) * global_scale
|
||||
if (elem_props_get_bool(fbx_props, b'UseDepthOfField', False)):
|
||||
camera.dof.use_dof = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user