[Bf-extensions-cvs] [8068085b] master: Fix T52236 for MeasureIt: fixes remapping error

NBurn noreply at git.blender.org
Fri Aug 11 19:47:21 CEST 2017


Commit: 8068085bda0192fff3bb28a27bdc3c269dd3bcef
Author: NBurn
Date:   Fri Aug 11 13:43:26 2017 -0400
Branches: master
https://developer.blender.org/rBA8068085bda0192fff3bb28a27bdc3c269dd3bcef

Fix T52236 for MeasureIt: fixes remapping error

Closes T52236 by fixing the last remaining bug (Bug 2) in the
task description (Error in remapping process).
Also removes Blender version check.

===================================================================

M	measureit/measureit_render.py

===================================================================

diff --git a/measureit/measureit_render.py b/measureit/measureit_render.py
index f15a9575..eb04c92d 100644
--- a/measureit/measureit_render.py
+++ b/measureit/measureit_render.py
@@ -108,12 +108,7 @@ def render_main(self, context, animation=False):
 
         # Load image on memory
         img.gl_load(0, bgl.GL_NEAREST, bgl.GL_NEAREST)
-
-        # 2.77 API change
-        if bpy.app.version >= (2, 77, 0):
-            tex = img.bindcode[0]
-        else:
-            tex = img.bindcode
+        tex = img.bindcode[0]
 
         # --------------------------------------------
         # Create output image (to apply texture)
@@ -121,7 +116,6 @@ def render_main(self, context, animation=False):
         if "measureit_output" in bpy.data.images:
             out_img = bpy.data.images["measureit_output"]
             if out_img is not None:
-                out_img.user_clear()
                 bpy.data.images.remove(out_img)
 
         out = bpy.data.images.new("measureit_output", width, height)
@@ -244,7 +238,6 @@ def render_main(self, context, animation=False):
         img.gl_free()  # free opengl image memory
 
         # delete image
-        img.user_clear()
         bpy.data.images.remove(img)
         # remove temp file
         remove(outpath)



More information about the Bf-extensions-cvs mailing list