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 17:13:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-04-19 17:14:37 +0300
commit4402c2324b81efad8d09a016a7e6838395711158 (patch)
treedb28202b57d1cd4588002eacf2ef7306d3e6a63b /source/blender/editors/screen
parente1acefd45e2365d0163e5fb3d7f8fc34a2749cf0 (diff)
Cleanup: use 'wmOperator.ptr' in draw functions
Draw functions used RNA_pointer_create to create the pointer, however this already exists in the operator.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screendump.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 3df63d423e2..6df96b1e30f 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -199,10 +199,9 @@ static bool screenshot_draw_check_prop(PointerRNA *UNUSED(ptr),
return !(STREQ(prop_id, "filepath"));
}
-static void screenshot_draw(bContext *C, wmOperator *op)
+static void screenshot_draw(bContext *UNUSED(C), wmOperator *op)
{
uiLayout *layout = op->layout;
- wmWindowManager *wm = CTX_wm_manager(C);
ScreenshotData *scd = op->customdata;
uiLayoutSetPropSep(layout, true);
@@ -214,9 +213,8 @@ static void screenshot_draw(bContext *C, wmOperator *op)
uiTemplateImageSettings(layout, &ptr, false);
/* main draw call */
- 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);
+ layout, op->ptr, screenshot_draw_check_prop, NULL, NULL, UI_BUT_LABEL_ALIGN_NONE, false);
}
static bool screenshot_poll(bContext *C)