UI: Set modifier panel expansion on every redraw
This will fix situations where the modifier epansion was set elsewhere besides the UI, like from the python console, solving the drawing part of T77502. Also adds update tags to the show_expanded property, which means the properties window redraws when the property changes.
This commit is contained in:
parent
cb9de95d61
commit
819ebc9901
|
@ -1860,6 +1860,13 @@ void uiTemplateModifiers(uiLayout *UNUSED(layout), bContext *C)
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* The expansion might have been changed elsewhere, so we still need to set it. */
|
||||
LISTBASE_FOREACH (Panel *, panel, ®ion->panels) {
|
||||
if ((panel->type != NULL) && (panel->type->flag & PNL_INSTANCED))
|
||||
UI_panel_set_expand_from_list_data(C, panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -6877,6 +6877,7 @@ void RNA_def_modifier(BlenderRNA *brna)
|
|||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
|
||||
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
|
||||
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_apply_on_spline", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_ApplyOnSpline);
|
||||
|
|
Loading…
Reference in New Issue