diff --git a/OP_setup_layers.py b/OP_setup_layers.py index ff40820..364f8d0 100644 --- a/OP_setup_layers.py +++ b/OP_setup_layers.py @@ -176,7 +176,7 @@ class GPEXP_OT_restore_layers_state(bpy.types.Operator): layers_info = json.loads(layers_info_path.read_text(encoding='utf-8')) - pool = [o for o in context.scene.objects if o.type == 'GPENCIL' and fn.is_valid_name(o.name)] + pool = [o for o in context.selected_objects if o.type == 'GPENCIL'] for gp in pool: for layer_name, info in layers_info.items(): if gp.name == info['object']: