diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-26 02:59:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-26 04:53:53 +0300 |
commit | dbd79c097c14d486fe79b91b916a9f854587b27e (patch) | |
tree | f3cf68fcccfbe24c8a052bec2ed0c3a155d7dae2 /source/blender/editors/space_image | |
parent | 2df27fa6cf85a6b4534302a41d9588b550029b01 (diff) |
WM: Add operator property poll callback
This allows operators to filter out properties from the
auto-generated draw functions.
Some custom draw functions can move to using this.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index d9f66ef175a..2a015177dac 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1406,7 +1406,7 @@ static int image_open_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED( return OPERATOR_RUNNING_MODAL; } -static bool image_open_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop) +static bool image_open_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop, void *UNUSED(user_data)) { const char *prop_id = RNA_property_identifier(prop); @@ -1425,7 +1425,7 @@ static void image_open_draw(bContext *UNUSED(C), wmOperator *op) /* main draw call */ RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); - uiDefAutoButsRNA(layout, &ptr, image_open_draw_check_prop, '\0'); + uiDefAutoButsRNA(layout, &ptr, image_open_draw_check_prop, NULL, '\0'); /* image template */ RNA_pointer_create(NULL, &RNA_ImageFormatSettings, imf, &imf_ptr); @@ -2120,7 +2120,7 @@ static void image_save_as_cancel(bContext *UNUSED(C), wmOperator *op) image_save_as_free(op); } -static bool image_save_as_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) +static bool image_save_as_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop, void *UNUSED(user_data)) { const char *prop_id = RNA_property_identifier(prop); @@ -2145,7 +2145,7 @@ static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op) /* main draw call */ RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr); - uiDefAutoButsRNA(layout, &ptr, image_save_as_draw_check_prop, '\0'); + uiDefAutoButsRNA(layout, &ptr, image_save_as_draw_check_prop, NULL, '\0'); /* multiview template */ if (is_multiview) |