shortcut for switch scene, is possible?

Hi all
I googling a lot with no luck, and I found nothing in the python reference :frowning:

Is possible to create a shortcut to switch from a scene to the next, like for screen layout (ctrl+left arrow / ctrl+rigth arrow)?

I’m working on a complex project and it would be very useful …

Thanks

  • Davide

Save python code, download Script Runner addon and install it. Load python code with it and rightclick to add shortcut.


import bpy


c = bpy.context
index = bpy.data.scenes.find(c.window.screen.scene.name) + 1
if index == len(bpy.data.scenes):index = 0
c.window.screen.scene = bpy.data.scenes[index]

Attachments


:smiley: YESSSS :smiley:
It works!
Thanks a lot!

-Davide