← All ideas
  • Published 1 Aug 2026

Solo Viewing for Grease Pencil

In many parts of blender, for instance the bone collections section, individual items can be viewed in isolation using the solo option. However, this option is missing from grease pencil layers. Having this option would make it very easy to make adjustments to one layer without having to hide every other layer above it or having to temporarily turn off masks to view that(/those) specific layer(s).

100%

Development Status: Open

Upvote 3 Downvote 0
user
1 Aug 2026

2 Comments

Rosenthal

I made a python script for this. It adds an Auto-Isolate option to the Layers list dropdown menu. Works exactly like the autolocking feature, but for visibility.

Can't be arsed to release it through the usual channels, so here's the whole script as is (Sorry Mr. Moderator). Just open it up in the Blender Scripting workspace and run it. You'll have to rerun it after closing and reopening blender, though.

import bpy

owner = object()
subscribe_to_layers = (bpy.types.GreasePencilv3Layers,"active")
subscribe_to_groups = (bpy.types.GreasePencilv3LayerGroup,"active")

def on_active_layer_group_change_callback(self, context):
    print("on_active_layer_group_change_callback")

    if(context.grease_pencil.layer_groups.active is None):
        return

    for layer_group in context.grease_pencil.layer_groups:
        layer_group.hide = False

    for layer in context.grease_pencil.layers:
        layer.hide = True

    active_group = context.grease_pencil.layer_groups.active
    for layer in context.grease_pencil.layers:
        parent_group = layer.parent_group
        while(parent_group is not None):
            if(parent_group == active_group):
                layer.hide = False
                break
            else:
                parent_group = parent_group.parent_group

def on_active_layer_change_callback(self, context):
    print("on_active_layer_change_callback")

    if(context.grease_pencil.layers.active is None):
        return

    for layer_group in context.grease_pencil.layer_groups:
        layer_group.hide = False

    for layer in context.grease_pencil.layers:
        if layer == context.grease_pencil.layers.active:
            layer.hide = False
        else:
            layer.hide = True       

def auto_isolation_menu_func(self, context):
    self.layout.separator()
    row = self.layout.row()
    row.prop(context.grease_pencil,"autoisolate_enabled")

def update_prop_func(self, context):
    if(context.grease_pencil.autoisolate_enabled):        
        if(context.grease_pencil.layers.active is not None):
            for layer in context.grease_pencil.layers:
                layer.hide = True

            context.grease_pencil.layers.active.hide = False

        elif (context.grease_pencil.layer_groups.active):
            parent_group = context.grease_pencil.layer_groups.active.parent_group
            while(parent_group is not None):
                parent_group.hide = False
                parent_group = parent_group.parent_group

        # Subscribe to active layer change
        bpy.msgbus.subscribe_rna(
        key=subscribe_to_layers,
        owner=owner,
        args=(self, context),
        notify=on_active_layer_change_callback,
        )

        # Subscribe to active layer group change
        bpy.msgbus.subscribe_rna(
        key=subscribe_to_groups,
        owner=owner,
        args=(self, context),
        notify=on_active_layer_group_change_callback,
        )
    else:
        for layer in context.grease_pencil.layers:
            layer.hide = False
        for layer_group in context.grease_pencil.layer_groups:
            layer_group.hide = False
        bpy.msgbus.clear_by_owner(owner)

# Register and add to the "object" menu (required to also use F3 search "Simple Object Operator" for quick access).
def register():

    bpy.types.GREASE_PENCIL_MT_grease_pencil_add_layer_extra.append(auto_isolation_menu_func)    
    bpy.types.GreasePencil.autoisolate_enabled = bpy.props.BoolProperty(name="Auto Isolation Enabled", default=False, update=update_prop_func)



def unregister():
    bpy.types.GREASE_PENCIL_MT_grease_pencil_add_layer_extra.remove(auto_isolation_menu_func)

    if(bpy.types.GreasePencil.autoisolate_enabled):
        del(bpy.types.GreasePencil.autoisolate_enabled)

if __name__ == "__main__":
    register()
hissatsuneko

Well in the layers panel there is a button "Hide others." It hides all other layers than the active layer. the active layer is the one you have selected in the list. But in my add on you can hide things by the selected stroke. Next update i'm adding hiding all others by the stroke if you wanna give it a try: extensions.blender.org/add-ons/gp-select/ ( right now it already let's you hide 'selected stroke' layer though )