UI: Show Mask Display Options Conistently

This commit makes the display options for mask only show in the header for the clip and image editors.
Prior to this change they would display in the header for the clip editor and in the sidebar for the image editors.
This commit is contained in:
Aaron Carlisle 2021-08-08 16:09:23 -04:00
parent 0be26f563e
commit 4c26bb0232
3 changed files with 8 additions and 11 deletions

View File

@ -237,9 +237,8 @@ class MASK_PT_point:
class MASK_PT_display:
# subclasses must define...
# ~ bl_space_type = 'CLIP_EDITOR'
# ~ bl_region_type = 'UI'
# ~ bl_region_type = 'HEADER'
bl_label = "Mask Display"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):

View File

@ -1156,12 +1156,6 @@ class CLIP_PT_mask_layers(MASK_PT_layers, Panel):
bl_category = "Mask"
class CLIP_PT_mask_display(MASK_PT_display, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'HEADER'
bl_category = "Mask"
class CLIP_PT_active_mask_spline(MASK_PT_spline, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'UI'
@ -1191,6 +1185,11 @@ class CLIP_PT_tools_mask_tools(MASK_PT_tools, Panel):
bl_region_type = 'TOOLS'
bl_category = "Mask"
class CLIP_PT_mask_display(MASK_PT_display, Panel):
bl_space_type = 'CLIP_EDITOR'
bl_region_type = 'HEADER'
# --- end mask ---

View File

@ -817,7 +817,7 @@ class IMAGE_HT_header(Header):
row.prop(sima, "show_stereo_3d", text="")
if show_maskedit:
row = layout.row()
row.popover(panel='CLIP_PT_mask_display')
row.popover(panel='IMAGE_PT_mask_display')
# layers.
layout.template_image_layers(ima, iuser)
@ -911,8 +911,7 @@ class IMAGE_PT_active_mask_point(MASK_PT_point, Panel):
class IMAGE_PT_mask_display(MASK_PT_display, Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'UI'
bl_category = "Mask"
bl_region_type = 'HEADER'
# --- end mask ---