Fix #119549: Avoid resetting properties tagged as `SKIP_PRESET`

Excludes properties tagged as `SKIP_PRESET` from being reset.

Pull Request: https://projects.blender.org/blender/blender/pulls/119550
This commit is contained in:
Guillermo Venegas 2024-03-16 19:34:49 +01:00 committed by Brecht Van Lommel
parent b8a3560a77
commit 1058006e03
1 changed files with 1 additions and 1 deletions

View File

@ -786,7 +786,7 @@ void WM_operator_properties_reset(wmOperator *op)
RNA_PROP_BEGIN (op->ptr, itemptr, iterprop) {
PropertyRNA *prop = static_cast<PropertyRNA *>(itemptr.data);
if ((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) {
if ((RNA_property_flag(prop) & (PROP_SKIP_SAVE | PROP_SKIP_PRESET)) == 0) {
const char *identifier = RNA_property_identifier(prop);
RNA_struct_idprops_unset(op->ptr, identifier);
}