Animation: Make Vertex Weight Edit modifier inclusive #108286

Merged
Nate Rupsis merged 20 commits from nrupsis/blender:vertext-weights-inclusive into main 2023-07-12 17:52:58 +02:00
1 changed files with 2 additions and 2 deletions
Showing only changes of commit 54a1bb59be - Show all commits

View File

@ -5217,7 +5217,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "add_threshold");
RNA_def_property_float_sdna(prop, nullptr, "add_threshold");
nrupsis marked this conversation as resolved Outdated

My bet is that this PR started before the code was converted to C++. Be sure to use nullptr instead of NULL in C++ code.

My bet is that this PR started before the code was converted to C++. Be sure to use `nullptr` instead of `NULL` in C++ code.

My bet is that this PR started before the code was converted to C++. Be sure to use nullptr instead of NULL in C++ code.

My bet is that this PR started before the code was converted to C++. Be sure to use `nullptr` instead of `NULL` in C++ code.
RNA_def_property_range(prop, -1000.0, 1000.0);
dr.sybren marked this conversation as resolved

The PR description says nothing about expanding the allowed ranges for these thresholds. Is this a necessity for the change from exclusive to inclusive? If not, it'll be better to put into a separate commit.

The PR description says nothing about expanding the allowed ranges for these thresholds. Is this a necessity for the change from exclusive to inclusive? If not, it'll be better to put into a separate commit.
Review

This change doesn't impact the exclusive to inclusive, however it is required for the versioning code to work.
Should the whole versioning bit be moved into a new PR/commit?

This change doesn't impact the exclusive to inclusive, however it is required for the versioning code to work. Should the whole versioning bit be moved into a new PR/commit?

No it's better to have the change + the versioning in one commit. I just didn't realise that this was necessary for the versioning.

No it's better to have the change + the versioning in one commit. I just didn't realise that this was necessary for the versioning.
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
RNA_def_property_ui_text(prop,
@ -5227,7 +5227,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rem_threshold");
RNA_def_property_float_sdna(prop, nullptr, "rem_threshold");
RNA_def_property_range(prop, -1000.0, 1000.0);
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
RNA_def_property_ui_text(prop,