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-19 16:43:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-19 16:52:59 +0300
commit8245805ce3dd23386d7a478ae2f4cfba3b503334 (patch)
tree1c6b69980d78fa5bfe12713bbee5e73ed697cf6f /source/blender/editors/space_sequencer
parent33f218fa3f93a3d574d81d65628188921d6f100c (diff)
Fix creating operator properties without an owner_id
Any dynamic enum access would not use the callback. Always set the owner_id to avoid this causing problems. Oversight in 919558854d624f5db40acfa9f5674ac8c94873b6
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 2df8dce0b3c..0b0c43d3417 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -729,15 +729,16 @@ static int sequencer_add_movie_strip_invoke(bContext *C,
return OPERATOR_RUNNING_MODAL;
}
-static void sequencer_add_draw(bContext *UNUSED(C), wmOperator *op)
+static void sequencer_add_draw(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
SequencerAddData *sad = op->customdata;
ImageFormatData *imf = &sad->im_format;
PointerRNA imf_ptr, ptr;
/* Main draw call. */
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
uiDefAutoButsRNA(
layout, &ptr, sequencer_add_draw_check_fn, NULL, NULL, UI_BUT_LABEL_ALIGN_NONE, false);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 40a0af18b18..5d616969a4f 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -1485,14 +1485,15 @@ static int sequencer_split_invoke(bContext *C, wmOperator *op, const wmEvent *ev
return sequencer_split_exec(C, op);
}
-static void sequencer_split_ui(bContext *UNUSED(C), wmOperator *op)
+static void sequencer_split_ui(bContext *C, wmOperator *op)
{
uiLayout *layout = op->layout;
+ wmWindowManager *wm = CTX_wm_manager(C);
uiLayoutSetPropSep(layout, true);
uiLayoutSetPropDecorate(layout, false);
PointerRNA ptr;
- RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
uiLayout *row = uiLayoutRow(layout, false);
uiItemR(row, &ptr, "type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);