diff options
author | Julian Eisel <julian@blender.org> | 2020-08-07 14:04:31 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-07 14:04:31 +0300 |
commit | 0d2d4a6d4a75ac38c41f872c88255eab70e88ab7 (patch) | |
tree | b7a7518af86dddba48e05a98b3c2be55e8804721 /source/blender/editors/interface/interface_ops.c | |
parent | 9b416c66fb714bdfd15a481489dbf650d0f389ea (diff) | |
parent | cfc6f9eb18e701f5be601b95c45004e8cf7fbc81 (diff) |
Merge branch 'master' into temp-ui-button-type-refactortemp-ui-button-type-refactor
Diffstat (limited to 'source/blender/editors/interface/interface_ops.c')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 83506fd5d5e..5a49f3e70d0 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -510,7 +510,8 @@ static bool override_type_set_button_poll(bContext *C) UI_context_active_but_prop_get(C, &ptr, &prop, &index); - const uint override_status = RNA_property_override_library_status(&ptr, prop, index); + const uint override_status = RNA_property_override_library_status( + CTX_data_main(C), &ptr, prop, index); return (ptr.data && prop && (override_status & RNA_OVERRIDE_STATUS_OVERRIDABLE)); } @@ -556,7 +557,7 @@ static int override_type_set_button_exec(bContext *C, wmOperator *op) } IDOverrideLibraryPropertyOperation *opop = RNA_property_override_property_operation_get( - &ptr, prop, operation, index, true, NULL, &created); + CTX_data_main(C), &ptr, prop, operation, index, true, NULL, &created); if (!created) { opop->operation = operation; } @@ -610,7 +611,8 @@ static bool override_remove_button_poll(bContext *C) UI_context_active_but_prop_get(C, &ptr, &prop, &index); - const uint override_status = RNA_property_override_library_status(&ptr, prop, index); + const uint override_status = RNA_property_override_library_status( + CTX_data_main(C), &ptr, prop, index); return (ptr.data && ptr.owner_id && prop && (override_status & RNA_OVERRIDE_STATUS_OVERRIDDEN)); } @@ -627,7 +629,7 @@ static int override_remove_button_exec(bContext *C, wmOperator *op) UI_context_active_but_prop_get(C, &ptr, &prop, &index); ID *id = ptr.owner_id; - IDOverrideLibraryProperty *oprop = RNA_property_override_property_find(&ptr, prop, &id); + IDOverrideLibraryProperty *oprop = RNA_property_override_property_find(bmain, &ptr, prop, &id); BLI_assert(oprop != NULL); BLI_assert(id != NULL && id->override_library != NULL); @@ -1806,7 +1808,7 @@ static void UI_OT_drop_color(wmOperatorType *ot) ot->flag = OPTYPE_INTERNAL; RNA_def_float_color(ot->srna, "color", 3, NULL, 0.0, FLT_MAX, "Color", "Source color", 0.0, 1.0); - RNA_def_boolean(ot->srna, "gamma", 0, "Gamma Corrected", "The source color is gamma corrected "); + RNA_def_boolean(ot->srna, "gamma", 0, "Gamma Corrected", "The source color is gamma corrected"); } /** \} */ |