Fix: Annotate tool in Image Editor shows brush properties & errors
Pull Request: https://projects.blender.org/blender/blender/pulls/144658
This commit is contained in:
@@ -39,7 +39,7 @@ from bpy.app.translations import (
|
||||
)
|
||||
|
||||
|
||||
class ImagePaintPanel:
|
||||
class ImagePaintPanel(UnifiedPaintPanel):
|
||||
bl_space_type = 'IMAGE_EDITOR'
|
||||
bl_region_type = 'UI'
|
||||
|
||||
@@ -1242,13 +1242,18 @@ class IMAGE_PT_paint_settings(Panel, ImagePaintPanel):
|
||||
bl_category = "Tool"
|
||||
bl_label = "Brush Settings"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
settings = cls.paint_settings(context)
|
||||
return settings and settings.brush is not None
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
|
||||
settings = context.tool_settings.image_paint
|
||||
settings = self.paint_settings(context)
|
||||
brush = settings.brush
|
||||
|
||||
if brush:
|
||||
@@ -1262,13 +1267,18 @@ class IMAGE_PT_paint_settings_advanced(Panel, ImagePaintPanel):
|
||||
bl_label = "Advanced"
|
||||
bl_ui_units_x = 12
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
settings = cls.paint_settings(context)
|
||||
return settings and settings.brush is not None
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False # No animation.
|
||||
|
||||
settings = context.tool_settings.image_paint
|
||||
settings = self.paint_settings(context)
|
||||
brush = settings.brush
|
||||
if brush:
|
||||
brush_settings_advanced(layout.column(), context, settings, brush, self.is_popover)
|
||||
|
||||
Reference in New Issue
Block a user