Familiarize yourself with adding actions to buttons.
The command to change the order (layer) of a scene item is order
The parameters are;
- scene=<scene name> (case sensitive)
- group=<group name> (optional)
- item=<scene item> (case sensitive)
- delay=<time> (optional)
- <new position>
The group parameter must be used if the scene item is in a group (available from OBS Studio v22).
The optional delay specifies a time (in milliseconds) to wait before running the command.
example
Move the balloon behind everything else order scene=party item=balloon 0 |
* If the scene item is in a group then this command only alters the layering of the objects inside the group.
Example: Game video full screen and camera in bottom corner. If you switch these items - expand the camera to full screen and shrink the game video to bottom corner, then the camera will completely cover the screen and you won't be able to see the game video as it's still behind the camera view. In this case, we can switch the order of the scene items (like layers in the Gimp or Photoshop). At some point, as the camera is expanding from the bottom corner, we switch it's layer position so that it appears behind the game view. When the transition is complete, the game view is now sitting in front of the camera, so is visible. If we switch back again, we do the same thing : which ever view expands to be full screen must be moved behind the other view. In my setup, I had a background image which appeared behind both camera and game - this background image is layer 0. The view to be expanded to full screen is set to layer 1 - which puts it behind everything else, apart from the background image.
Example : wait until the transition is in progress, then switch the OldTV scene item to layer 1.
Relayer TV object order delay=75 scene=studio item=OldTV 1 |