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>2017-06-16 00:30:27 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-16 00:34:23 +0300
commit4054914813e7ff72acabf6571742cbb0db3f682a (patch)
treeb99568fde0165637f2e6f42809f65cf7ed74a598 /source/blender/editors/uvedit
parent281a4540e2385d3e2ba3da4a3290529a2ac7fd0f (diff)
UV manipulator from custom widgets branch
This isn't advanced, just adding to get custom manipulator branch from being too much out of sync with 2.8.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index ced84e04f25..0e33525ceff 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -670,7 +670,7 @@ static bool ED_uvedit_median(Scene *scene, Image *ima, Object *obedit, float co[
return (sel != 0);
}
-static bool uvedit_center(Scene *scene, Image *ima, Object *obedit, float cent[2], char mode)
+bool ED_uvedit_center(Scene *scene, Image *ima, Object *obedit, float cent[2], char mode)
{
bool changed = false;
@@ -1427,7 +1427,7 @@ static void uv_weld_align(bContext *C, int tool)
tool = (max[0] - min[0] >= max[1] - min[1]) ? 'y' : 'x';
}
- uvedit_center(scene, ima, obedit, cent, 0);
+ ED_uvedit_center(scene, ima, obedit, cent, 0);
if (tool == 'x' || tool == 'w') {
BMIter iter, liter;
@@ -3124,7 +3124,7 @@ static void uv_snap_cursor_to_pixels(SpaceImage *sima)
static bool uv_snap_cursor_to_selection(Scene *scene, Image *ima, Object *obedit, SpaceImage *sima)
{
- return uvedit_center(scene, ima, obedit, sima->cursor, sima->around);
+ return ED_uvedit_center(scene, ima, obedit, sima->cursor, sima->around);
}
static int uv_snap_cursor_exec(bContext *C, wmOperator *op)
@@ -3338,7 +3338,7 @@ static int uv_snap_selection_exec(bContext *C, wmOperator *op)
case 2:
{
float center[2];
- if (uvedit_center(scene, ima, obedit, center, sima->around)) {
+ if (ED_uvedit_center(scene, ima, obedit, center, sima->around)) {
float offset[2];
sub_v2_v2v2(offset, sima->cursor, center);
changed = uv_snap_uvs_offset(scene, ima, obedit, offset);