select/set color/prefix improved
1.7.5 - feat: Select/set by color and by prefix now works on every displayed dopesheet layer (and react correctly to filters) - ui: exposed user prefs `Channel Group Color` prop in dopesheet > sidebar > View > Display panel
This commit is contained in:
+10
-1
@@ -355,7 +355,6 @@ class GPTB_PT_cam_ref_panel(bpy.types.Panel):
|
||||
row.prop(bg_img, 'show_background_image', text='')# options={'HIDDEN'}
|
||||
"""
|
||||
|
||||
|
||||
def palette_manager_menu(self, context):
|
||||
"""Palette menu to append in existing menu"""
|
||||
# GPENCIL_MT_material_context_menu
|
||||
@@ -371,6 +370,14 @@ def palette_manager_menu(self, context):
|
||||
layout.operator("gp.clean_material_stack", text='Clean material Stack', icon='NODE_MATERIAL')
|
||||
|
||||
|
||||
def expose_use_channel_color_pref(self, context):
|
||||
# add in GreasePencilLayerDisplayPanel (gp dopesheet View > Display)
|
||||
layout = self.layout
|
||||
layout.use_property_split = True
|
||||
layout.use_property_decorate = False
|
||||
layout.label(text='Use Channel Colors (User preferences):')
|
||||
layout.prop(context.preferences.edit, 'use_anim_channel_group_colors')
|
||||
|
||||
classes = (
|
||||
GPTB_PT_sidebar_panel,
|
||||
GPTB_PT_checker,
|
||||
@@ -385,8 +392,10 @@ 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)
|
||||
|
||||
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)
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
Reference in New Issue
Block a user