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>2020-01-09 05:56:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-09 08:42:24 +0300
commitac4057b95a5b20c4903308881193e291266f87db (patch)
treedd1910787eb8dcb9053dc7ee3dea8b33bd01b4ac /source/blender/editors/space_image/space_image.c
parent73098d2ca5c047542fcf6487ee946cb3b50e9683 (diff)
Gizmo: use pivot center for UV gizmos
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r--source/blender/editors/space_image/space_image.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 2f93be8ae38..57560c560d7 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -470,11 +470,7 @@ static void IMAGE_GGT_gizmo2d(wmGizmoGroupType *gzgt)
gzgt->gzmap_params.spaceid = SPACE_IMAGE;
gzgt->gzmap_params.regionid = RGN_TYPE_WINDOW;
- gzgt->poll = ED_widgetgroup_gizmo2d_xform_poll;
- gzgt->setup = ED_widgetgroup_gizmo2d_xform_setup;
- gzgt->setup_keymap = WM_gizmogroup_setup_keymap_generic_maybe_drag;
- gzgt->refresh = ED_widgetgroup_gizmo2d_xform_refresh;
- gzgt->draw_prepare = ED_widgetgroup_gizmo2d_xform_draw_prepare;
+ ED_widgetgroup_gizmo2d_xform_callbacks_set(gzgt);
}
static void IMAGE_GGT_gizmo2d_translate(wmGizmoGroupType *gzgt)
@@ -488,11 +484,7 @@ static void IMAGE_GGT_gizmo2d_translate(wmGizmoGroupType *gzgt)
gzgt->gzmap_params.spaceid = SPACE_IMAGE;
gzgt->gzmap_params.regionid = RGN_TYPE_WINDOW;
- gzgt->poll = ED_widgetgroup_gizmo2d_xform_poll;
- gzgt->setup = ED_widgetgroup_gizmo2d_xform_setup_no_cage;
- gzgt->setup_keymap = WM_gizmogroup_setup_keymap_generic_maybe_drag;
- gzgt->refresh = ED_widgetgroup_gizmo2d_xform_refresh;
- gzgt->draw_prepare = ED_widgetgroup_gizmo2d_xform_draw_prepare;
+ ED_widgetgroup_gizmo2d_xform_no_cage_callbacks_set(gzgt);
}
static void IMAGE_GGT_gizmo2d_resize(wmGizmoGroupType *gzgt)
@@ -506,11 +498,7 @@ static void IMAGE_GGT_gizmo2d_resize(wmGizmoGroupType *gzgt)
gzgt->gzmap_params.spaceid = SPACE_IMAGE;
gzgt->gzmap_params.regionid = RGN_TYPE_WINDOW;
- gzgt->poll = ED_widgetgroup_gizmo2d_resize_poll;
- gzgt->setup = ED_widgetgroup_gizmo2d_resize_setup;
- gzgt->setup_keymap = WM_gizmogroup_setup_keymap_generic_maybe_drag;
- gzgt->refresh = ED_widgetgroup_gizmo2d_resize_refresh;
- gzgt->draw_prepare = ED_widgetgroup_gizmo2d_resize_draw_prepare;
+ ED_widgetgroup_gizmo2d_resize_callbacks_set(gzgt);
}
static void IMAGE_GGT_gizmo2d_rotate(wmGizmoGroupType *gzgt)
@@ -524,11 +512,7 @@ static void IMAGE_GGT_gizmo2d_rotate(wmGizmoGroupType *gzgt)
gzgt->gzmap_params.spaceid = SPACE_IMAGE;
gzgt->gzmap_params.regionid = RGN_TYPE_WINDOW;
- gzgt->poll = ED_widgetgroup_gizmo2d_rotate_poll;
- gzgt->setup = ED_widgetgroup_gizmo2d_rotate_setup;
- gzgt->setup_keymap = WM_gizmogroup_setup_keymap_generic_maybe_drag;
- gzgt->refresh = ED_widgetgroup_gizmo2d_rotate_refresh;
- gzgt->draw_prepare = ED_widgetgroup_gizmo2d_rotate_draw_prepare;
+ ED_widgetgroup_gizmo2d_rotate_callbacks_set(gzgt);
}
static void IMAGE_GGT_navigate(wmGizmoGroupType *gzgt)