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:
authorCampbell Barton <ideasman42@gmail.com>2021-03-28 11:45:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-28 11:45:56 +0300
commitafcfc6eb0842b9208bde3e334e3113a73807f6be (patch)
tree08012fba9d693d8661ac4866c7ea1d2628e63f7f /release/scripts/startup/bl_ui/space_view3d_toolbar.py
parent3944560b4a3a8c08a51c955977e3be3ae07a1afa (diff)
Fix T86060: Texture Paint clone tool misleading texture UI
For projection painting tools besides the `DRAW` tool: - Don't show the texture from viewport stencil drawing. - Don't show the texture panel. Based on D10564 by @lichtwerk with own changes.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 72baa5331bf..831fc06eda5 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