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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-20 18:27:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-20 18:27:10 +0300
commit231c56509ea0fe81a5c6b67336362f7a81abcc55 (patch)
tree878c7a8093008f5e3991516f907c32299b98a6f9
parent2155eb58531f97fef7f5e60b612d6436d083ebff (diff)
Fix T48906: Import Images As Planes - does not work with 'unknown' rendering engines.
This script has to generate shaders for imported images' planes, so it can only work with known engines. 'Fix' is only adding an explicit error message when an unknown render engine is found, instead of failing silently.
-rw-r--r--io_import_images_as_planes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index c47af01d..7ba5bfa2 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -19,7 +19,7 @@
bl_info = {
"name": "Import Images as Planes",
"author": "Florian Meyer (tstscr), mont29, matali",
- "version": (2, 0, 4),
+ "version": (2, 0, 5),
"blender": (2, 76, 1),
"location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
"description": "Imports images and creates planes with the appropriate aspect ratio. "
@@ -342,6 +342,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
elif engine == 'CYCLES':
materials = (self.create_cycles_material(context, img) for img in images)
else:
+ self.report({'ERROR'}, "Cannot generate materials for unknown %s render engine" % engine)
return
planes = tuple(self.create_image_plane(context, mat) for mat in materials)