Surprised that Grease Pencil doesn’t come with a hotkey to turn on/off the onion skin on your current layer you’re drawing on. So I tried making one myself. I right-clicked on the onionskin icon on the right side of one of the layers, and chose “Assign Shortcut.” At first it seemed to work, but when I switched to another layer, the hotkey still toggled only the previous layer. I viewed my creation in the preferences, and it looked like this.
Instead of toggling the onion skin of the active layer, this shortcut is hard-wired to grab the exact layer I right-clicked on to assign the shortcut (or at least any layer with the same name). What the heck.
I’ve tried editing the “context attribute” to fix it, but I don’t know how this code system works. I tried replacing ["Scribbles"] with a keyword like [active] or [current] or [all], but they only returned error messages. I tried truncating the first part to object.data.layers w/o the bracketical, or just object.data. Didn’t work. I did a Google search and replaced the object with active_object. It returned nothing. What are the magic words to make use_onion_skinning target the active object’s active layer?

