2.5 Button Files:
authorThomas Dinges <blender@dingto.org>
Sat, 8 Aug 2009 17:21:34 +0000 (17:21 +0000)
committerThomas Dinges <blender@dingto.org>
Sat, 8 Aug 2009 17:21:34 +0000 (17:21 +0000)
* Cleanup of smoke and texture files to match guidelines.
* Made "Curve" Panel in Toolbar Closed per default.

release/ui/buttons_physics_smoke.py
release/ui/buttons_texture.py
release/ui/space_view3d_toolbar.py

index 6b6e91364afe62e88e49b33304c733e24bdc3c08..d28cda01fa0447558b8a22639559403e90df0aa3 100644 (file)
@@ -41,7 +41,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                        layout.itemR(md, "smoke_type")
                
                        if md.smoke_type == 'TYPE_DOMAIN':
-                               
                                split = layout.split()
                                
                                col = split.column()
@@ -56,13 +55,13 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                                sub.itemR(md.domain_settings, "amplify", text="High")
                                col.itemR(md.domain_settings, "highres", text="Use High Resolution")
                                
-                               sub = split.column()
-                               sub.itemL(text="Display:")
-                               sub.itemR(md.domain_settings, "visibility")
-                               sub.itemR(md.domain_settings, "color", slider=True)
-                               mysub = sub.column()
-                               mysub.active = md.domain_settings.highres
-                               mysub.itemR(md.domain_settings, "viewhighres")
+                               col = split.column()
+                               col.itemL(text="Display:")
+                               col.itemR(md.domain_settings, "visibility")
+                               col.itemR(md.domain_settings, "color", slider=True)
+                               sub = col.column()
+                               sub.active = md.domain_settings.highres
+                               sub.itemR(md.domain_settings, "viewhighres")
                                
                                layout.itemL(text="Noise Type:")
                                layout.itemR(md.domain_settings, "noise_type", expand=True)
@@ -81,7 +80,6 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                                col.itemR(md.domain_settings, "coll_group", text="")
                                
                        elif md.smoke_type == 'TYPE_FLOW':
-                               
                                split = layout.split()
                                
                                col = split.column()
@@ -92,12 +90,12 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
                                if md.flow_settings.outflow:                            
                                        col = split.column()
                                else:
-                                       sub = split.column()
-                                       sub.itemL(text="Behavior:")
-                                       sub.itemR(md.flow_settings, "temperature")
-                                       sub.itemR(md.flow_settings, "density")
+                                       col = split.column()
+                                       col.itemL(text="Behavior:")
+                                       col.itemR(md.flow_settings, "temperature")
+                                       col.itemR(md.flow_settings, "density")
                                        
-                       elif md.smoke_type == 'TYPE_COLL':
-                               layout.itemS()
+                       #elif md.smoke_type == 'TYPE_COLL':
+                       #       layout.itemS()
 
 bpy.types.register(PHYSICS_PT_smoke)
\ No newline at end of file
index 08ec8e36a0bbce693044964aa6a15b138e2b2d8d..f3d5d96cc28d0e90f79932db8c99b0d369e3c941 100644 (file)
@@ -7,14 +7,14 @@ class TextureButtonsPanel(bpy.types.Panel):
        __context__ = "texture"
        
        def poll(self, context):
-               return (context.texture != None and context.texture.type != 'NONE')
+               return (context.texture and context.texture.type != 'NONE')
                
 class TEXTURE_PT_preview(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_preview"
        __label__ = "Preview"
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                ma = context.material
                la = context.lamp
@@ -33,7 +33,6 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
                        layout.template_preview(tex)
 
 class TEXTURE_PT_context_texture(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_context_texture"
        __show_header__ = False
 
        def poll(self, context):
@@ -44,7 +43,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
 
                tex = context.texture
                
-               id =                            context.material
+               id = context.material
                if not id: id = context.lamp
                if not id: id = context.world
                if not id: id = context.brush
@@ -63,9 +62,9 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
                        split.template_ID(space, "pin_id")
 
                if (not space.pin_id) and (     context.sculpt_object or \
-                                                                               context.vertex_paint_object or \
-                                                                               context.weight_paint_object or \
-                                                                               context.texture_paint_object \
+                                                                       context.vertex_paint_object or \
+                                                                       context.weight_paint_object or \
+                                                                       context.texture_paint_object \
                                                                        ):
                        split.itemR(space, "brush_texture", text="Brush", toggle=True)
                
@@ -74,13 +73,10 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
                if tex:
                        split = layout.split(percentage=0.2)
                
-                       col = split.column()
-                       col.itemL(text="Type:")
-                       col = split.column()
-                       col.itemR(tex, "type", text="")
+                       split.itemL(text="Type:")
+                       split.itemR(tex, "type", text="")
 
 class TEXTURE_PT_mapping(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_mapping"
        __label__ = "Mapping"
        
        def poll(self, context):
@@ -88,6 +84,7 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                ma = context.material
                la = context.lamp
                wo = context.world
@@ -121,10 +118,8 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
                        
                if ma:
                        split = layout.split(percentage=0.3)
-                       col = split.column()
-                       col.itemL(text="Projection:")
-                       col = split.column()
-                       col.itemR(tex, "mapping", text="")
+                       split.itemL(text="Projection:")
+                       split.itemR(tex, "mapping", text="")
 
                        split = layout.split()
                        
@@ -147,7 +142,6 @@ class TEXTURE_PT_mapping(TextureButtonsPanel):
                row.column().itemR(tex, "size")
 
 class TEXTURE_PT_influence(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_influence"
        __label__ = "Influence"
        
        def poll(self, context):
@@ -174,7 +168,6 @@ class TEXTURE_PT_influence(TextureButtonsPanel):
                        split = layout.split()
                        
                        col = split.column()
-
                        col.itemL(text="Diffuse:")
                        factor_but(col, tex.map_diffuse, "map_diffuse", "diffuse_factor", "Intensity")
                        factor_but(col, tex.map_colordiff, "map_colordiff", "colordiff_factor", "Color")
@@ -198,15 +191,16 @@ class TEXTURE_PT_influence(TextureButtonsPanel):
                        factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
                        factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
 
-                       #colsub = col.column()
-                       #colsub.active = tex.map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
-                       #colsub.itemR(tex, "default_value", text="Amount", slider=True)
+                       #sub = col.column()
+                       #sub.active = tex.map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
+                       #sub.itemR(tex, "default_value", text="Amount", slider=True)
                elif la:
                        row = layout.row()
                        factor_but(row, tex.map_color, "map_color", "color_factor", "Color")
                        factor_but(row, tex.map_shadow, "map_shadow", "shadow_factor", "Shadow")
                elif wo:
                        split = layout.split()
+                       
                        col = split.column()
                        factor_but(col, tex.map_blend, "map_blend", "blend_factor", "Blend")
                        factor_but(col, tex.map_horizon, "map_horizon", "horizon_factor", "Horizon")
@@ -216,15 +210,15 @@ class TEXTURE_PT_influence(TextureButtonsPanel):
                        factor_but(col, tex.map_zenith_down, "map_zenith_down", "zenith_down_factor", "Zenith Down")
 
                layout.itemS()
+               
                split = layout.split()
 
                col = split.column()
-
                col.itemR(tex, "blend_type", text="Blend")
                col.itemR(tex, "rgb_to_intensity")
-               colsub = col.column()
-               colsub.active = tex.rgb_to_intensity
-               colsub.itemR(tex, "color", text="")
+               sub = col.column()
+               sub.active = tex.rgb_to_intensity
+               sub.itemR(tex, "color", text="")
 
                col = split.column()
                col.itemR(tex, "negate", text="Negative")
@@ -233,12 +227,12 @@ class TEXTURE_PT_influence(TextureButtonsPanel):
                        col.itemR(tex, "default_value", text="DVar", slider=True)
 
 class TEXTURE_PT_colors(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_colors"
        __label__ = "Colors"
        __default_closed__ = True
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
 
                layout.itemR(tex, "use_color_ramp", text="Ramp")
@@ -246,16 +240,17 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
                        layout.template_color_ramp(tex.color_ramp, expand=True)
 
                split = layout.split()
-               col = split.column()
-               col.itemR(tex, "rgb_factor", text="Multiply RGB")
+               
+               split.itemR(tex, "rgb_factor", text="Multiply RGB")
 
                col = split.column()
                col.itemL(text="Adjust:")
                col.itemR(tex, "brightness")
                col.itemR(tex, "contrast")
+               
+# Texture Type Panels #
 
 class TEXTURE_PT_clouds(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_clouds"
        __label__ = "Clouds"
        
        def poll(self, context):
@@ -264,6 +259,7 @@ class TEXTURE_PT_clouds(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "stype", expand=True)
@@ -271,13 +267,12 @@ class TEXTURE_PT_clouds(TextureButtonsPanel):
                layout.itemR(tex, "noise_type", text="Type", expand=True)
                layout.itemR(tex, "noise_basis", text="Basis")
                
-               col = layout.column_flow()
-               col.itemR(tex, "noise_size", text="Size")
-               col.itemR(tex, "noise_depth", text="Depth")
-               col.itemR(tex, "nabla", text="Nabla")
+               flow = layout.column_flow()
+               flow.itemR(tex, "noise_size", text="Size")
+               flow.itemR(tex, "noise_depth", text="Depth")
+               flow.itemR(tex, "nabla", text="Nabla")
 
 class TEXTURE_PT_wood(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_wood"
        __label__ = "Wood"
        
        def poll(self, context):
@@ -286,6 +281,7 @@ class TEXTURE_PT_wood(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "noisebasis2", expand=True)
@@ -297,14 +293,13 @@ class TEXTURE_PT_wood(TextureButtonsPanel):
                col.row().itemR(tex, "noise_type", text="Type", expand=True)
                col.itemR(tex, "noise_basis", text="Basis")
                
-               col = layout.column_flow()
-               col.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
-               col.itemR(tex, "noise_size", text="Size")
-               col.itemR(tex, "turbulence")
-               col.itemR(tex, "nabla")
+               flow = layout.column_flow()
+               flow.active = tex.stype in ('RINGNOISE', 'BANDNOISE')
+               flow.itemR(tex, "noise_size", text="Size")
+               flow.itemR(tex, "turbulence")
+               flow.itemR(tex, "nabla")
                
 class TEXTURE_PT_marble(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_marble"
        __label__ = "Marble"
        
        def poll(self, context):
@@ -313,6 +308,7 @@ class TEXTURE_PT_marble(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "stype", expand=True)
@@ -321,14 +317,13 @@ class TEXTURE_PT_marble(TextureButtonsPanel):
                layout.itemR(tex, "noise_type", text="Type", expand=True)
                layout.itemR(tex, "noise_basis", text="Basis")
                
-               col = layout.column_flow()      
-               col.itemR(tex, "noise_size", text="Size")
-               col.itemR(tex, "noise_depth", text="Depth")
-               col.itemR(tex, "turbulence")
-               col.itemR(tex, "nabla")
+               flow = layout.column_flow()     
+               flow.itemR(tex, "noise_size", text="Size")
+               flow.itemR(tex, "noise_depth", text="Depth")
+               flow.itemR(tex, "turbulence")
+               flow.itemR(tex, "nabla")
 
 class TEXTURE_PT_magic(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_magic"
        __label__ = "Magic"
        
        def poll(self, context):
@@ -337,6 +332,7 @@ class TEXTURE_PT_magic(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                        
                row = layout.row()
@@ -344,7 +340,6 @@ class TEXTURE_PT_magic(TextureButtonsPanel):
                row.itemR(tex, "turbulence")
 
 class TEXTURE_PT_blend(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_blend"
        __label__ = "Blend"
        
        def poll(self, context):
@@ -353,13 +348,13 @@ class TEXTURE_PT_blend(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
 
                layout.itemR(tex, "progression")
                layout.itemR(tex, "flip_axis")
                        
 class TEXTURE_PT_stucci(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_stucci"
        __label__ = "Stucci"
        
        def poll(self, context):
@@ -368,6 +363,7 @@ class TEXTURE_PT_stucci(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "stype", expand=True)
@@ -380,7 +376,6 @@ class TEXTURE_PT_stucci(TextureButtonsPanel):
                row.itemR(tex, "turbulence")
                
 class TEXTURE_PT_image(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_image"
        __label__ = "Image"
        
        def poll(self, context):
@@ -389,12 +384,12 @@ class TEXTURE_PT_image(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
 
                layout.template_texture_image(tex)
 
 class TEXTURE_PT_image_sampling(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_image_sampling"
        __label__ = "Image Sampling"
        __default_closed__ = True
        
@@ -404,47 +399,48 @@ class TEXTURE_PT_image_sampling(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                slot = context.texture_slot
                
                split = layout.split()
                
                """
-               sub = split.column()            
-               sub.itemR(tex, "flip_axis")
-               sub.itemR(tex, "normal_map")
+               col = split.column()            
+               col.itemR(tex, "flip_axis")
+               col.itemR(tex, "normal_map")
                if slot:
-                       row = sub.row()
+                       row = col.row()
                        row.active = tex.normal_map
                        row.itemR(slot, "normal_map_space", text="")
                """
 
-               sub = split.column()
-
-               sub.itemL(text="Alpha:")
-               sub.itemR(tex, "use_alpha", text="Use")
-               sub.itemR(tex, "calculate_alpha", text="Calculate")
-               sub.itemR(tex, "invert_alpha", text="Invert")
+               col = split.column()
+               col.itemL(text="Alpha:")
+               col.itemR(tex, "use_alpha", text="Use")
+               col.itemR(tex, "calculate_alpha", text="Calculate")
+               col.itemR(tex, "invert_alpha", text="Invert")
 
-               sub.itemL(text="Flip:")
-               sub.itemR(tex, "flip_axis", text="X/Y Axis")
+               col.itemL(text="Flip:")
+               col.itemR(tex, "flip_axis", text="X/Y Axis")
 
-               sub = split.column() 
-               sub.itemL(text="Filter:")
-               sub.itemR(tex, "filter", text="")
-               sub.itemR(tex, "mipmap")
-               row = sub.row()
-               row.itemR(tex, "mipmap_gauss", text="Gauss")
+               col = split.column() 
+               col.itemL(text="Filter:")
+               col.itemR(tex, "filter", text="")
+               col.itemR(tex, "mipmap")
+               
+               row = col.row()
                row.active = tex.mipmap
-               sub.itemR(tex, "interpolation")
+               row.itemR(tex, "mipmap_gauss", text="Gauss")
+               
+               col.itemR(tex, "interpolation")
                if tex.mipmap and tex.filter != 'DEFAULT':
                        if tex.filter == 'FELINE':
-                               sub.itemR(tex, "filter_probes", text="Probes")
+                               col.itemR(tex, "filter_probes", text="Probes")
                        else:
-                               sub.itemR(tex, "filter_eccentricity", text="Eccentricity")
+                               col.itemR(tex, "filter_eccentricity", text="Eccentricity")
 
 class TEXTURE_PT_image_mapping(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_image_mapping"
        __label__ = "Image Mapping"
        __default_closed__ = True
        
@@ -454,6 +450,7 @@ class TEXTURE_PT_image_mapping(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "extension")
@@ -461,38 +458,39 @@ class TEXTURE_PT_image_mapping(TextureButtonsPanel):
                split = layout.split()
                
                if tex.extension == 'REPEAT': 
-                       sub = split.column(align=True)
-                       sub.itemL(text="Repeat:")
-                       sub.itemR(tex, "repeat_x", text="X")
-                       sub.itemR(tex, "repeat_y", text="Y")
-                       sub = split.column(align=True)
-                       sub.itemL(text="Mirror:")
-                       sub.itemR(tex, "mirror_x", text="X")
-                       sub.itemR(tex, "mirror_y", text="Y")
+                       col = split.column(align=True)
+                       col.itemL(text="Repeat:")
+                       col.itemR(tex, "repeat_x", text="X")
+                       col.itemR(tex, "repeat_y", text="Y")
+                       
+                       col = split.column(align=True)
+                       col.itemL(text="Mirror:")
+                       col.itemR(tex, "mirror_x", text="X")
+                       col.itemR(tex, "mirror_y", text="Y")
                elif tex.extension == 'CHECKER': 
-                       sub = split.column(align=True)
-                       row = sub.row()
+                       col = split.column(align=True)
+                       row = col.row()
                        row.itemR(tex, "checker_even", text="Even")
                        row.itemR(tex, "checker_odd", text="Odd")
-                       sub = split.column()
-                       sub.itemR(tex, "checker_distance", text="Distance")
+
+                       split.itemR(tex, "checker_distance", text="Distance")
 
                layout.itemS()
 
                split = layout.split()
                
-               sub = split.column(align=True)
-               #sub.itemR(tex, "crop_rectangle")
-               sub.itemL(text="Crop Minimum:")
-               sub.itemR(tex, "crop_min_x", text="X")
-               sub.itemR(tex, "crop_min_y", text="Y")
-               sub = split.column(align=True)
-               sub.itemL(text="Crop Maximum:")
-               sub.itemR(tex, "crop_max_x", text="X")
-               sub.itemR(tex, "crop_max_y", text="Y")
+               col = split.column(align=True)
+               #col.itemR(tex, "crop_rectangle")
+               col.itemL(text="Crop Minimum:")
+               col.itemR(tex, "crop_min_x", text="X")
+               col.itemR(tex, "crop_min_y", text="Y")
+               
+               col = split.column(align=True)
+               col.itemL(text="Crop Maximum:")
+               col.itemR(tex, "crop_max_x", text="X")
+               col.itemR(tex, "crop_max_y", text="Y")
        
 class TEXTURE_PT_plugin(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_plugin"
        __label__ = "Plugin"
        
        def poll(self, context):
@@ -501,12 +499,12 @@ class TEXTURE_PT_plugin(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemL(text="Nothing yet")
                
 class TEXTURE_PT_envmap(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_envmap"
        __label__ = "Environment Map"
        
        def poll(self, context):
@@ -515,12 +513,12 @@ class TEXTURE_PT_envmap(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemL(text="Nothing yet")
                
 class TEXTURE_PT_musgrave(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_musgrave"
        __label__ = "Musgrave"
        
        def poll(self, context):
@@ -529,22 +527,24 @@ class TEXTURE_PT_musgrave(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                layout.itemR(tex, "musgrave_type")      
                
                split = layout.split()
                
-               sub = split.column()
-               sub.itemR(tex, "highest_dimension", text="Dimension")
-               sub.itemR(tex, "lacunarity")
-               sub.itemR(tex, "octaves")
-               sub = split.column() 
+               col = split.column()
+               col.itemR(tex, "highest_dimension", text="Dimension")
+               col.itemR(tex, "lacunarity")
+               col.itemR(tex, "octaves")
+               
+               col = split.column() 
                if (tex.musgrave_type in ('HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
-                       sub.itemR(tex, "offset")
+                       col.itemR(tex, "offset")
                if (tex.musgrave_type in ('RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL')):
-                       sub.itemR(tex, "gain")
-                       sub.itemR(tex, "noise_intensity", text="Intensity")
+                       col.itemR(tex, "gain")
+                       col.itemR(tex, "noise_intensity", text="Intensity")
                
                layout.itemL(text="Noise:")
                
@@ -555,7 +555,6 @@ class TEXTURE_PT_musgrave(TextureButtonsPanel):
                row.itemR(tex, "nabla")
 
 class TEXTURE_PT_voronoi(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_voronoi"
        __label__ = "Voronoi"
        
        def poll(self, context):
@@ -564,26 +563,27 @@ class TEXTURE_PT_voronoi(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
                
                split = layout.split()
                
-               sub = split.column()   
-               sub.itemL(text="Distance Metric:")
-               sub.itemR(tex, "distance_metric", text="")
-               subsub = sub.column()
-               subsub.active = tex.distance_metric == 'MINKOVSKY'
-               subsub.itemR(tex, "minkovsky_exponent", text="Exponent")
-               sub.itemL(text="Coloring:")
-               sub.itemR(tex, "coloring", text="")
-               sub.itemR(tex, "noise_intensity", text="Intensity")
-               
-               sub = split.column(align=True) 
-               sub.itemL(text="Feature Weights:")
-               sub.itemR(tex, "weight_1", text="1", slider=True)
-               sub.itemR(tex, "weight_2", text="2", slider=True)
-               sub.itemR(tex, "weight_3", text="3", slider=True)
-               sub.itemR(tex, "weight_4", text="4", slider=True)
+               col = split.column()   
+               col.itemL(text="Distance Metric:")
+               col.itemR(tex, "distance_metric", text="")
+               sub = col.column()
+               sub.active = tex.distance_metric == 'MINKOVSKY'
+               sub.itemR(tex, "minkovsky_exponent", text="Exponent")
+               col.itemL(text="Coloring:")
+               col.itemR(tex, "coloring", text="")
+               col.itemR(tex, "noise_intensity", text="Intensity")
+               
+               col = split.column(align=True) 
+               col.itemL(text="Feature Weights:")
+               col.itemR(tex, "weight_1", text="1", slider=True)
+               col.itemR(tex, "weight_2", text="2", slider=True)
+               col.itemR(tex, "weight_3", text="3", slider=True)
+               col.itemR(tex, "weight_4", text="4", slider=True)
                
                layout.itemL(text="Noise:")
                
@@ -592,7 +592,6 @@ class TEXTURE_PT_voronoi(TextureButtonsPanel):
                row.itemR(tex, "nabla")
                        
 class TEXTURE_PT_distortednoise(TextureButtonsPanel):
-       __idname__= "TEXTURE_PT_distortednoise"
        __label__ = "Distorted Noise"
        
        def poll(self, context):
@@ -601,19 +600,16 @@ class TEXTURE_PT_distortednoise(TextureButtonsPanel):
 
        def draw(self, context):
                layout = self.layout
+               
                tex = context.texture
 
                layout.itemR(tex, "noise_distortion")
                layout.itemR(tex, "noise_basis", text="Basis")
                
-               split = layout.split()
-               
-               sub = split.column()
-               sub.itemR(tex, "distortion_amount", text="Distortion")
-               sub.itemR(tex, "noise_size", text="Size")
-               
-               sub = split.column()
-               sub.itemR(tex, "nabla") 
+               flow = layout.column_flow()
+               flow.itemR(tex, "distortion_amount", text="Distortion")
+               flow.itemR(tex, "noise_size", text="Size")
+               flow.itemR(tex, "nabla")        
 
 bpy.types.register(TEXTURE_PT_context_texture)
 bpy.types.register(TEXTURE_PT_preview)
@@ -634,4 +630,3 @@ bpy.types.register(TEXTURE_PT_distortednoise)
 bpy.types.register(TEXTURE_PT_colors)
 bpy.types.register(TEXTURE_PT_mapping)
 bpy.types.register(TEXTURE_PT_influence)
-
index f207a3d14899873360cab29829c38b1ad7cf89b8..dd8a265947a6f17ee8352a015edd5d68e4d1601f 100644 (file)
@@ -441,6 +441,7 @@ class VIEW3D_PT_tools_brush(PaintPanel):
 
 class VIEW3D_PT_tools_brush_curve(PaintPanel):
        __label__ = "Curve"
+       __default_closed__ = True
 
        def poll(self, context):
                settings = self.paint_settings(context)