diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:23:59 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:23:59 +0300 |
commit | 9034351b8def3c3fd3b8d001a559dd91e2f28c14 (patch) | |
tree | d0228d217bd9f1eafbeeba973bd5e61ab782c840 /source/blender/makesrna/intern/rna_modifier.c | |
parent | b5c67c2ec146c86e362d030781c48066e8502fe8 (diff) | |
parent | 44bb73e765a6f79bc14a46449368f83e572d8bad (diff) |
Merge branch 'master' into tmp-eevee-glsl-cleanuptmp-eevee-glsl-cleanup
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 20648970bd1..eb1a09f9c76 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1688,6 +1688,17 @@ static void rna_Modifier_show_expanded_set(PointerRNA *ptr, bool value) } } +/** + * Only check the first bit of the expansion flag for the main panel's expansion, + * maintaining compatibility with older versions where there was only one expansion + * value. + */ +static bool rna_Modifier_show_expanded_get(PointerRNA *ptr) +{ + ModifierData *md = ptr->data; + return md->ui_expand_flag & (1 << 0); +} + #else /* NOTE: *MUST* return subdivision_type property. */ @@ -6959,7 +6970,8 @@ void RNA_def_modifier(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Modifier_update"); prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_funcs(prop, NULL, "rna_Modifier_show_expanded_set"); + RNA_def_property_boolean_funcs( + prop, "rna_Modifier_show_expanded_get", "rna_Modifier_show_expanded_set"); RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "ui_expand_flag", 0); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); |