Revert "Fix #143360: Separate geometry flags RNA access from weight proximity modifier"

This fix works, but is not the correct way to solve the propblem. Proper
fix for this issue comming in next commit.

This reverts commit 46bd73f967.
This commit is contained in:
Bastien Montagne
2025-07-31 11:33:05 +02:00
parent c499adf3b8
commit 83306cdbf4
2 changed files with 0 additions and 19 deletions

View File

@@ -1778,12 +1778,6 @@ typedef enum {
MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK = (1 << 3),
MOD_WVG_PROXIMITY_INVERT_FALLOFF = (1 << 4),
MOD_WVG_PROXIMITY_WEIGHTS_NORMALIZE = (1 << 5),
/* Having an "all flags" name for geometry modes because these bits are accessed with RNA via a
different property and this makes it easier to do bit setting/testing. See
`rna_VertexWeightProximityModifier_proximity_geometry_set` in rna_modifier.cc */
MOD_WVG_PROXIMITY_GEOM_ALL = (MOD_WVG_PROXIMITY_GEOM_VERTS | MOD_WVG_PROXIMITY_GEOM_EDGES |
MOD_WVG_PROXIMITY_GEOM_FACES),
} WeightVGProximityModifierFlag;
/* Defines common to all WeightVG modifiers. */

View File

@@ -2427,17 +2427,6 @@ static void rna_GreasePencilShrinkwrapModifier_face_cull_set(PointerRNA *ptr, in
smd->shrink_opts = (smd->shrink_opts & ~MOD_SHRINKWRAP_CULL_TARGET_MASK) | value;
}
static void rna_VertexWeightProximityModifier_proximity_geometry_set(PointerRNA *ptr, int value)
{
WeightVGProximityModifierData *wpmd = reinterpret_cast<WeightVGProximityModifierData *>(
ptr->data);
/* The geometry mode shares the `proximity_flags` variable with a few other boolean properties,
* setting the mode value this way ensures only relevant bits are changed. */
wpmd->proximity_flags = (wpmd->proximity_flags & (~MOD_WVG_PROXIMITY_GEOM_ALL)) |
(value & MOD_WVG_PROXIMITY_GEOM_ALL);
}
#else
static void rna_def_modifier_panel_open_prop(StructRNA *srna, const char *identifier, const int id)
@@ -6226,8 +6215,6 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
RNA_def_property_enum_items(prop, proximity_geometry_items);
RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
RNA_def_property_enum_default(prop, MOD_WVG_PROXIMITY_GEOM_FACES);
RNA_def_property_enum_funcs(
prop, nullptr, "rna_VertexWeightProximityModifier_proximity_geometry_set", nullptr);
RNA_def_property_ui_text(prop,
"Proximity Geometry",
"Use the shortest computed distance to target object's geometry "