2.5 User Interface / UI Scripts
* Fixed some panel ordering after recent register changes. * Placed "Custom Props" to the bottom again, where possible This fixes [#23171] Material context is messed up.
This commit is contained in:
@@ -51,11 +51,6 @@ class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Skeleton"
|
||||
|
||||
@@ -285,6 +280,11 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inhe
|
||||
|
||||
self.draw_settings(context, ob.pose.animation_visualisation, bones=True)
|
||||
|
||||
|
||||
class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -47,18 +47,6 @@ class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
|
||||
row.prop(bone, "name", text="")
|
||||
|
||||
|
||||
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@property
|
||||
def _context_path(self):
|
||||
obj = bpy.context.object
|
||||
if obj and obj.mode == 'POSE':
|
||||
return "active_pose_bone"
|
||||
else:
|
||||
return "active_bone"
|
||||
|
||||
|
||||
class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Transform"
|
||||
|
||||
@@ -354,6 +342,18 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
|
||||
col.prop(bone, "cyclic_offset")
|
||||
|
||||
|
||||
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@property
|
||||
def _context_path(self):
|
||||
obj = bpy.context.object
|
||||
if obj and obj.mode == 'POSE':
|
||||
return "active_pose_bone"
|
||||
else:
|
||||
return "active_bone"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -53,11 +53,6 @@ class DATA_PT_context_camera(CameraButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Lens"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
@@ -137,6 +132,11 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
|
||||
sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
|
||||
|
||||
|
||||
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -69,11 +69,6 @@ class DATA_PT_context_curve(CurveButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shape"
|
||||
|
||||
@@ -385,6 +380,11 @@ class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
|
||||
row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
|
||||
|
||||
|
||||
class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -40,13 +40,6 @@ class DataButtonsPanel():
|
||||
return context.lamp and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.template_preview(context.lamp)
|
||||
|
||||
class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = ""
|
||||
bl_show_header = False
|
||||
@@ -69,9 +62,12 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.template_preview(context.lamp)
|
||||
|
||||
|
||||
class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
|
||||
@@ -387,6 +383,11 @@ class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
|
||||
self.layout.template_curve_mapping(lamp, "falloff_curve")
|
||||
|
||||
|
||||
class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -51,11 +51,6 @@ class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Lattice"
|
||||
|
||||
@@ -85,6 +80,11 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
|
||||
row = layout.row()
|
||||
row.prop(lat, "outside")
|
||||
row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")
|
||||
|
||||
|
||||
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
|
@@ -79,11 +79,6 @@ class DATA_PT_context_mesh(MeshButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Normals"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
@@ -351,6 +346,11 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel):
|
||||
layout.prop(lay, "name")
|
||||
|
||||
|
||||
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -51,11 +51,6 @@ class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
|
||||
split.separator()
|
||||
|
||||
|
||||
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Metaball"
|
||||
|
||||
@@ -120,6 +115,11 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
|
||||
col.prop(metaelem, "size_y", text="Y")
|
||||
|
||||
|
||||
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "object.data"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -63,14 +63,6 @@ class MaterialButtonsPanel():
|
||||
return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.template_preview(context.material)
|
||||
|
||||
|
||||
class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = ""
|
||||
bl_show_header = False
|
||||
@@ -127,203 +119,15 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
|
||||
|
||||
if mat:
|
||||
layout.prop(mat, "type", expand=True)
|
||||
|
||||
|
||||
|
||||
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "material"
|
||||
|
||||
|
||||
class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shading"
|
||||
class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
self.layout.template_preview(context.material)
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
if mat.type in ('SURFACE', 'WIRE'):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column()
|
||||
sub.active = not mat.shadeless
|
||||
sub.prop(mat, "emit")
|
||||
sub.prop(mat, "ambient")
|
||||
sub = col.column()
|
||||
sub.prop(mat, "translucency")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "shadeless")
|
||||
sub = col.column()
|
||||
sub.active = not mat.shadeless
|
||||
sub.prop(mat, "tangent_shading")
|
||||
sub.prop(mat, "cubic")
|
||||
|
||||
elif mat.type == 'HALO':
|
||||
layout.prop(mat, "alpha")
|
||||
|
||||
|
||||
class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Strand"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = context.material # dont use node material
|
||||
tan = mat.strand
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Size:")
|
||||
sub.prop(tan, "root_size", text="Root")
|
||||
sub.prop(tan, "tip_size", text="Tip")
|
||||
sub.prop(tan, "min_size", text="Minimum")
|
||||
sub.prop(tan, "blender_units")
|
||||
sub = col.column()
|
||||
sub.active = (not mat.shadeless)
|
||||
sub.prop(tan, "tangent_shading")
|
||||
col.prop(tan, "shape")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Shading:")
|
||||
col.prop(tan, "width_fade")
|
||||
ob = context.object
|
||||
if ob and ob.type == 'MESH':
|
||||
col.prop_object(tan, "uv_layer", ob.data, "uv_textures", text="")
|
||||
else:
|
||||
col.prop(tan, "uv_layer", text="")
|
||||
col.separator()
|
||||
sub = col.column()
|
||||
sub.active = (not mat.shadeless)
|
||||
sub.prop(tan, "surface_diffuse")
|
||||
sub = col.column()
|
||||
sub.active = tan.surface_diffuse
|
||||
sub.prop(tan, "blend_distance", text="Distance")
|
||||
|
||||
|
||||
class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Physics"
|
||||
COMPAT_ENGINES = {'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
phys = context.material.physics # dont use node material
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(phys, "distance")
|
||||
col.prop(phys, "friction")
|
||||
col.prop(phys, "align_to_normal")
|
||||
|
||||
col = split.column()
|
||||
col.prop(phys, "force", slider=True)
|
||||
col.prop(phys, "elasticity", slider=True)
|
||||
col.prop(phys, "damp", slider=True)
|
||||
|
||||
|
||||
class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Options"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "traceable")
|
||||
col.prop(mat, "full_oversampling")
|
||||
col.prop(mat, "use_sky")
|
||||
col.prop(mat, "exclude_mist")
|
||||
col.prop(mat, "invert_z")
|
||||
sub = col.row()
|
||||
sub.prop(mat, "z_offset")
|
||||
sub.active = mat.transparency and mat.transparency_method == 'Z_TRANSPARENCY'
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Light Group:")
|
||||
sub.prop(mat, "light_group", text="")
|
||||
row = sub.row()
|
||||
row.active = bool(mat.light_group)
|
||||
row.prop(mat, "light_group_exclusive", text="Exclusive")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "face_texture")
|
||||
sub = col.column()
|
||||
sub.active = mat.face_texture
|
||||
sub.prop(mat, "face_texture_alpha")
|
||||
col.separator()
|
||||
col.prop(mat, "vertex_color_paint")
|
||||
col.prop(mat, "vertex_color_light")
|
||||
col.prop(mat, "object_color")
|
||||
|
||||
|
||||
class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shadow"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "shadows", text="Receive")
|
||||
col.prop(mat, "receive_transparent_shadows", text="Receive Transparent")
|
||||
col.prop(mat, "only_shadow", text="Shadows Only")
|
||||
col.prop(mat, "cast_shadows_only", text="Cast Only")
|
||||
col.prop(mat, "shadow_casting_alpha", text="Casting Alpha")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "cast_buffer_shadows")
|
||||
sub = col.column()
|
||||
sub.active = mat.cast_buffer_shadows
|
||||
sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias")
|
||||
col.prop(mat, "ray_shadow_bias", text="Auto Ray Bias")
|
||||
sub = col.column()
|
||||
sub.active = (not mat.ray_shadow_bias)
|
||||
sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
|
||||
col.prop(mat, "cast_approximate")
|
||||
|
||||
class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Diffuse"
|
||||
@@ -457,113 +261,41 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
|
||||
row.prop(mat, "specular_ramp_factor", text="Factor")
|
||||
|
||||
|
||||
class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Subsurface Scattering"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shading"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
sss = mat.subsurface_scattering
|
||||
|
||||
self.layout.active = (not mat.shadeless)
|
||||
self.layout.prop(sss, "enabled", text="")
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
sss = mat.subsurface_scattering
|
||||
|
||||
layout.active = (sss.enabled) and (not mat.shadeless)
|
||||
if mat.type in ('SURFACE', 'WIRE'):
|
||||
split = layout.split()
|
||||
|
||||
row = layout.row().split()
|
||||
sub = row.row(align=True).split(percentage=0.75)
|
||||
sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
|
||||
sub.operator("material.sss_preset_add", text="", icon="ZOOMIN")
|
||||
col = split.column()
|
||||
sub = col.column()
|
||||
sub.active = not mat.shadeless
|
||||
sub.prop(mat, "emit")
|
||||
sub.prop(mat, "ambient")
|
||||
sub = col.column()
|
||||
sub.prop(mat, "translucency")
|
||||
|
||||
split = layout.split()
|
||||
col = split.column()
|
||||
col.prop(mat, "shadeless")
|
||||
sub = col.column()
|
||||
sub.active = not mat.shadeless
|
||||
sub.prop(mat, "tangent_shading")
|
||||
sub.prop(mat, "cubic")
|
||||
|
||||
col = split.column()
|
||||
col.prop(sss, "ior")
|
||||
col.prop(sss, "scale")
|
||||
col.prop(sss, "color", text="")
|
||||
col.prop(sss, "radius", text="RGB Radius", expand=True)
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Blend:")
|
||||
sub.prop(sss, "color_factor", text="Color")
|
||||
sub.prop(sss, "texture_factor", text="Texture")
|
||||
sub.label(text="Scattering Weight:")
|
||||
sub.prop(sss, "front")
|
||||
sub.prop(sss, "back")
|
||||
col.separator()
|
||||
col.prop(sss, "error_tolerance", text="Error")
|
||||
|
||||
|
||||
class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Mirror"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
raym = active_node_mat(context.material).raytrace_mirror
|
||||
|
||||
self.layout.prop(raym, "enabled", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
raym = mat.raytrace_mirror
|
||||
|
||||
layout.active = raym.enabled
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(raym, "reflect_factor")
|
||||
col.prop(mat, "mirror_color", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(raym, "fresnel")
|
||||
sub = col.column()
|
||||
sub.active = raym.fresnel > 0
|
||||
sub.prop(raym, "fresnel_factor", text="Blend")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.separator()
|
||||
col.prop(raym, "depth")
|
||||
col.prop(raym, "distance", text="Max Dist")
|
||||
col.separator()
|
||||
sub = col.split(percentage=0.4)
|
||||
sub.active = raym.distance > 0.0
|
||||
sub.label(text="Fade To:")
|
||||
sub.prop(raym, "fade_to", text="")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Gloss:")
|
||||
col.prop(raym, "gloss_factor", text="Amount")
|
||||
sub = col.column()
|
||||
sub.active = raym.gloss_factor < 1.0
|
||||
sub.prop(raym, "gloss_threshold", text="Threshold")
|
||||
sub.prop(raym, "gloss_samples", text="Samples")
|
||||
sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
|
||||
elif mat.type == 'HALO':
|
||||
layout.prop(mat, "alpha")
|
||||
|
||||
|
||||
class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
|
||||
@@ -625,39 +357,116 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
|
||||
sub = col.column()
|
||||
sub.active = rayt.gloss_factor < 1.0
|
||||
sub.prop(rayt, "gloss_threshold", text="Threshold")
|
||||
sub.prop(rayt, "gloss_samples", text="Samples")
|
||||
sub.prop(rayt, "gloss_samples", text="Samples")
|
||||
|
||||
|
||||
class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Transparency"
|
||||
|
||||
class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Mirror"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_GAME'}
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (engine in cls.COMPAT_ENGINES)
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
raym = active_node_mat(context.material).raytrace_mirror
|
||||
|
||||
self.layout.prop(mat, "transparency", text="")
|
||||
self.layout.prop(raym, "enabled", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
rayt = mat.raytrace_transparency
|
||||
raym = mat.raytrace_mirror
|
||||
|
||||
row = layout.row()
|
||||
row.active = mat.transparency and (not mat.shadeless)
|
||||
row.prop(mat, "transparency_method", expand=True)
|
||||
layout.active = raym.enabled
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "alpha")
|
||||
col.prop(raym, "reflect_factor")
|
||||
col.prop(mat, "mirror_color", text="")
|
||||
|
||||
col = split.column()
|
||||
col.prop(raym, "fresnel")
|
||||
sub = col.column()
|
||||
sub.active = raym.fresnel > 0
|
||||
sub.prop(raym, "fresnel_factor", text="Blend")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.separator()
|
||||
col.prop(raym, "depth")
|
||||
col.prop(raym, "distance", text="Max Dist")
|
||||
col.separator()
|
||||
sub = col.split(percentage=0.4)
|
||||
sub.active = raym.distance > 0.0
|
||||
sub.label(text="Fade To:")
|
||||
sub.prop(raym, "fade_to", text="")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Gloss:")
|
||||
col.prop(raym, "gloss_factor", text="Amount")
|
||||
sub = col.column()
|
||||
sub.active = raym.gloss_factor < 1.0
|
||||
sub.prop(raym, "gloss_threshold", text="Threshold")
|
||||
sub.prop(raym, "gloss_samples", text="Samples")
|
||||
sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
|
||||
|
||||
|
||||
class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Subsurface Scattering"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
sss = mat.subsurface_scattering
|
||||
|
||||
self.layout.active = (not mat.shadeless)
|
||||
self.layout.prop(sss, "enabled", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
sss = mat.subsurface_scattering
|
||||
|
||||
layout.active = (sss.enabled) and (not mat.shadeless)
|
||||
|
||||
row = layout.row().split()
|
||||
sub = row.row(align=True).split(percentage=0.75)
|
||||
sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
|
||||
sub.operator("material.sss_preset_add", text="", icon="ZOOMIN")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(sss, "ior")
|
||||
col.prop(sss, "scale")
|
||||
col.prop(sss, "color", text="")
|
||||
col.prop(sss, "radius", text="RGB Radius", expand=True)
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Blend:")
|
||||
sub.prop(sss, "color_factor", text="Color")
|
||||
sub.prop(sss, "texture_factor", text="Texture")
|
||||
sub.label(text="Scattering Weight:")
|
||||
sub.prop(sss, "front")
|
||||
sub.prop(sss, "back")
|
||||
col.separator()
|
||||
col.prop(sss, "error_tolerance", text="Error")
|
||||
|
||||
|
||||
class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
|
||||
@@ -744,6 +553,193 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
|
||||
col.prop(halo, "flare_subsize", text="Subsize")
|
||||
|
||||
|
||||
class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Physics"
|
||||
COMPAT_ENGINES = {'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
phys = context.material.physics # dont use node material
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(phys, "distance")
|
||||
col.prop(phys, "friction")
|
||||
col.prop(phys, "align_to_normal")
|
||||
|
||||
col = split.column()
|
||||
col.prop(phys, "force", slider=True)
|
||||
col.prop(phys, "elasticity", slider=True)
|
||||
col.prop(phys, "damp", slider=True)
|
||||
|
||||
|
||||
class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Strand"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = context.material
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = context.material # dont use node material
|
||||
tan = mat.strand
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Size:")
|
||||
sub.prop(tan, "root_size", text="Root")
|
||||
sub.prop(tan, "tip_size", text="Tip")
|
||||
sub.prop(tan, "min_size", text="Minimum")
|
||||
sub.prop(tan, "blender_units")
|
||||
sub = col.column()
|
||||
sub.active = (not mat.shadeless)
|
||||
sub.prop(tan, "tangent_shading")
|
||||
col.prop(tan, "shape")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Shading:")
|
||||
col.prop(tan, "width_fade")
|
||||
ob = context.object
|
||||
if ob and ob.type == 'MESH':
|
||||
col.prop_object(tan, "uv_layer", ob.data, "uv_textures", text="")
|
||||
else:
|
||||
col.prop(tan, "uv_layer", text="")
|
||||
col.separator()
|
||||
sub = col.column()
|
||||
sub.active = (not mat.shadeless)
|
||||
sub.prop(tan, "surface_diffuse")
|
||||
sub = col.column()
|
||||
sub.active = tan.surface_diffuse
|
||||
sub.prop(tan, "blend_distance", text="Distance")
|
||||
|
||||
|
||||
class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Options"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "traceable")
|
||||
col.prop(mat, "full_oversampling")
|
||||
col.prop(mat, "use_sky")
|
||||
col.prop(mat, "exclude_mist")
|
||||
col.prop(mat, "invert_z")
|
||||
sub = col.row()
|
||||
sub.prop(mat, "z_offset")
|
||||
sub.active = mat.transparency and mat.transparency_method == 'Z_TRANSPARENCY'
|
||||
sub = col.column(align=True)
|
||||
sub.label(text="Light Group:")
|
||||
sub.prop(mat, "light_group", text="")
|
||||
row = sub.row()
|
||||
row.active = bool(mat.light_group)
|
||||
row.prop(mat, "light_group_exclusive", text="Exclusive")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "face_texture")
|
||||
sub = col.column()
|
||||
sub.active = mat.face_texture
|
||||
sub.prop(mat, "face_texture_alpha")
|
||||
col.separator()
|
||||
col.prop(mat, "vertex_color_paint")
|
||||
col.prop(mat, "vertex_color_light")
|
||||
col.prop(mat, "object_color")
|
||||
|
||||
|
||||
class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Shadow"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "shadows", text="Receive")
|
||||
col.prop(mat, "receive_transparent_shadows", text="Receive Transparent")
|
||||
col.prop(mat, "only_shadow", text="Shadows Only")
|
||||
col.prop(mat, "cast_shadows_only", text="Cast Only")
|
||||
col.prop(mat, "shadow_casting_alpha", text="Casting Alpha")
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "cast_buffer_shadows")
|
||||
sub = col.column()
|
||||
sub.active = mat.cast_buffer_shadows
|
||||
sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias")
|
||||
col.prop(mat, "ray_shadow_bias", text="Auto Ray Bias")
|
||||
sub = col.column()
|
||||
sub.active = (not mat.ray_shadow_bias)
|
||||
sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
|
||||
col.prop(mat, "cast_approximate")
|
||||
|
||||
|
||||
class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Transparency"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_GAME'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
mat = active_node_mat(context.material)
|
||||
engine = context.scene.render.engine
|
||||
return mat and (engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw_header(self, context):
|
||||
mat = active_node_mat(context.material)
|
||||
|
||||
self.layout.prop(mat, "transparency", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
mat = active_node_mat(context.material)
|
||||
rayt = mat.raytrace_transparency
|
||||
|
||||
row = layout.row()
|
||||
row.active = mat.transparency and (not mat.shadeless)
|
||||
row.prop(mat, "transparency_method", expand=True)
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(mat, "alpha")
|
||||
|
||||
|
||||
class VolumeButtonsPanel():
|
||||
bl_space_type = 'PROPERTIES'
|
||||
bl_region_type = 'WINDOW'
|
||||
@@ -897,6 +893,11 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
|
||||
row.prop(mat, "light_group_exclusive", text="Exclusive")
|
||||
|
||||
|
||||
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "material"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -43,11 +43,6 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
|
||||
layout.prop(scene, "set", text="Background")
|
||||
|
||||
|
||||
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "scene"
|
||||
|
||||
|
||||
class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Units"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
@@ -205,6 +200,11 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
|
||||
col.prop(rd, "simplify_ao_sss", text="AO and SSS")
|
||||
|
||||
|
||||
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "scene"
|
||||
|
||||
|
||||
from bpy.props import *
|
||||
|
||||
|
||||
|
@@ -74,23 +74,6 @@ class TextureButtonsPanel():
|
||||
return tex and (tex.type != 'NONE' or tex.use_nodes) and (context.scene.render.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
tex = context.texture
|
||||
slot = getattr(context, "texture_slot", None)
|
||||
idblock = context_tex_datablock(context)
|
||||
|
||||
if idblock:
|
||||
layout.template_preview(tex, parent=idblock, slot=slot)
|
||||
else:
|
||||
layout.template_preview(tex, slot=slot)
|
||||
|
||||
|
||||
class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
|
||||
bl_label = ""
|
||||
bl_show_header = False
|
||||
@@ -155,9 +138,21 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
|
||||
split.prop(tex, "type", text="")
|
||||
|
||||
|
||||
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "texture"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
tex = context.texture
|
||||
slot = getattr(context, "texture_slot", None)
|
||||
idblock = context_tex_datablock(context)
|
||||
|
||||
if idblock:
|
||||
layout.template_preview(tex, parent=idblock, slot=slot)
|
||||
else:
|
||||
layout.template_preview(tex, slot=slot)
|
||||
|
||||
|
||||
class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
|
||||
@@ -989,6 +984,11 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
|
||||
col.prop(pd, "turbulence_strength")
|
||||
|
||||
|
||||
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "texture"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
@@ -33,19 +33,6 @@ class WorldButtonsPanel():
|
||||
return (rd.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
|
||||
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.template_preview(context.world)
|
||||
|
||||
|
||||
class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = ""
|
||||
bl_show_header = False
|
||||
@@ -70,9 +57,23 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
split.template_ID(space, "pin_id")
|
||||
|
||||
|
||||
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "world"
|
||||
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Preview"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
rd = context.scene.render
|
||||
return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
|
||||
|
||||
def draw(self, context):
|
||||
self.layout.template_preview(context.world)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
@@ -96,62 +97,6 @@ class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
|
||||
row.column().prop(world, "ambient_color")
|
||||
|
||||
|
||||
class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Mist"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
world = context.world
|
||||
|
||||
self.layout.prop(world.mist, "use_mist", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
world = context.world
|
||||
|
||||
layout.active = world.mist.use_mist
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist, "intensity", slider=True)
|
||||
col.prop(world.mist, "start")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist, "depth")
|
||||
col.prop(world.mist, "height")
|
||||
|
||||
layout.prop(world.mist, "falloff")
|
||||
|
||||
|
||||
class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Stars"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
world = context.world
|
||||
|
||||
self.layout.prop(world.stars, "use_stars", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
world = context.world
|
||||
|
||||
layout.active = world.stars.use_stars
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.stars, "size")
|
||||
col.prop(world.stars, "color_randomization", text="Colors")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.stars, "min_distance", text="Min. Dist")
|
||||
col.prop(world.stars, "average_separation", text="Separation")
|
||||
|
||||
|
||||
class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Ambient Occlusion"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
@@ -262,6 +207,67 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
|
||||
col.prop(light, "correction")
|
||||
|
||||
|
||||
class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Mist"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
world = context.world
|
||||
|
||||
self.layout.prop(world.mist, "use_mist", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
world = context.world
|
||||
|
||||
layout.active = world.mist.use_mist
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist, "intensity", slider=True)
|
||||
col.prop(world.mist, "start")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.mist, "depth")
|
||||
col.prop(world.mist, "height")
|
||||
|
||||
layout.prop(world.mist, "falloff")
|
||||
|
||||
|
||||
class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
|
||||
bl_label = "Stars"
|
||||
bl_default_closed = True
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER'}
|
||||
|
||||
def draw_header(self, context):
|
||||
world = context.world
|
||||
|
||||
self.layout.prop(world.stars, "use_stars", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
world = context.world
|
||||
|
||||
layout.active = world.stars.use_stars
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.stars, "size")
|
||||
col.prop(world.stars, "color_randomization", text="Colors")
|
||||
|
||||
col = split.column()
|
||||
col.prop(world.stars, "min_distance", text="Min. Dist")
|
||||
col.prop(world.stars, "average_separation", text="Separation")
|
||||
|
||||
|
||||
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
_context_path = "world"
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user