Shortcut for Creating a new layer

Hey,
I would like to know if there is any shortcuts for creating a new layer in Silhouette Roto module? If its not there, it’s highly recommended to be there!

Thanks!

Edit your keybinds.py file and bind a key to this function:

def add_layer():
    layer = Layer(uniqueLabel("Layer"))
    fx.beginUndo("Create Layer")
    activeNode().property("objects").addObjects([layer])
    fx.endUndo()
1 Like

Hi! I tried the solution you suggested - it works, but unfortunately I have to manually initialize the keybinds through the script editor - maybe I should add something else to your code? And tell me how to make the newly created layer active? While you have to do it manually.

To select the new layer:

def add_layer():
    layer = Layer(uniqueLabel("Layer"))
    beginUndo("Create Layer")
    activeNode().property("objects").addObjects([layer])
    select([layer])
    endUndo()

To make your own external keybinds file, check out Katie and Magno’s KMFX scripts collection. They have examples of how to add user keybinds and actions without modifying the built-in scripts.

2 Likes

You are great man! tanks a lot.