Skip to content
Snippets Groups Projects
Commit 566a38db authored by Bastien Montagne's avatar Bastien Montagne
Browse files

Fix [#36268] FBX exporter precision min is too big

Using a bit more flexible way to handle those values (range now from 10^-18 (20) to 10^2 (0) frames). Not sure we shouldn't rather get rid of such "magic" value and let user set frame threshold directly, though!
parent 3ed552b9
No related branches found
No related tags found
No related merge requests found
......@@ -157,8 +157,8 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
name="Scale",
description=("Scale all data "
"(Some importers do not support scaled armatures!)"),
min=0.01, max=1000.0,
soft_min=0.001, soft_max=1000.0,
min=0.001, max=1000.0,
soft_min=0.01, soft_max=1000.0,
default=1.0,
)
axis_forward = EnumProperty(
......@@ -246,9 +246,9 @@ class ExportFBX(bpy.types.Operator, ExportHelper):
name="Precision",
description=("Tolerance for comparing double keyframes "
"(higher for greater accuracy)"),
min=1, max=16,
soft_min=1, soft_max=16,
default=6.0,
min=0.0, max=20.0, # from 10^2 to 10^-18 frames precision.
soft_min=1.0, soft_max=16.0,
default=6.0, # default: 10^-4 frames.
)
path_mode = path_reference_mode
batch_mode = EnumProperty(
......
......@@ -1385,7 +1385,6 @@ def save_single(operator, scene, filepath="",
# Write the Real Mesh data here
fw('\n\t\tVertices: ')
i = -1
for v in me_vertices:
if i == -1:
fw('%.6f,%.6f,%.6f' % v.co[:])
......@@ -2601,7 +2600,8 @@ Connections: {''')
frame_orig = scene.frame_current
if use_anim_optimize:
ANIM_OPTIMIZE_PRECISSION_FLOAT = 0.1 ** anim_optimize_precision
# Do we really want to keep such behavior? User could enter real value directly...
ANIM_OPTIMIZE_PRECISSION_FLOAT = 10 ** (-anim_optimize_precision + 2)
# default action, when no actions are avaioable
tmp_actions = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment