Skip to content
Snippets Groups Projects
Commit 251c133f authored by Bastien Montagne's avatar Bastien Montagne
Browse files

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.
parent a7dce923
No related branches found
No related tags found
No related merge requests found
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
bl_info = { bl_info = {
"name": "Import Images as Planes", "name": "Import Images as Planes",
"author": "Florian Meyer (tstscr), mont29, matali", "author": "Florian Meyer (tstscr), mont29, matali",
"version": (2, 0, 0), "version": (2, 0, 1),
"blender": (2, 73, 0), "blender": (2, 74, 0),
"location": "File > Import > Images as Planes or Add > Mesh > Images as Planes", "location": "File > Import > Images as Planes or Add > Mesh > Images as Planes",
"description": "Imports images and creates planes with the appropriate aspect ratio. " "description": "Imports images and creates planes with the appropriate aspect ratio. "
"The images are mapped to the planes.", "The images are mapped to the planes.",
...@@ -271,6 +271,11 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper): ...@@ -271,6 +271,11 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
row.active = bpy.data.is_saved row.active = bpy.data.is_saved
row.prop(self, "relative") row.prop(self, "relative")
box.prop(self, "match_len") 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_fields")
box.prop(self, "use_auto_refresh") box.prop(self, "use_auto_refresh")
...@@ -278,8 +283,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper): ...@@ -278,8 +283,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
if engine == 'BLENDER_RENDER': if engine == 'BLENDER_RENDER':
box.label("Material Settings: (Blender)", icon='MATERIAL') box.label("Material Settings: (Blender)", icon='MATERIAL')
box.prop(self, "use_shadeless") box.prop(self, "use_shadeless")
box.prop(self, "use_transparency")
box.prop(self, "alpha_mode")
row = box.row() row = box.row()
row.prop(self, "transparency_method", expand=True) row.prop(self, "transparency_method", expand=True)
box.prop(self, "use_transparent_shadows") box.prop(self, "use_transparent_shadows")
...@@ -442,6 +445,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper): ...@@ -442,6 +445,7 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
return material return material
def set_image_options(self, image): def set_image_options(self, image):
image.use_alpha = self.use_transparency
image.alpha_mode = self.alpha_mode image.alpha_mode = self.alpha_mode
image.use_fields = self.use_fields image.use_fields = self.use_fields
...@@ -452,7 +456,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper): ...@@ -452,7 +456,6 @@ class IMPORT_OT_image_to_plane(Operator, AddObjectHelper):
pass pass
def set_texture_options(self, context, texture): def set_texture_options(self, context, texture):
texture.image.use_alpha = self.use_transparency
texture.image_user.use_auto_refresh = self.use_auto_refresh texture.image_user.use_auto_refresh = self.use_auto_refresh
if self.match_len: if self.match_len:
texture.image_user.frame_duration = texture.image.frame_duration texture.image_user.frame_duration = texture.image.frame_duration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment