#70267 Retopology Overlay #104599

Merged
Clément Foucault merged 30 commits from bonj/blender:retopology-overlay into main 2023-03-03 00:35:56 +01:00
1 changed files with 3 additions and 5 deletions
Showing only changes of commit a4124b667e - Show all commits

View File

@ -4534,11 +4534,9 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "retopology_bias", PROP_FLOAT, PROP_FACTOR);
bonj marked this conversation as resolved

Now that we fixed the bias equation, the property types should be PROP_DISTANCE.

You will loose the ability to see the blue fill bar but it will be much explicit that this value is in distance unit.

You might have to adjust the sensitivity to have kind of the same drag feeling as when it was a factor.
And bump the soft max to 2 or 10 (seems nicer to discover that this isn't clamped).
This is what control those RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 3);.

Now that we fixed the bias equation, the property types should be `PROP_DISTANCE`. You will loose the ability to see the blue fill bar but it will be much explicit that this value is in distance unit. You might have to adjust the sensitivity to have kind of the same drag feeling as when it was a factor. And bump the soft max to 2 or 10 (seems nicer to discover that this isn't clamped). This is what control those `RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 3);`.
Review

Made it PROP_DISTANCE and upped the soft max to 10.
I think 0.1 step and 3 digits still feels good so I'll leave those the same.

Made it PROP_DISTANCE and upped the soft max to 10. I think 0.1 step and 3 digits still feels good so I'll leave those the same.
RNA_def_property_float_sdna(prop, NULL, "overlay.retopology_bias");
RNA_def_property_ui_text(prop,
"Retopology Bias",
"Z Bias used to draw edit mesh in front "
"(0.0 to disable)");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Retopology Bias", "Z Bias used to draw edit mesh in front");
bonj marked this conversation as resolved

Replace description by Offset used to draw the edit mesh in front of other geometry.

Maybe @JulienKaspar can agree this is clearer? Z Bias is too technical in my opinion.

Replace description by `Offset used to draw the edit mesh in front of other geometry`. Maybe @JulienKaspar can agree this is clearer? `Z Bias` is too technical in my opinion.
Review

I agree. I'll rename it to retopology offset everywhere.

I agree. I'll rename it to retopology offset everywhere.
RNA_def_property_range(prop, 0.0f, 100000.0f);
bonj marked this conversation as resolved

Max should be FLT_MAX. Arbitrary limits like these are not good.

Max should be FLT_MAX. Arbitrary limits like these are not good.
Review

Done.

Done.
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 3);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, NULL);