diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index aad48d13277..571c1327f78 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -464,6 +464,7 @@ static int override_remove_button_poll(bContext *C) static int override_remove_button_exec(bContext *C, wmOperator *op) { + Main *bmain = CTX_data_main(C); PointerRNA ptr, id_refptr, src; PropertyRNA *prop; int index; @@ -505,7 +506,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) } BKE_override_static_property_operation_delete(oprop, opop); if (!is_template) { - RNA_property_copy(&ptr, &src, prop, index); + RNA_property_copy(bmain, &ptr, &src, prop, index); } if (BLI_listbase_is_empty(&oprop->operations)) { BKE_override_static_property_delete(id->override_static, oprop); @@ -515,7 +516,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) /* Just remove whole generic override operation of this property. */ BKE_override_static_property_delete(id->override_static, oprop); if (!is_template) { - RNA_property_copy(&ptr, &src, prop, -1); + RNA_property_copy(bmain, &ptr, &src, prop, -1); } } @@ -699,6 +700,7 @@ bool UI_context_copy_to_selected_list( */ static bool copy_to_selected_button(bContext *C, bool all, bool poll) { + Main *bmain = CTX_data_main(C); PointerRNA ptr, lptr, idptr; PropertyRNA *prop, *lprop; bool success = false; @@ -747,7 +749,7 @@ static bool copy_to_selected_button(bContext *C, bool all, bool poll) break; } else { - if (RNA_property_copy(&lptr, &ptr, prop, (all) ? -1 : index)) { + if (RNA_property_copy(bmain, &lptr, &ptr, prop, (all) ? -1 : index)) { RNA_property_update(C, &lptr, prop); success = true; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f2e996237cf..8db58b17520 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2343,7 +2343,7 @@ static int make_override_static_exec(bContext *C, wmOperator *op) new_ob->id.override_static->flag &= ~STATICOVERRIDE_AUTO; } /* We still want to store all objects' current override status (i.e. change of parent). */ - BKE_override_static_operations_create(&new_ob->id, true); + BKE_override_static_operations_create(bmain, &new_ob->id, true); } } FOREACH_COLLECTION_OBJECT_RECURSIVE_END; |