Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNBurn <nbwashburn@gmail.com>2017-08-11 20:43:26 +0300
committerNBurn <nbwashburn@gmail.com>2017-08-11 20:43:26 +0300
commit8068085bda0192fff3bb28a27bdc3c269dd3bcef (patch)
tree5b918deb4ab20496f2bcf8c43f3917ebbc68a471
parentf8d7d611fc68d06f7e2ab9035bf68c291eaaa9ef (diff)
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.
-rw-r--r--measureit/measureit_render.py9
1 files changed, 1 insertions, 8 deletions
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)