Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2010-04-06 09:52:52 +0400
committerMatt Ebb <matt@mke3.net>2010-04-06 09:52:52 +0400
commitb9d60f20102b4bf621a9bca244f627177af1cd99 (patch)
tree81fb5ed6654211158a86d02a971ad5e920965fc4 /release
parent34236eb67c61ceca1cdfd21b3361bb9a5ab9aa63 (diff)
Fix [#21440] Bug or loose feature? Texture painting brushes
Removed extra brush features that aren't applicable in some painting modes from the UI. Would be great to have this properly cleaned up and made consistent. Also tweak to startup blend, hiding brush tools panel.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/ui/properties_texture.py25
-rw-r--r--release/scripts/ui/space_view3d_toolbar.py3
2 files changed, 18 insertions, 10 deletions
diff --git a/release/scripts/ui/properties_texture.py b/release/scripts/ui/properties_texture.py
index 7a2213c719c..48f7d8f6d2a 100644
--- a/release/scripts/ui/properties_texture.py
+++ b/release/scripts/ui/properties_texture.py
@@ -203,6 +203,12 @@ class TextureSlotPanel(TextureButtonsPanel):
class TEXTURE_PT_mapping(TextureSlotPanel):
bl_label = "Mapping"
+ def poll(self, context):
+ idblock = context_tex_datablock(context)
+ if type(idblock) == bpy.types.Brush and not context.sculpt_object:
+ return False
+ return True
+
def draw(self, context):
layout = self.layout
@@ -242,15 +248,16 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
split.prop(tex, "object", text="")
if type(idblock) == bpy.types.Brush:
- layout.prop(tex, "map_mode", expand=True)
-
- row = layout.row()
- row.active = tex.map_mode in ('FIXED', 'TILED')
- row.prop(tex, "angle")
-
- row = layout.row()
- row.active = tex.map_mode in ('TILED', '3D')
- row.column().prop(tex, "size")
+ if context.sculpt_object:
+ layout.prop(tex, "map_mode", expand=True)
+
+ row = layout.row()
+ row.active = tex.map_mode in ('FIXED', 'TILED')
+ row.prop(tex, "angle")
+
+ row = layout.row()
+ row.active = tex.map_mode in ('TILED', '3D')
+ row.column().prop(tex, "size")
else:
if type(idblock) == bpy.types.Material:
split = layout.split(percentage=0.3)
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py
index 099e7944784..11a7fae894b 100644
--- a/release/scripts/ui/space_view3d_toolbar.py
+++ b/release/scripts/ui/space_view3d_toolbar.py
@@ -668,7 +668,8 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
- col.row().prop(tex_slot, "map_mode", expand=True)
+ if context.sculpt_object:
+ col.row().prop(tex_slot, "map_mode", expand=True)
class VIEW3D_PT_tools_brush_tool(PaintPanel):