Skip to content
Snippets Groups Projects
Commit be0ad559 authored by Florian Meyer's avatar Florian Meyer
Browse files

added per user request: receive transparent material option

parent b6d1cb0a
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)", "author": "Florian Meyer (tstscr)",
"version": (1, 0), "version": (1, 1),
"blender": (2, 6, 1), "blender": (2, 6, 3),
"location": "File > Import > Images as Planes", "location": "File > Import > Images as Planes",
"description": "Imports images and creates planes with the appropriate " "description": "Imports images and creates planes with the appropriate "
"aspect ratio. The images are mapped to the planes.", "aspect ratio. The images are mapped to the planes.",
...@@ -126,6 +126,7 @@ def create_material_for_texture(self, texture): ...@@ -126,6 +126,7 @@ def create_material_for_texture(self, texture):
material.use_transparency = self.use_transparency material.use_transparency = self.use_transparency
material.transparency_method = self.transparency_method material.transparency_method = self.transparency_method
material.use_shadeless = self.use_shadeless material.use_shadeless = self.use_shadeless
material.use_transparent_shadows = self.use_transparent_shadows
return material return material
# if no material found: create one # if no material found: create one
...@@ -145,6 +146,7 @@ def create_material_for_texture(self, texture): ...@@ -145,6 +146,7 @@ def create_material_for_texture(self, texture):
material.use_transparency = self.use_transparency material.use_transparency = self.use_transparency
material.transparency_method = self.transparency_method material.transparency_method = self.transparency_method
material.use_shadeless = self.use_shadeless material.use_shadeless = self.use_shadeless
material.use_transparent_shadows = self.use_transparent_shadows
return material return material
...@@ -347,6 +349,11 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper): ...@@ -347,6 +349,11 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
'Raytrace', 'Raytrace',
'Use raytracing for transparent refraction rendering.')), 'Use raytracing for transparent refraction rendering.')),
) )
use_transparent_shadows = BoolProperty(
name="Receive Transparent",
description="Set material to receive transparent shadows",
default=False,
)
# ------------- # -------------
# Image Options # Image Options
...@@ -380,6 +387,7 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper): ...@@ -380,6 +387,7 @@ class IMPORT_OT_image_to_plane(Operator, ImportHelper, AddObjectHelper):
box.prop(self, "use_transparency") box.prop(self, "use_transparency")
box.prop(self, "use_premultiply") box.prop(self, "use_premultiply")
box.prop(self, "transparency_method", expand=True) box.prop(self, "transparency_method", expand=True)
box.prop(self, "use_transparent_shadows")
box = layout.box() box = layout.box()
box.label("Plane dimensions:", icon='ARROW_LEFTRIGHT') box.label("Plane dimensions:", icon='ARROW_LEFTRIGHT')
......
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