self.layout.prop(mat, "render_mode")
if mat.render_mode=='CUSTOM':
self.layout.prop(mat, "shader")
+ if mat.shadow_method!='NONE':
+ self.layout.prop(mat, "shadow_shader")
elif mat.render_mode=='EXTERNAL':
self.layout.prop(mat, "technique")
+ if mat.render_mode=='BUILTIN':
+ self.layout.prop(mat, "receive_shadows")
+ self.layout.prop(mat, "image_based_lighting")
self.layout.prop(mat, "array_atlas")
if mat.array_atlas:
self.layout.prop(mat, "array_layer")
("CUSTOM", "Custom shader", "Use a custom shader"),
("EXTERNAL", "External technique", "Use an externally defined technique")))
bpy.types.Material.technique = bpy.props.StringProperty(name="Custom technique", description="Name of an external technique to use for rendering")
- bpy.types.Material.shader = bpy.props.StringProperty(name="Custom shader", description="Name of an external technique to use for rendering")
+ bpy.types.Material.shader = bpy.props.StringProperty(name="Custom shader", description="Name of a custom shader to use for rendering")
+ bpy.types.Material.shadow_shader = bpy.props.StringProperty(name="Custom shadow shader", description="Name of a custom shader to use for shadow pass")
+ bpy.types.Material.receive_shadows = bpy.props.BoolProperty(name="Receive shadows", description="Receive shadows from a shadow map", default=True)
+ bpy.types.Material.image_based_lighting = bpy.props.BoolProperty(name="Image based lighting", description="Use an environment map for ambient lighting", default=False)
bpy.types.Material.array_atlas = bpy.props.BoolProperty(name="Texture array atlas", description="The material is stored in a texture array")
bpy.types.Material.array_layer = bpy.props.IntProperty("Texture array layer", description="Layer of the texture array atlas to use")
bpy.types.Material.material_atlas = bpy.props.BoolProperty(name="Material atlas", description="Make this material part of a material atlas")