diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-16 22:47:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-16 22:47:42 +0400 |
commit | 3a6bf17b3ef696c572207d5af3381c6327fe6a92 (patch) | |
tree | b95e5d5b869fc2c16a77e0a2ef1142899a6cb6e4 /release | |
parent | de59f34be0a2da17a90950aef1c87a0bb6c74052 (diff) |
UI
* Fix problem with curve mapping / color ramps not updating
things like previews propertly. Now it uses the RNA update
of the pointer from the material/texture/.. so each of those
can define their own update, but still share the RNA struct.
* Code for these templates is now in interface_templates.c
* Fix exception for "axis" property, now it always shows normal
widget with the PROP_DIRECTION subtype.
* Remove context from uiBlockLayoutResolve, no longer needed.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/buttons_data_lamp.py | 2 | ||||
-rw-r--r-- | release/ui/buttons_material.py | 6 | ||||
-rw-r--r-- | release/ui/buttons_scene.py | 3 | ||||
-rw-r--r-- | release/ui/buttons_texture.py | 8 | ||||
-rw-r--r-- | release/ui/space_userpref.py | 2 | ||||
-rw-r--r-- | release/ui/space_view3d_toolbar.py | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/release/ui/buttons_data_lamp.py b/release/ui/buttons_data_lamp.py index d5aaa5ad679..0dbda46bccf 100644 --- a/release/ui/buttons_data_lamp.py +++ b/release/ui/buttons_data_lamp.py @@ -301,7 +301,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel): def draw(self, context): lamp = context.lamp - self.layout.template_curve_mapping(lamp.falloff_curve) + self.layout.template_curve_mapping(lamp, "falloff_curve") bpy.types.register(DATA_PT_context_lamp) bpy.types.register(DATA_PT_preview) diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py index dc11731d7a9..9f1c216c36b 100644 --- a/release/ui/buttons_material.py +++ b/release/ui/buttons_material.py @@ -28,7 +28,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel): # this manages materials for all engine types engine = context.scene.render_data.engine - return (context.object) and (engine in self.COMPAT_ENGINES) + return (context.material or context.object) and (engine in self.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -282,7 +282,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel): if mat.use_diffuse_ramp: layout.itemS() - layout.template_color_ramp(mat.diffuse_ramp, expand=True) + layout.template_color_ramp(mat, "diffuse_ramp", expand=True) layout.itemS() row = layout.row() split = row.split(percentage=0.3) @@ -334,7 +334,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel): if mat.use_specular_ramp: layout.itemS() - layout.template_color_ramp(mat.specular_ramp, expand=True) + layout.template_color_ramp(mat, "specular_ramp", expand=True) layout.itemS() row = layout.row() split = row.split(percentage=0.3) diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index 3c321f11f6e..c25e6352aaf 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -240,7 +240,8 @@ class SCENE_PT_output(RenderButtonsPanel): split = layout.split() col = split.column() - col.itemR(rd, "exr_codec") + col.itemL(text="Codec:") + col.itemR(rd, "exr_codec", text="") subsplit = split.split() col = subsplit.column() diff --git a/release/ui/buttons_texture.py b/release/ui/buttons_texture.py index 3cea47a236e..c595e2b1cc2 100644 --- a/release/ui/buttons_texture.py +++ b/release/ui/buttons_texture.py @@ -96,7 +96,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel): layout.itemR(tex, "use_color_ramp", text="Ramp") if tex.use_color_ramp: - layout.template_color_ramp(tex.color_ramp, expand=True) + layout.template_color_ramp(tex, "color_ramp", expand=True) split = layout.split() @@ -410,10 +410,10 @@ class TEXTURE_PT_image(TextureTypePanel): def draw(self, context): layout = self.layout - + tex = context.texture - layout.template_texture_image(tex) + layout.template_image(tex, "image", tex.image_user) class TEXTURE_PT_image_sampling(TextureTypePanel): __label__ = "Image Sampling" @@ -689,7 +689,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel): if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_VELOCITY'): col.itemR(pd, "speed_scale") if pd.color_source in ('PARTICLE_SPEED', 'PARTICLE_AGE'): - layout.template_color_ramp(pd.color_ramp, expand=True) + layout.template_color_ramp(pd, "color_ramp", expand=True) col = split.column() col.itemL() diff --git a/release/ui/space_userpref.py b/release/ui/space_userpref.py index cfdabadcee1..267a0b4a78b 100644 --- a/release/ui/space_userpref.py +++ b/release/ui/space_userpref.py @@ -264,7 +264,7 @@ class USERPREF_PT_system(bpy.types.Panel): sub2 = sub1.column() sub2.active = system.use_weight_color_range - sub2.template_color_ramp(system.weight_color_range, expand=True) + sub2.template_color_ramp(system, "weight_color_range", expand=True) sub1.itemS() sub1.itemS() diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py index fe0f4ca5a21..f177c81b7b7 100644 --- a/release/ui/space_view3d_toolbar.py +++ b/release/ui/space_view3d_toolbar.py @@ -422,7 +422,7 @@ class VIEW3D_PT_tools_brush(PaintPanel): row.itemR(brush, "strength", slider=True) row.itemR(brush, "strength_pressure", toggle=True, text="") - col.itemR(brush, "blend") + col.itemR(brush, "blend", text="Blend") # Weight Paint Mode # @@ -508,7 +508,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel): settings = self.paint_settings(context) brush = settings.brush - layout.template_curve_mapping(brush.curve) + layout.template_curve_mapping(brush, "curve") layout.item_menu_enumO("brush.curve_preset", property="shape") class VIEW3D_PT_sculpt_options(PaintPanel): |