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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user