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:
authorSebastian Parborg <darkdefende@gmail.com>2019-03-28 14:53:36 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-03-28 14:55:47 +0300
commit0403a2f78502193646506f6c9c4529d40af2bc19 (patch)
tree8641d38f59440e0a8d51667c41fca537343d17b9 /release
parent5a8dcdd24e7947f0c298bb78d9ebd9a4d21423ec (diff)
Fix T53997: island_margin in bpy.ops.uv.smart_project seems to have no effect
Now island margin acts as a percentage instead of being the actual distance. So the margin distance will always be the same regardless of the actual size of the geometry. Reviewed By: Brecht Differential Revision: http://developer.blender.org/D4514
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 34aae1b9433..58c915ce029 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -583,10 +583,10 @@ def packIslands(islandList):
w, h = maxx - minx, maxy - miny
if USER_ISLAND_MARGIN:
- minx -= USER_ISLAND_MARGIN # *w
- miny -= USER_ISLAND_MARGIN # *h
- maxx += USER_ISLAND_MARGIN # *w
- maxy += USER_ISLAND_MARGIN # *h
+ minx -= USER_ISLAND_MARGIN * w/2
+ miny -= USER_ISLAND_MARGIN * h/2
+ maxx += USER_ISLAND_MARGIN * w/2
+ maxy += USER_ISLAND_MARGIN * h/2
# recalc width and height
w, h = maxx - minx, maxy - miny