[Bf-extensions-cvs] [06adc99] : Fix T44060: 2.74RC2: Import Images as Plane: no alpha when open an image with Cycles engine.

Bastien Montagne noreply at git.blender.org
Tue Mar 24 16:29:01 CET 2015


Commit: 06adc998b17cc6505b22ff3ade04c559693aea29
Author: Bastien Montagne
Date:   Sat Mar 21 12:20:57 2015 +0100
Branches: 
https://developer.blender.org/rBA06adc998b17cc6505b22ff3ade04c559693aea29

Fix T44060: 2.74RC2: Import Images as Plane: no alpha when open an image with Cycles engine.

UseAlpha & co are image settings, they are not bound to any specific render engine.

To be backported to final 2.74.

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

M	io_import_images_as_planes.py

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

diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py
index df727a6..4940ebc 100644
--- a/io_import_images_as_planes.py
+++ b/io_import_images_as_planes.py
@@ -19,8 +19,8 @@
 bl_info = {
     "name": "Import Images as Planes",
     "author": "Florian Meyer (tstscr), mont29, matali",
-    "version": (2, 0, 0),
-    "blender": (2, 73, 0),
+    "version": (2, 0, 1),
+    "blender": (2, 74, 0),
     "location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
     "description": "Imports images and creates planes with the appropriate aspect ratio. "
                    "The images are mapped to the planes.",
@@ -271,6 +271,11 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
         row.active = bpy.data.is_saved
         row.prop(self, "relative")
         box.prop(self, "match_len")
+        row = box.row()
+        row.prop(self, "use_transparency")
+        sub = row.row()
+        sub.active = self.use_transparency
+        sub.prop(self, "alpha_mode", text="")
         box.prop(self, "use_fields")
         box.prop(self, "use_auto_refresh")
 
@@ -278,8 +283,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
         if engine == 'BLENDER_RENDER':
             box.label("Material Settings: (Blender)", icon='MATERIAL')
             box.prop(self, "use_shadeless")
-            box.prop(self, "use_transparency")
-            box.prop(self, "alpha_mode")
             row = box.row()
             row.prop(self, "transparency_method", expand=True)
             box.prop(self, "use_transparent_shadows")
@@ -442,6 +445,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
         return material
 
     def set_image_options(self, image):
+        image.use_alpha = self.use_transparency
         image.alpha_mode = self.alpha_mode
         image.use_fields = self.use_fields
 
@@ -452,7 +456,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
                 pass
 
     def set_texture_options(self, context, texture):
-        texture.image.use_alpha = self.use_transparency
         texture.image_user.use_auto_refresh = self.use_auto_refresh
         if self.match_len:
             texture.image_user.frame_duration = texture.image.frame_duration



More information about the Bf-extensions-cvs mailing list