fix [#29063] reprojetion painting : failed to create opengl offscreen buffer

error report was not passed into the UI and only printed into the terminal, now shows an error popup.
This commit is contained in:
Campbell Barton
2011-10-28 02:10:02 +00:00
parent f8d0c8b11e
commit 36b8846f6e

View File

@@ -145,7 +145,11 @@ class ProjectEdit(Operator):
for image in bpy.data.images:
image.tag = True
if 'FINISHED' not in bpy.ops.paint.image_from_view():
# opengl buffer may fail, we can't help this, but best report it.
try:
ret = bpy.ops.paint.image_from_view()
except RuntimeError as err:
self.report({'ERROR'}, str(err))
return {'CANCELLED'}
image_new = None