diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-19 16:43:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-19 16:52:59 +0300 |
commit | 8245805ce3dd23386d7a478ae2f4cfba3b503334 (patch) | |
tree | 1c6b69980d78fa5bfe12713bbee5e73ed697cf6f /source/blender/editors/screen/screendump.c | |
parent | 33f218fa3f93a3d574d81d65628188921d6f100c (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/screen/screendump.c')
-rw-r--r-- | source/blender/editors/screen/screendump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index ff0dab7f1c7..3df63d423e2 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -199,9 +199,10 @@ static bool screenshot_draw_check_prop(PointerRNA *UNUSED(ptr), return !(STREQ(prop_id, "filepath")); } -static void screenshot_draw(bContext *UNUSED(C), wmOperator *op) +static void screenshot_draw(bContext *C, wmOperator *op) { uiLayout *layout = op->layout; + wmWindowManager *wm = CTX_wm_manager(C); ScreenshotData *scd = op->customdata; uiLayoutSetPropSep(layout, true); @@ -213,7 +214,7 @@ static void screenshot_draw(bContext *UNUSED(C), wmOperator *op) uiTemplateImageSettings(layout, &ptr, false); /* 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, screenshot_draw_check_prop, NULL, NULL, UI_BUT_LABEL_ALIGN_NONE, false); } |