From 2a8e5128c16c17a7b2f6fc5325dc8f5abb4427d4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Oct 2021 17:01:32 +1100 Subject: WM: support setting the operators idle cursor Support setting a cursor when an operator is waiting for input. --- source/blender/makesrna/intern/rna_wm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender/makesrna/intern/rna_wm.c') diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index f82b6d7c691..f46e4a0e7a6 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -1958,6 +1958,16 @@ static void rna_def_operator_common(StructRNA *srna) RNA_def_property_enum_items(prop, rna_enum_operator_type_flag_items); RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL | PROP_ENUM_FLAG); RNA_def_property_ui_text(prop, "Options", "Options for this operator type"); + + prop = RNA_def_property(srna, "bl_cursor_pending", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "type->cursor_pending"); + RNA_def_property_enum_items(prop, rna_enum_window_cursor_items); + RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); + RNA_def_property_ui_text( + prop, + "Idle Cursor", + "Cursor to use when waiting for the user to select a location to activate the operator " + "(when ``bl_options`` has ``DEPENDS_ON_CURSOR`` set)"); } static void rna_def_operator(BlenderRNA *brna) -- cgit v1.2.3