diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-12-08 23:10:59 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-12-08 23:10:59 +0300 |
commit | 5d2966283b82b8c5d4b1c47fcdd8511416dfbab8 (patch) | |
tree | 342be7f35b159c160494295523820d20190e57d7 /release/scripts/ui/properties_material.py | |
parent | 8f8aa3f8639d4fe30b99cb5567f5f8c83050d6d6 (diff) |
UI Cleanup: Halo materials and textures
* Textures applied to halo materials showed influence option for normal particles. This was really confusing, and with the cleanup I revealed a couple of hidden features too!
** Particles actually allow for textures to change halo size and hardness, but my guess is that nobody knew since the names were wrong in the ui!
** I also added the option to change the "add" value with a texture, since it was just silly not to have it.
* Halo material properties are also a bit cleaner now.
Diffstat (limited to 'release/scripts/ui/properties_material.py')
-rw-r--r-- | release/scripts/ui/properties_material.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/release/scripts/ui/properties_material.py b/release/scripts/ui/properties_material.py index 5c15bece6d6..6877d5da43a 100644 --- a/release/scripts/ui/properties_material.py +++ b/release/scripts/ui/properties_material.py @@ -269,7 +269,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel): 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) + return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -294,9 +294,6 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel): sub.prop(mat, "use_tangent_shading") sub.prop(mat, "use_cubic") - elif mat.type == 'HALO': - layout.prop(mat, "alpha") - class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel): bl_label = "Transparency" @@ -486,14 +483,30 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel): mat = context.material # dont use node material halo = mat.halo + def number_but(layout, toggle, number, name, color): + row = layout.row(align=True) + row.prop(halo, toggle, text="") + sub = row.column() + sub.active = getattr(halo, toggle) + sub.prop(halo, number, text=name) + if not color == "": + sub.prop(mat, color, text="") + split = layout.split() col = split.column() + col.prop(mat, "alpha") col.prop(mat, "diffuse_color", text="") + + col = split.column() col.prop(halo, "size") col.prop(halo, "hardness") col.prop(halo, "add") - col.label(text="Options:") + + layout.label(text="Options:") + + split = layout.split() + col = split.column() col.prop(halo, "use_texture") col.prop(halo, "use_vertex_normal") col.prop(halo, "use_extreme_alpha") @@ -501,22 +514,9 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel): col.prop(halo, "use_soft") col = split.column() - col.prop(halo, "use_ring") - sub = col.column() - sub.active = halo.use_ring - sub.prop(halo, "ring_count") - sub.prop(mat, "mirror_color", text="") - col.separator() - col.prop(halo, "use_lines") - sub = col.column() - sub.active = halo.use_lines - sub.prop(halo, "line_count", text="Lines") - sub.prop(mat, "specular_color", text="") - col.separator() - col.prop(halo, "use_star") - sub = col.column() - sub.active = halo.use_star - sub.prop(halo, "star_tip_count") + number_but(col, "use_ring", "ring_count", "Rings", "mirror_color") + number_but(col, "use_lines", "line_count", "Lines", "specular_color") + number_but(col, "use_star", "star_tip_count", "Star tips", "") class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel): |