Fix for the Selection by Image Border not taking account of resolution percentage.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Fri, 15 Mar 2013 00:30:20 +0000 (00:30 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Fri, 15 Mar 2013 00:30:20 +0000 (00:30 +0000)
Problem report by octane98 in the BlenderArtists Freestyle thread in June 2012, thanks a lot!

release/scripts/freestyle/style_modules/parameter_editor.py

index 36d49d006a3639b91954f682292b2f65fc7b2523..0d855b2eff2b46e7333be821a6a78eed49ec5a90 100644 (file)
@@ -1043,8 +1043,9 @@ def process(layer_name, lineset_name):
             selection_criteria.append(upred)
     # prepare selection criteria by image border
     if lineset.select_by_image_border:
-        w = scene.render.resolution_x
-        h = scene.render.resolution_y
+        fac = scene.render.resolution_percentage / 100.0
+        w = scene.render.resolution_x * fac
+        h = scene.render.resolution_y * fac
         if scene.render.use_border:
             xmin = scene.render.border_min_x * w
             xmax = scene.render.border_max_x * w