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:
authorCampbell Barton <ideasman42@gmail.com>2021-04-16 08:04:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-16 08:08:49 +0300
commit919558854d624f5db40acfa9f5674ac8c94873b6 (patch)
tree99d5d47119ccbd1f02fb0e04adbcdd177ceb1a8e /source/blender/makesrna
parent43b08d05786f83797d04e5d0f777ae9b888807f9 (diff)
Fix T65064: Keymaps items controlling dynamic enums fail to export
Keymap UI and import/export could depend on the current context for dynamic enum's. Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 4a51db4e652..d7a988383a7 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -880,6 +880,7 @@ static PointerRNA rna_KeyMapItem_properties_get(PointerRNA *ptr)
wmKeyMapItem *kmi = ptr->data;
if (kmi->ptr) {
+ BLI_assert(kmi->ptr->owner_id == NULL);
return *(kmi->ptr);
}
@@ -1974,7 +1975,7 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
RNA_def_struct_idprops_func(srna, "rna_OperatorProperties_idprops");
RNA_def_struct_property_tags(srna, rna_enum_operator_property_tags);
- RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES);
+ RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES | STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID);
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
}