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>2019-03-01 04:35:48 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-01 04:41:40 +0300
commit69665bc7f06d727499596c87f1c08c1fc064efba (patch)
tree7c22f9d74760275552e0b3d8610469c9a4c9db31 /source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
parent795effcbc815ae8c54bf59d31f3315a46e576c86 (diff)
RNA: move cursor into own struct
Without this it's impractical to subscribe to any change to the cursor. Fixes T61969 by having gizmos update on any change to the cursor.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c')
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 52b011cf83e..9884ded4f0a 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -438,18 +438,10 @@ static void gizmo_mesh_spin_init_message_subscribe(
.notify = WM_gizmo_do_msg_notify_tag_refresh,
};
- PointerRNA scene_ptr;
- RNA_id_pointer_create(&scene->id, &scene_ptr);
-
- {
- extern PropertyRNA rna_Scene_cursor_location;
- const PropertyRNA *props[] = {
- &rna_Scene_cursor_location,
- };
- for (int i = 0; i < ARRAY_SIZE(props); i++) {
- WM_msg_subscribe_rna(mbus, &scene_ptr, props[i], &msg_sub_value_gz_tag_refresh, __func__);
- }
- }
+ PointerRNA cursor_ptr;
+ RNA_pointer_create(&scene->id, &RNA_View3DCursor, &scene->cursor, &cursor_ptr);
+ /* All cursor properties. */
+ WM_msg_subscribe_rna(mbus, &cursor_ptr, NULL, &msg_sub_value_gz_tag_refresh, __func__);
WM_msg_subscribe_rna_params(
mbus,