UI: increase precision of the camera's focus distance

For metric units the depth was being rounded to the nearest meter
(in the range of 10-100 meters), increase the precision from 2 to 4
so it's possible to see centimeter precision.
This commit is contained in:
Campbell Barton
2024-05-07 22:05:27 +10:00
parent 26c93c8359
commit 9a5366cf8e

View File

@@ -535,7 +535,7 @@ static void rna_def_camera_dof_settings_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "focus_distance", PROP_FLOAT, PROP_DISTANCE);
// RNA_def_property_pointer_sdna(prop, nullptr, "focus_distance");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_range(prop, 0.0f, 5000.0f, 1, 2);
RNA_def_property_ui_range(prop, 0.0f, 5000.0f, 1, 4);
RNA_def_property_ui_text(
prop, "Focus Distance", "Distance to the focus point for depth of field");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Camera_dof_update");