From 8068085bda0192fff3bb28a27bdc3c269dd3bcef Mon Sep 17 00:00:00 2001 From: NBurn Date: Fri, 11 Aug 2017 13:43:26 -0400 Subject: 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. --- measureit/measureit_render.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'measureit') 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) -- cgit v1.2.3