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:
authorJoseph Eagar <joeedh@gmail.com>2021-03-30 10:57:43 +0300
committerJoseph Eagar <joeedh@gmail.com>2021-03-30 10:57:43 +0300
commit2cf8c35578ca9961e812b5c4d27f01da15211fc9 (patch)
treedea53fd7ba89808f38c1b34168f5ebd657ac8023 /release/scripts/startup/bl_ui/space_view3d_toolbar.py
parentaa116ba5bac6a8138f1f14c582fe8246ffd356e9 (diff)
parent563d513e37b68431fe1006450e5736e763c70a7b (diff)
Merge branch 'master' into temp_bmesh_multires
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index dc920d328ea..6cbf2fd4533 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -622,9 +622,15 @@ class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
@classmethod
def poll(cls, context):
- settings = cls.paint_settings(context)
- return (settings and settings.brush and
- (context.sculpt_object or context.image_paint_object or context.vertex_paint_object))
+ if (
+ (settings := cls.paint_settings(context)) and
+ (brush := settings.brush)
+ ):
+ if context.sculpt_object or context.vertex_paint_object:
+ return True
+ elif context.image_paint_object:
+ return (brush.image_tool == 'DRAW')
+ return False
def draw(self, context):
layout = self.layout
@@ -1849,7 +1855,7 @@ class VIEW3D_PT_tools_grease_pencil_brush_weight_falloff(GreasePencilBrushFallof
ts = context.tool_settings
settings = ts.gpencil_weight_paint
brush = settings.brush
- return (settings and settings.brush and settings.brush.curve)
+ return (brush and brush.curve)
# Grease Pencil vertex painting tools
@@ -1941,7 +1947,6 @@ class VIEW3D_PT_tools_grease_pencil_brush_vertex_color(View3DPanel, Panel):
ts = context.tool_settings
settings = ts.gpencil_vertex_paint
brush = settings.brush
- gp_settings = brush.gpencil_settings
col = layout.column()