Fix #4 paste layers skipping empty frames
1.8.1 - fix: Gp clipboard paste `Paste layers` don't skip empty frames anymore
This commit is contained in:
+73
-59
@@ -572,65 +572,8 @@ def asset_browser_ui(self, context):
|
||||
|
||||
|
||||
|
||||
classes = (
|
||||
GPTB_PT_sidebar_panel,
|
||||
GPTB_PT_checker,
|
||||
GPTB_PT_anim_manager,
|
||||
GPTB_PT_color,
|
||||
GPTB_PT_tint_layers,
|
||||
GPTB_PT_toolbox_playblast,
|
||||
|
||||
# palettes linker
|
||||
GPTB_PT_palettes_linker_main_ui, # main panel
|
||||
GPTB_PT_palettes_list_popup, # popup (dummy region)
|
||||
GPTB_PT_palettes_path_ui, # subpanels
|
||||
GPTB_PT_palettes_list_ui, # subpanels
|
||||
# GPTB_PT_extra,
|
||||
)
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
bpy.types.GPENCIL_MT_material_context_menu.append(palette_manager_menu)
|
||||
bpy.types.DOPESHEET_PT_gpencil_layer_display.append(expose_use_channel_color_pref)
|
||||
|
||||
# if bpy.app.version >= (3,0,0):
|
||||
# bpy.types.ASSETBROWSER_PT_metadata.append(asset_browser_ui)
|
||||
|
||||
|
||||
def unregister():
|
||||
bpy.types.DOPESHEET_PT_gpencil_layer_display.remove(expose_use_channel_color_pref)
|
||||
bpy.types.GPENCIL_MT_material_context_menu.remove(palette_manager_menu)
|
||||
# if bpy.app.version >= (3,0,0):
|
||||
# bpy.types.ASSETBROWSER_PT_metadata.remove(asset_browser_ui)
|
||||
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
|
||||
"""
|
||||
## direct panel def append (no submenu with arrow)
|
||||
## need to use append and remove in register/unregister
|
||||
# bpy.types.DATA_PT_gpencil_layers.append(UI_tools.GPdata_toolbox_panel)
|
||||
# bpy.types.DATA_PT_gpencil_layers.remove(UI_tools.GPdata_toolbox_panel)
|
||||
|
||||
def GPdata_toolbox_panel(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
settings = context.scene.gptoolprops
|
||||
|
||||
col = layout.column(align = True)
|
||||
col.prop(settings, 'autotint_offset')
|
||||
col.operator("gp.auto_tint_gp_layers", icon = "COLOR").reset = False
|
||||
col.operator("gp.auto_tint_gp_layers", text = "Reset tint", icon = "COLOR").reset = True
|
||||
"""
|
||||
|
||||
"""
|
||||
Put back UI for interpolate
|
||||
|
||||
|
||||
# Grease Pencil stroke interpolation tools native pop hover panel from 2.92
|
||||
class VIEW3D_PT_tools_grease_pencil_interpolate(Panel):
|
||||
# Put back pop-over UI for Grease Pencil stroke interpolation tools native pop hover panel from 2.92
|
||||
class GPTB_PT_tools_grease_pencil_interpolate(Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'HEADER'
|
||||
bl_label = "Interpolate"
|
||||
@@ -680,4 +623,75 @@ class VIEW3D_PT_tools_grease_pencil_interpolate(Panel):
|
||||
sub.prop(settings, "amplitude")
|
||||
sub.prop(settings, "period")
|
||||
|
||||
def interpolate_header_ui(self, context):
|
||||
layout = self.layout
|
||||
obj = context.active_object
|
||||
|
||||
if obj and obj.type == 'GPENCIL' and context.gpencil_data:
|
||||
gpd = context.gpencil_data
|
||||
else:
|
||||
return
|
||||
|
||||
if gpd.use_stroke_edit_mode or gpd.is_stroke_paint_mode:
|
||||
row = layout.row(align=True)
|
||||
row.popover(
|
||||
panel="GPTB_PT_tools_grease_pencil_interpolate",
|
||||
text="Interpolate",
|
||||
)
|
||||
|
||||
classes = (
|
||||
GPTB_PT_sidebar_panel,
|
||||
GPTB_PT_checker,
|
||||
GPTB_PT_anim_manager,
|
||||
GPTB_PT_color,
|
||||
GPTB_PT_tint_layers,
|
||||
GPTB_PT_toolbox_playblast,
|
||||
# GPTB_PT_tools_grease_pencil_interpolate, # WIP
|
||||
|
||||
# palettes linker
|
||||
GPTB_PT_palettes_linker_main_ui, # main panel
|
||||
GPTB_PT_palettes_list_popup, # popup (dummy region)
|
||||
GPTB_PT_palettes_path_ui, # subpanels
|
||||
GPTB_PT_palettes_list_ui, # subpanels
|
||||
# GPTB_PT_extra,
|
||||
|
||||
)
|
||||
|
||||
def register():
|
||||
for cls in classes:
|
||||
bpy.utils.register_class(cls)
|
||||
bpy.types.GPENCIL_MT_material_context_menu.append(palette_manager_menu)
|
||||
bpy.types.DOPESHEET_PT_gpencil_layer_display.append(expose_use_channel_color_pref)
|
||||
# bpy.types.VIEW3D_HT_header.append(interpolate_header_ui) # WIP
|
||||
|
||||
# if bpy.app.version >= (3,0,0):
|
||||
# bpy.types.ASSETBROWSER_PT_metadata.append(asset_browser_ui)
|
||||
|
||||
|
||||
def unregister():
|
||||
# bpy.types.VIEW3D_HT_header.remove(interpolate_header_ui) # WIP
|
||||
bpy.types.DOPESHEET_PT_gpencil_layer_display.remove(expose_use_channel_color_pref)
|
||||
bpy.types.GPENCIL_MT_material_context_menu.remove(palette_manager_menu)
|
||||
# if bpy.app.version >= (3,0,0):
|
||||
# bpy.types.ASSETBROWSER_PT_metadata.remove(asset_browser_ui)
|
||||
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
|
||||
"""
|
||||
## direct panel def append (no submenu with arrow)
|
||||
## need to use append and remove in register/unregister
|
||||
# bpy.types.DATA_PT_gpencil_layers.append(UI_tools.GPdata_toolbox_panel)
|
||||
# bpy.types.DATA_PT_gpencil_layers.remove(UI_tools.GPdata_toolbox_panel)
|
||||
|
||||
def GPdata_toolbox_panel(self, context):
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
settings = context.scene.gptoolprops
|
||||
|
||||
col = layout.column(align = True)
|
||||
col.prop(settings, 'autotint_offset')
|
||||
col.operator("gp.auto_tint_gp_layers", icon = "COLOR").reset = False
|
||||
col.operator("gp.auto_tint_gp_layers", text = "Reset tint", icon = "COLOR").reset = True
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user