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>2015-11-23 23:28:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-11-23 23:28:42 +0300
commitdf5532b502c94b0c2d6208679c179bab32c2f97f (patch)
treefe1ddf646cffedbf983e245668ebaa34ff6667a3 /release
parent39957b85d9548adf6f6a0dea09c4c0714bd46d34 (diff)
UV Smart Project: restore 'Stretch to UV Bounds'
This option wasn't exposed since 2.4x. D1622 by @candreacchio
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 73e6bcd9b0c..7ad83525656 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -708,7 +708,8 @@ def main(context,
island_margin,
projection_limit,
user_area_weight,
- use_aspect
+ use_aspect,
+ stretch_to_bounds,
):
global USER_FILL_HOLES
global USER_FILL_HOLES_QUALITY
@@ -733,7 +734,7 @@ def main(context,
USER_PROJECTION_LIMIT = projection_limit
USER_ONLY_SELECTED_FACES = True
USER_SHARE_SPACE = 1 # Only for hole filling.
- USER_STRETCH_ASPECT = 1 # Only for hole filling.
+ USER_STRETCH_ASPECT = stretch_to_bounds
USER_ISLAND_MARGIN = island_margin # Only for hole filling.
USER_FILL_HOLES = 0
USER_FILL_HOLES_QUALITY = 50 # Only for hole filling.
@@ -1031,8 +1032,7 @@ def main(context,
'',\
'UV Layout',\
('Share Tex Space', USER_SHARE_SPACE, 'Objects Share texture space, map all objects into 1 uvmap.'),\
- ('Stretch to bounds', USER_STRETCH_ASPECT, 'Stretch the final output to texture bounds.'),\
-* ('Island Margin:', USER_ISLAND_MARGIN, 0.0, 0.5, ''),\
+ ('Island Margin:', USER_ISLAND_MARGIN, 0.0, 0.5, ''),\
'Fill in empty areas',\
('Fill Holes', USER_FILL_HOLES, 'Fill in empty areas reduced texture waistage (slow).'),\
('Fill Quality:', USER_FILL_HOLES_QUALITY, 1, 100, 'Depends on fill holes, how tightly to fill UV holes, (higher is slower)'),\
@@ -1073,6 +1073,11 @@ class SmartProject(Operator):
description="Map UVs taking image aspect ratio into account",
default=True
)
+ stretch_to_bounds = BoolProperty(
+ name="Stretch to UV Bounds",
+ description="Stretch the final output to texture bounds",
+ default=True,
+ )
@classmethod
def poll(cls, context):
@@ -1083,7 +1088,8 @@ class SmartProject(Operator):
self.island_margin,
self.angle_limit,
self.user_area_weight,
- self.use_aspect
+ self.use_aspect,
+ self.stretch_to_bounds
)
return {'FINISHED'}