-
Studer Gabriel authoredStuder Gabriel authored
Scene Window
The scene window holds a list of all graphical objects currently registered to the :class:`gfx.Scene`.

Every node of the graphical scene tree is shown as a subnode of the scene. It is possible to select one or more objects in the scenewin (ctrl + <left mouse> ). The available actions of the context menu are applied to all currently selected objects.
Context Menu
The Context Menu of the Scene Window is context sensitive. So, dependent on what is selected in the :class:`SceneWin` the context menu changes.
- Context menu of an entity:
-
- Context menu of an entity view:
-
It is possible to extend the Context Menu from python, by creating a QAction and add it to the ContextMenu-Class. If you want to display the action only for certain objects / states, you can pass flags which marks when the action should be shown.
from PyQt5 import QtWidgets cm = gui.GostyApp.Instance().scene_win.GetContextMenu() action = QtWidgets.QAction("Test single entity", cm.qobject) cm.AddAction(action, gui.ContextActionType.ENTITY | gui.ContextActionType.SINGLE)
The ContextMenu is shown whenever the user presses <right click> on the :class:`SceneWin`