* Added more material buttons by William. Thanks.
I made some minor adjustments and added Specular Shader Model RNA.
* Code cleanup and some consistency tweaks of button files.
Notes: Preview render now only shows up when there is an active world, material, texture or lamp.
* Made sure initial panels with ID Datablocks are shown, even when no block is active.
class DATA_PT_skeleton(DataButtonsPanel):
__idname__ = "DATA_PT_skeleton"
__label__ = "Skeleton"
+
+ def poll(self, context):
+ return (context.object.type == 'ARMATURE' or context.armature)
def draw(self, context):
+ layout = self.layout
+
ob = context.object
arm = context.armature
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
__label__ = "Display"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
__label__ = "Paths"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
__label__ = "Ghost"
def draw(self, context):
- arm = context.armature
layout = self.layout
+ arm = context.armature
split = layout.split()
bpy.types.register(DATA_PT_skeleton)
bpy.types.register(DATA_PT_display)
bpy.types.register(DATA_PT_paths)
-bpy.types.register(DATA_PT_ghost)
+bpy.types.register(DATA_PT_ghost)
\ No newline at end of file
__label__ = "Bone"
def draw(self, context):
- bone = context.bone
layout = self.layout
+ bone = context.bone
split = layout.split()
sub.itemR(bone, "cyclic_offset")
-bpy.types.register(BONE_PT_bone)
-
+bpy.types.register(BONE_PT_bone)
\ No newline at end of file
class DATA_PT_camera(DataButtonsPanel):
__idname__ = "DATA_PT_camera"
__label__ = "Lens"
+
+ def poll(self, context):
+ return (context.object.type == 'CAMERA')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
cam = context.camera
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
class DATA_PT_camera_display(DataButtonsPanel):
__idname__ = "DATA_PT_camera_display"
__label__ = "Display"
-
+
def draw(self, context):
cam = context.camera
layout = self.layout
col.itemR(cam, "draw_size", text="Size")
bpy.types.register(DATA_PT_camera)
-bpy.types.register(DATA_PT_camera_display)
+bpy.types.register(DATA_PT_camera_display)
\ No newline at end of file
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'CURVE' and context.curve)
+ return (context.object.type == 'CURVE' and context.curve)
class DATA_PT_shape_curve(DataButtonsPanel):
__idname__ = "DATA_PT_shape_curve"
__label__ = "Shape"
+
+ def poll(self, context):
+ return (context.object.type == 'CURVE')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
curve = context.curve
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
__label__ = "Geometry"
def draw(self, context):
- curve = context.curve
layout = self.layout
+ curve = context.curve
split = layout.split()
__label__ = "Path Animation"
def draw_header(self, context):
+ layout = self.layout
curve = context.curve
- layout = self.layout
layout.itemR(curve, "path", text="")
def draw(self, context):
__label__ = "Current Curve"
def draw(self, context):
- currentcurve = context.curve.curves[0] # XXX
layout = self.layout
+ currentcurve = context.curve.curves[0] # XXX
split = layout.split()
bpy.types.register(DATA_PT_shape_curve)
bpy.types.register(DATA_PT_geometry)
bpy.types.register(DATA_PT_pathanim)
-bpy.types.register(DATA_PT_current_curve)
+bpy.types.register(DATA_PT_current_curve)
\ No newline at end of file
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'EMPTY')
+ return (context.object.type == 'EMPTY')
class DATA_PT_empty(DataButtonsPanel):
__idname__ = "DATA_PT_empty"
__label__ = "Empty"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "empty_draw_type")
layout.itemR(ob, "empty_draw_size")
-bpy.types.register(DATA_PT_empty)
+bpy.types.register(DATA_PT_empty)
\ No newline at end of file
class DATA_PT_lamp(DataButtonsPanel):
__idname__ = "DATA_PT_lamp"
__label__ = "Lamp"
+
+ def poll(self, context):
+ return (context.object.type == 'LAMP')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
lamp = context.lamp
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
return (lamp and lamp.type == 'SUN')
def draw(self, context):
- lamp = context.lamp.sky
layout = self.layout
+ lamp = context.lamp.sky
row = layout.row()
row.itemR(lamp, "sky")
split = layout.split()
col = split.column()
-
sub = col.column()
sub.active = lamp.sky
sub.itemR(lamp, "sky_blend_type", text="Blend Type")
return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.itemR(lamp, "shadow_method", expand=True)
return (lamp and lamp.type == 'SPOT')
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
split = layout.split()
return False
def draw(self, context):
- lamp = context.lamp
layout = self.layout
+ lamp = context.lamp
layout.template_curve_mapping(lamp.falloff_curve)
class DATA_PT_lattice(DataButtonsPanel):
__idname__ = "DATA_PT_lattice"
__label__ = "Lattice"
+
+ def poll(self, context):
+ return (context.object.type == 'LATTICE')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
lat = context.lattice
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
row.itemR(lat, "outside")
row.itemR(lat, "shape_keys")
-bpy.types.register(DATA_PT_lattice)
+bpy.types.register(DATA_PT_lattice)
\ No newline at end of file
class DATA_PT_mesh(DataButtonsPanel):
__idname__ = "DATA_PT_mesh"
__label__ = "Mesh"
+
+ def poll(self, context):
+ return (context.object.type == 'MESH')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
mesh = context.mesh
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
layout.itemR(mesh, "texco_mesh")
-bpy.types.register(DATA_PT_mesh)
+bpy.types.register(DATA_PT_mesh)
\ No newline at end of file
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "modifier"
-
- def poll(self, context):
- ob = context.object
- return (ob and ob.type in ('MESH', 'CURVE', 'SURFACE', 'TEXT', 'LATTICE'))
-
+
class DATA_PT_modifiers(DataButtonsPanel):
__idname__ = "DATA_PT_modifiers"
__label__ = "Modifiers"
col.itemR(md, "width", slider=True)
col.itemR(md, "narrowness", slider=True)
-bpy.types.register(DATA_PT_modifiers)
+bpy.types.register(DATA_PT_modifiers)
\ No newline at end of file
__context__ = "data"
def poll(self, context):
- ob = context.object
- return (ob and ob.type == 'TEXT')
+ return (context.object.type == 'TEXT' and context.curve)
class DATA_PT_shape_text(DataButtonsPanel):
__idname__ = "DATA_PT_shape_text"
- __label__ = "Shape"
+ __label__ = "Shape Text"
+
+ def poll(self, context):
+ ob = context.object
+ return (context.object.type == 'TEXT')
def draw(self, context):
+ layout = self.layout
+
ob = context.object
curve = context.curve
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
__label__ = "Font"
def draw(self, context):
- text = context.curve
layout = self.layout
+ text = context.curve
layout.row()
layout.itemR(text, "font")
__label__ = "Paragraph"
def draw(self, context):
- text = context.curve
layout = self.layout
+ text = context.curve
layout.itemL(text="Align:")
layout.itemR(text, "spacemode", expand=True)
sub.itemR(text, "x_offset", text="X")
sub.itemR(text, "y_offset", text="Y")
sub.itemR(text, "wrap")
-
+
+"""
class DATA_PT_textboxes(DataButtonsPanel):
__idname__ = "DATA_PT_textboxes"
__label__ = "Text Boxes"
def draw(self, context):
- text = context.curve
layout = self.layout
+ text = context.curve
+"""
bpy.types.register(DATA_PT_shape_text)
bpy.types.register(DATA_PT_font)
__idname__= "MATERIAL_PT_preview"
__label__ = "Preview"
- def poll(self, context):
- return (context.material or context.object)
-
def draw(self, context):
layout = self.layout
-
mat = context.material
+
layout.template_preview(mat)
class MATERIAL_PT_material(MaterialButtonsPanel):
__label__ = "Material"
def poll(self, context):
- return (context.material or context.object)
+ return (context.object != None)
def draw(self, context):
layout = self.layout
+
mat = context.material
ob = context.object
slot = context.material_slot
row.column().itemR(mat, "mirror_color")
layout.itemR(mat, "alpha", slider=True)
-
+
+class MATERIAL_PT_tangent(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_tangent"
+ __label__ = "Tangent Shading"
+
+ def draw_header(self, context):
+ layout = self.layout
+ mat = context.material
+
+ layout.itemR(mat, "tangent_shading", text="",)
+
+ def draw(self, context):
+ layout = self.layout
+ tan = context.material.strand
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemL(text="Size:")
+ sub.itemR(tan, "start_size", text="Root")
+ sub.itemR(tan, "end_size", text="Tip")
+ sub.itemR(tan, "min_size", text="Minimum")
+ sub.itemR(tan, "blend_distance")
+ sub.itemR(tan, "blender_units")
+
+ sub = split.column()
+ sub.itemR(tan, "surface_diffuse")
+ sub.itemR(tan, "shape")
+ sub.itemR(tan, "width_fade")
+ sub.itemR(tan, "uv_layer")
+
+class MATERIAL_PT_options(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_options"
+ __label__ = "Options"
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "traceable")
+ sub.itemR(mat, "full_oversampling")
+ sub.itemR(mat, "sky")
+ sub.itemR(mat, "exclude_mist")
+ sub.itemR(mat, "face_texture")
+ colsub = sub.column()
+ colsub.active = mat.face_texture
+ colsub.itemR(mat, "face_texture_alpha")
+ sub.itemR(mat, "invert_z")
+ sub.itemR(mat, "light_group")
+ sub.itemR(mat, "light_group_exclusive")
+
+ sub = split.column()
+ sub.itemL(text="Shadows:")
+ sub.itemR(mat, "shadows", text="Recieve")
+ sub.itemR(mat, "only_shadow", text="Render Shadows Only")
+ sub.itemR(mat, "cast_shadows_only", text="Cast Only")
+ sub.itemR(mat, "shadow_casting_alpha", text="Alpha", slider=True)
+ sub.itemR(mat, "transparent_shadows")
+ sub.itemR(mat, "ray_shadow_bias")
+ colsub = sub.column()
+ colsub.active = mat.ray_shadow_bias
+ colsub.itemR(mat, "shadow_ray_bias", text="Raytracing Bias")
+ sub.itemR(mat, "cast_buffer_shadows")
+ colsub = sub.column()
+ colsub.active = mat.cast_buffer_shadows
+ colsub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
+
+class MATERIAL_PT_shading(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_shading"
+ __label__ = "Shading"
+
+ def poll(self, context):
+ mat = context.material
+ return (mat and mat.type != "HALO")
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ row = layout.row()
+ row.itemR(mat, "shadeless")
+ row.itemR(mat, "wireframe")
+
+ #Diffuse
+ layout.itemL(text="Diffuse:")
+ layout.itemR(mat, "diffuse_shader", text="Shader")
+ layout.itemR(mat, "diffuse_ramp", text="Ramp")
+
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "diffuse_reflection", text="Reflection")
+ sub.itemR(mat, "roughness")
+ sub.itemR(mat, "params1_4")
+
+ sub = split.column()
+ sub.itemR(mat, "darkness")
+ sub.itemR(mat, "emit")
+ sub.itemR(mat, "ambient", slider=True)
+ sub.itemR(mat, "translucency", slider=True)
+ sub.itemR(mat, "object_color")
+ sub.itemR(mat, "vertex_color_light")
+ sub.itemR(mat, "vertex_color_paint")
+ sub.itemR(mat, "cubic")
+
+ layout.itemS()
+
+ #Specular
+ layout.itemL(text="Specular:")
+ layout.itemR(mat, "spec_shader", text="Shader")
+ layout.itemR(mat, "specular_ramp", text="Ramp")
+
+ flow = layout.column_flow()
+ flow.itemR(mat, "specularity", text="Intensity")
+ flow.itemR(mat, "specular_hardness", text="Hardness")
+ flow.itemR(mat, "specular_refraction", text="IOR")
+ flow.itemR(mat, "specular_slope", text="Slope")
+
class MATERIAL_PT_sss(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_sss"
__label__ = "Subsurface Scattering"
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
sss = context.material.subsurface_scattering
- layout = self.layout
layout.itemR(sss, "enabled", text="")
def draw(self, context):
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
raym = context.material.raytrace_mirror
- layout = self.layout
layout.itemR(raym, "enabled", text="")
def draw(self, context):
layout = self.layout
raym = context.material.raytrace_mirror
- layout.active = raym.enabled
+
+ layout.active = raym.enabled
+
split = layout.split()
sub = split.column()
return (mat and mat.type == "SURFACE")
def draw_header(self, context):
+ layout = self.layout
rayt = context.material.raytrace_transparency
- layout = self.layout
layout.itemR(rayt, "enabled", text="")
def draw(self, context):
layout = self.layout
rayt = context.material.raytrace_transparency
+
layout.active = rayt.enabled
split = layout.split()
flow.itemR(rayt, "filter", slider=True)
flow.itemR(rayt, "limit")
flow.itemR(rayt, "falloff")
- flow.itemR(rayt, "specular_opacity", slider=True)
+ flow.itemR(rayt, "specular_opacity", slider=True, text="Spec Opacity")
flow.itemR(rayt, "depth")
class MATERIAL_PT_halo(MaterialButtonsPanel):
def draw(self, context):
layout = self.layout
+
mat = context.material
halo = mat.halo
split = layout.split()
- col = split.column(align=True)
+ col = split.column()
col.itemL(text="General Settings:")
col.itemR(halo, "size")
col.itemR(halo, "hardness")
bpy.types.register(MATERIAL_PT_preview)
bpy.types.register(MATERIAL_PT_material)
+bpy.types.register(MATERIAL_PT_shading)
bpy.types.register(MATERIAL_PT_raymir)
bpy.types.register(MATERIAL_PT_raytransp)
bpy.types.register(MATERIAL_PT_sss)
bpy.types.register(MATERIAL_PT_halo)
-
+bpy.types.register(MATERIAL_PT_tangent)
+bpy.types.register(MATERIAL_PT_options)
\ No newline at end of file
__region_type__ = "WINDOW"
__context__ = "object"
- def poll(self, context):
- return (context.object != None)
-
class OBJECT_PT_transform(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_transform"
__label__ = "Transform"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.column().itemR(ob, "location")
__label__ = "Groups"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "pass_index")
__label__ = "Display"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "max_draw_type", text="Type")
__label__ = "Duplication"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "dupli_type", expand=True)
__label__ = "Animation"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
split = layout.split()
bpy.types.register(OBJECT_PT_groups)
bpy.types.register(OBJECT_PT_display)
bpy.types.register(OBJECT_PT_duplication)
-bpy.types.register(OBJECT_PT_animation)
-
+bpy.types.register(OBJECT_PT_animation)
\ No newline at end of file
def draw(self, context):
layout = self.layout
- md = context.cloth
- cloth = md.settings
+ cloth = context.cloth.settings
split = layout.split()
def draw_header(self, context):
layout = self.layout
- md = context.cloth
- cloth = md.collision_settings
+ cloth = context.cloth.settings
layout.itemR(cloth, "enable_collision", text="")
def draw(self, context):
layout = self.layout
+ cloth = context.cloth.settings
- md = context.cloth
- cloth = md.collision_settings
layout.active = cloth.enable_collision
col = layout.column_flow()
def draw_header(self, context):
layout = self.layout
- md = context.cloth
- cloth = md.settings
+ cloth = context.cloth.settings
layout.itemR(cloth, "stiffness_scaling", text="")
def draw(self, context):
layout = self.layout
+ cloth = context.cloth.settings
- md = context.cloth
- cloth = md.settings
layout.active = cloth.stiffness_scaling
split = layout.split()
__label__ = "Shading"
def draw(self, context):
- scene = context.scene
layout = self.layout
-
- rd = scene.render_data
+ rd = context.scene.render_data
split = layout.split()
__label__ = "Output"
def draw(self, context):
- scene = context.scene
layout = self.layout
-
- rd = scene.render_data
+ rd = context.scene.render_data
layout.itemR(rd, "output_path")
__label__ = "Anti-Aliasing"
def draw_header(self, context):
+ layout = self.layout
rd = context.scene.render_data
- layout = self.layout
layout.itemR(rd, "antialiasing", text="")
def draw(self, context):
- scene = context.scene
- rd = scene.render_data
-
layout = self.layout
+ rd = context.scene.render_data
+
layout.active = rd.antialiasing
split = layout.split()
__label__ = "Render"
def draw(self, context):
- scene = context.scene
layout = self.layout
-
- rd = scene.render_data
+ rd = context.scene.render_data
row = layout.row()
row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
__label__ = "Dimensions"
def draw(self, context):
- scene = context.scene
layout = self.layout
-
+
+ scene = context.scene
rd = scene.render_data
split = layout.split()
layout.itemR(rd, "stamp", text="")
def draw(self, context):
- scene = context.scene
- rd = scene.render_data
-
layout = self.layout
+ rd = context.scene.render_data
+
layout.active = rd.stamp
split = layout.split()
bpy.types.register(RENDER_PT_antialiasing)
bpy.types.register(RENDER_PT_shading)
bpy.types.register(RENDER_PT_output)
-bpy.types.register(RENDER_PT_stamp)
+bpy.types.register(RENDER_PT_stamp)
\ No newline at end of file
__context__ = "texture"
def poll(self, context):
- return (context.texture != None)
-
+ return (context.texture != None and context.texture.type != 'NONE')
+
class TEXTURE_PT_preview(TextureButtonsPanel):
__idname__= "TEXTURE_PT_preview"
__label__ = "Preview"
- def poll(self, context):
- return (context.texture or context.material)
-
def draw(self, context):
layout = self.layout
-
tex = context.texture
+
layout.template_preview(tex)
class TEXTURE_PT_texture(TextureButtonsPanel):
__label__ = "Texture"
def poll(self, context):
- return (context.texture or context.material or context.world or context.lamp)
+ return (context.material or context.world or context.lamp)
def draw(self, context):
layout = self.layout
+
tex = context.texture
ma = context.material
la = context.lamp
class TEXTURE_PT_mapping(TextureButtonsPanel):
__idname__= "TEXTURE_PT_mapping"
__label__ = "Mapping"
-
- def poll(self, context):
- return (context.texture != None and context.texture.type != 'NONE')
def draw(self, context):
layout = self.layout
class TEXTURE_PT_influence(TextureButtonsPanel):
__idname__= "TEXTURE_PT_influence"
__label__ = "Influence"
-
- def poll(self, context):
- return (context.texture != None and context.texture.type != 'NONE')
def draw(self, context):
layout = self.layout
+
textype = context.texture
tex = context.texture_slot
class TEXTURE_PT_colors(TextureButtonsPanel):
__idname__= "TEXTURE_PT_colors"
__label__ = "Colors"
-
- def poll(self, context):
- return (context.texture != None and context.texture.type != 'NONE')
def draw(self, context):
layout = self.layout
class WORLD_PT_preview(WorldButtonsPanel):
__label__ = "Preview"
- def poll(self, context):
- return (context.scene or context.world)
-
def draw(self, context):
layout = self.layout
-
world = context.world
+
layout.template_preview(world)
class WORLD_PT_world(WorldButtonsPanel):
__label__ = "World"
def poll(self, context):
- return (context.scene or context.world)
+ return (context.scene != None)
def draw(self, context):
+ layout = self.layout
+
scene = context.scene
world = context.world
space = context.space_data
- layout = self.layout
split = layout.split(percentage=0.65)
__label__ = "Color Correction"
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
row = layout.row()
row.itemR(world, "exposure")
__label__ = "Mist"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.mist, "enabled", text="")
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
+
layout.active = world.mist.enabled
flow = layout.column_flow()
__label__ = "Stars"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.stars, "enabled", text="")
def draw(self, context):
- world = context.world
layout = self.layout
+ world = context.world
+
layout.active = world.stars.enabled
flow = layout.column_flow()
__label__ = "Ambient Occlusion"
def draw_header(self, context):
+ layout = self.layout
world = context.world
- layout = self.layout
layout.itemR(world.ambient_occlusion, "enabled", text="")
def draw(self, context):
- world = context.world
- ao = world.ambient_occlusion
layout = self.layout
+ ao = context.world.ambient_occlusion
+
layout.active = ao.enabled
layout.itemR(ao, "gather_method", expand=True)
if ao.gather_method == 'RAYTRACE':
split = layout.split()
+
col = split.column()
col.itemR(ao, "samples")
col.itemR(ao, "distance")
+
col = split.column()
col.itemR(ao, "falloff")
colsub = col.column()
if ao.gather_method == 'APPROXIMATE':
split = layout.split()
+
col = split.column()
col.itemR(ao, "passes")
col.itemR(ao, "error_tolerance", text="Error")
col.itemR(ao, "correction")
+
col = split.column()
col.itemR(ao, "falloff")
colsub = col.column()
bpy.types.register(WORLD_PT_ambient_occlusion)
bpy.types.register(WORLD_PT_mist)
bpy.types.register(WORLD_PT_stars)
-bpy.types.register(WORLD_PT_color_correction)
+bpy.types.register(WORLD_PT_color_correction)
\ No newline at end of file
void rna_def_material_specularity(StructRNA *srna)
{
PropertyRNA *prop;
-
+
+ static EnumPropertyItem prop_spec_shader_items[] = {
+ {MA_SPEC_COOKTORR, "COOKTORR", "CookTorr", ""},
+ {MA_SPEC_PHONG, "PHONG", "Phong", ""},
+ {MA_SPEC_BLINN, "BLINN", "Blinn", ""},
+ {MA_SPEC_TOON, "TOON", "Toon", ""},
+ {MA_SPEC_WARDISO, "WARDISO", "WardIso", ""},
+ {0, NULL, NULL, NULL}};
+
+ prop= RNA_def_property(srna, "spec_shader", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "spec_shader");
+ RNA_def_property_enum_items(prop, prop_spec_shader_items);
+ RNA_def_property_ui_text(prop, "Specular Shader Model", "");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
prop= RNA_def_property(srna, "specularity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Specularity Intensity", "");
/* XXX: this field is also used for Halo hardness. should probably be fixed in DNA */
+ /* I guess it's fine. Specular is disabled when mat type is Halo. --DingTo */
prop= RNA_def_property(srna, "specular_hardness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 1, 511);