Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-02-20 15:17:54 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-02-21 18:07:08 +0300
commit38ae311706309dacdff167245e018a77a06bca0e (patch)
treebfe9ec246890ed9af4d0b16f641286b8d9f8b6ba /source/blender/makesrna
parent0f242981ec35b44faca5d140502c0133a2631f29 (diff)
Weight Modifiers: use the correct flags for the mask invert property.
The code was using the same flag value for different modifiers, resulting in matching the toggle to random overlapping flags. Differential Revision: https://developer.blender.org/D14165
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 957b92f204a..bd6d543e54a 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4961,6 +4961,7 @@ static void rna_def_modifier_uvwarp(BlenderRNA *brna)
static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna),
StructRNA *srna,
const char *mask_flags,
+ const int invert_vgroup_mask_flag,
const char *mask_vgroup_setter,
const char *mask_uvlayer_setter)
{
@@ -5006,7 +5007,7 @@ static void rna_def_modifier_weightvg_mask(BlenderRNA *UNUSED(brna),
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop = RNA_def_property(srna, "invert_mask_vertex_group", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, mask_flags, MOD_WVG_EDIT_INVERT_VGROUP_MASK);
+ RNA_def_property_boolean_sdna(prop, NULL, mask_flags, invert_vgroup_mask_flag);
RNA_def_property_ui_text(prop, "Invert", "Invert vertex group mask influence");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
@@ -5162,6 +5163,7 @@ static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
rna_def_modifier_weightvg_mask(brna,
srna,
"edit_flags",
+ MOD_WVG_EDIT_INVERT_VGROUP_MASK,
"rna_WeightVGEditModifier_mask_defgrp_name_set",
"rna_WeightVGEditModifier_mask_tex_uvlayer_name_set");
}
@@ -5277,6 +5279,7 @@ static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
rna_def_modifier_weightvg_mask(brna,
srna,
"flag",
+ MOD_WVG_MIX_INVERT_VGROUP_MASK,
"rna_WeightVGMixModifier_mask_defgrp_name_set",
"rna_WeightVGMixModifier_mask_tex_uvlayer_name_set");
}
@@ -5406,6 +5409,7 @@ static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
rna_def_modifier_weightvg_mask(brna,
srna,
"proximity_flags",
+ MOD_WVG_PROXIMITY_INVERT_VGROUP_MASK,
"rna_WeightVGProximityModifier_mask_defgrp_name_set",
"rna_WeightVGProximityModifier_mask_tex_uvlayer_name_set");
}