UI: show UV sculpt panels in the image editor

This commit is contained in:
Campbell Barton 2019-05-01 14:54:07 +10:00
parent 7aeb94686f
commit 5fd69f6bd8

@ -554,9 +554,9 @@ class IMAGE_HT_tool_header(Header):
if tool_mode == 'PAINT': if tool_mode == 'PAINT':
if (tool is not None) and tool.has_datablock: if (tool is not None) and tool.has_datablock:
layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common_2d", category="") layout.popover_group(space_type='IMAGE_EDITOR', region_type='UI', context=".paint_common_2d", category="")
elif context.uv_sculpt_object is not None: elif context.uv_sculpt_object is not None:
layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".uv_sculpt", category="") layout.popover_group(space_type='IMAGE_EDITOR', region_type='UI', context=".uv_sculpt", category="")
def draw_mode_settings(self, context): def draw_mode_settings(self, context):
layout = self.layout layout = self.layout
@ -568,7 +568,7 @@ class IMAGE_HT_tool_header(Header):
tool_mode = context.mode if tool is None else tool.mode tool_mode = context.mode if tool is None else tool.mode
if tool_mode == 'PAINT': if tool_mode == 'PAINT':
layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".imagepaint_2d", category="") layout.popover_group(space_type='IMAGE_EDITOR', region_type='UI', context=".imagepaint_2d", category="")
class _draw_tool_settings_context_mode: class _draw_tool_settings_context_mode:
@ -1379,8 +1379,8 @@ class IMAGE_PT_tools_imagepaint_symmetry(BrushButtonsPanel, Panel):
class IMAGE_PT_uv_sculpt_curve(Panel): class IMAGE_PT_uv_sculpt_curve(Panel):
bl_space_type = 'PROPERTIES' bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'WINDOW' bl_region_type = 'UI'
bl_context = ".uv_sculpt" # dot on purpose (access from topbar) bl_context = ".uv_sculpt" # dot on purpose (access from topbar)
bl_category = "Tool" bl_category = "Tool"
bl_label = "UV Sculpt Curve" bl_label = "UV Sculpt Curve"
@ -1397,6 +1397,7 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
uvsculpt = tool_settings.uv_sculpt uvsculpt = tool_settings.uv_sculpt
brush = uvsculpt.brush brush = uvsculpt.brush
if brush is not None:
layout.template_curve_mapping(brush, "curve") layout.template_curve_mapping(brush, "curve")
row = layout.row(align=True) row = layout.row(align=True)
@ -1409,8 +1410,8 @@ class IMAGE_PT_uv_sculpt_curve(Panel):
class IMAGE_PT_uv_sculpt(Panel): class IMAGE_PT_uv_sculpt(Panel):
bl_space_type = 'PROPERTIES' bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'WINDOW' bl_region_type = 'UI'
bl_context = ".uv_sculpt" # dot on purpose (access from topbar) bl_context = ".uv_sculpt" # dot on purpose (access from topbar)
bl_category = "Tool" bl_category = "Tool"
bl_label = "UV Sculpt" bl_label = "UV Sculpt"