Sculpt-dev: fix weight paint panel showing
up in sculpt mode
This commit is contained in:
parent
302dba95a3
commit
0837926740
Notes:
blender-bot
2023-02-14 10:21:11 +01:00
Referenced by commit 5519a6a520
, Fix T94243: weightpaint gradient panel shown in other places
|
@ -1127,7 +1127,7 @@ class FalloffPanel(BrushPanel):
|
|||
settings = self.paint_settings(context)
|
||||
mode = self.get_brush_mode(context)
|
||||
brush = settings.brush
|
||||
|
||||
|
||||
if mode == "SCULPT" and "falloff_curve" in brush.channels:
|
||||
layout.label(text="Falloff")
|
||||
ch = UnifiedPaintPanel.get_channel(context, brush, "falloff_curve")
|
||||
|
|
|
@ -810,7 +810,13 @@ class VIEW3D_PT_tools_weight_gradient(Panel, View3DPaintPanel):
|
|||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
if context.mode != "PAINT_WEIGHT":
|
||||
return False
|
||||
|
||||
settings = context.tool_settings.weight_paint
|
||||
if not settings:
|
||||
return False
|
||||
|
||||
brush = settings.brush
|
||||
return brush is not None
|
||||
|
||||
|
@ -845,6 +851,9 @@ class VIEW3D_PT_tools_brush_falloff(Panel, View3DPaintPanel, FalloffPanel):
|
|||
|
||||
class VIEW3D_PT_tools_brush_falloff_popover(Panel, View3DPaintPanel, FalloffPanel):
|
||||
bl_context = ".brush_editor" # dot on purpose (access from topbar)
|
||||
bl_space_type = "TOPBAR"
|
||||
bl_region_type = "HEADER"
|
||||
|
||||
#bl_parent_id = "VIEW3D_PT_tools_brush_settings"
|
||||
bl_label = ""
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
|
Loading…
Reference in New Issue