[Bf-extensions-cvs] [231c565] master: Fix T48906: Import Images As Planes - does not work with 'unknown' rendering engines.

Bastien Montagne noreply at git.blender.org
Wed Jul 20 17:28:49 CEST 2016


Commit: 231c56509ea0fe81a5c6b67336362f7a81abcc55
Author: Bastien Montagne
Date:   Wed Jul 20 17:27:10 2016 +0200
Branches: master
https://developer.blender.org/rBA231c56509ea0fe81a5c6b67336362f7a81abcc55

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.

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

M	io_import_images_as_planes.py

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

diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index c47af01..7ba5bfa 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)



More information about the Bf-extensions-cvs mailing list