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-10-18 09:01:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-18 09:18:48 +0300
commit2a8e5128c16c17a7b2f6fc5325dc8f5abb4427d4 (patch)
treed2b114295d5fdaef89dea75f84bf1f44d8cf08f7 /source/blender/makesrna/intern/rna_wm.c
parent6bf8c95e521d6effe9e1c426e14efe20dac81175 (diff)
WM: support setting the operators idle cursor
Support setting a cursor when an operator is waiting for input.
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c10
1 files changed, 10 insertions, 0 deletions
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)