The Gui Module
Gui is the Qt desktop application built on top of Engine. Every class
here may use Engine; several implement the …I interfaces the Engine
calls back into (see Design Techniques and Idioms). Like some Engine classes, several
large Gui classes are split across numbered .cpp files
(Gui20.cpp, ViewerTab30.cpp …) that all implement one class.
Main window and application
Gui(Gui.cppandGui05–Gui50.cpp,GuiPrivate.*): the main window. Owns the docked panes, menus, the node graph, viewers and editors.GuiApplicationManager(GuiApplicationManager*.cpp): theAppManagersubclass for GUI mode — shortcuts (ActionShortcuts), icons/resources, the application event loop, known plug-in menus.GuiAppInstance: theAppInstancesubclass that owns aGui.Docking/layout:
TabWidget,Splitter,FloatingWidget,SerializableWindow,ProjectGuiSerialization(layouts are saved with the project).
The node graph
NodeGraph(NodeGraph.cppandNodeGraph05–NodeGraph45.cpp,NodeGraphPrivate.*): theQGraphicsViewcanvas; implementsNodeGraphI.NodeGui(NodeGui.cpp): the on-canvas node item; implementsNodeGuiI.BackdropGui,DotGui,Edge(connections),NodeGraphTextItem/NodeGraphRectItemare the graphics items.NodeGraphUndoRedoandNodeCreationDialoghandle edits and node creation. Node clipboard:NodeClipBoard.
The viewer
ViewerGL(ViewerGL.cpp,ViewerGLPrivate.*): theQOpenGLWidgetviewport; implementsOpenGLViewerI. Draws the rendered textures, overlays and the user’s interactions.ViewerTab(ViewerTab.cppandViewerTab10–40.cpp,ViewerTabPrivate.*): the panel around the GL widget — playback controls, channel/view selectors, the timeline.InfoViewerWidget,Histogram(also aQOpenGLWidget),TimeLineGui.
Animation editors
CurveEditor/CurveWidget(CurveWidget.cpp,CurveWidgetPrivate.*,CurveGui): the keyframe curve editor (QOpenGLWidget).DopeSheet/DopeSheetView/DopeSheetEditor/DopeSheetHierarchyView(withDopeSheetEditorUndoRedo): the dope sheet.Undo/redo for curves:
CurveEditorUndoRedo.
Parameter panels (Knob GUIs)
DockablePanel(DockablePanel.cpp,DockablePanelPrivate.*): a node’s settings panel; implementsDockablePanelI.KnobGui(KnobGui.cpp,KnobGui10/20.cpp,KnobGuiPrivate.*): base class implementingKnobGuiI;KnobGuiFactorybuilds the right widget for each knob type. Concrete widgets:KnobGuiValue(int/double),KnobGuiBool,KnobGuiChoice,KnobGuiColor,KnobGuiString,KnobGuiFile,KnobGuiButton,KnobGuiGroup,KnobGuiParametric,KnobGuiSeparator,KnobGuiTable.KnobUndoCommand(undo for parameter edits),KnobWidgetDnD(drag-and- drop linking),ManageUserParamsDialog/AddKnobDialog(user parameters),EditExpressionDialog/EditScriptDialog(Python expressions/scripts).
Tool panels
RotoPanel(RotoPanel.cpp): the roto/paint item tree and tools.TrackerPanel(TrackerPanel.cpp) andMultiInstancePanel: the tracker’s marker table.PreferencesPanel: the settings UI, generated from theSettingsknobs.HostOverlay(HostOverlay.cpp): draws the host-provided overlays (position/transform/corner-pin handles) for plug-ins that request them.
Custom widgets and helpers
Natron ships many hand-built widgets to get the look and behavior it wants:
ComboBox, SpinBox (+ SpinBoxValidator), Button, Label,
LineEdit, ScaleSliderQWidget, ColorSelectorWidget /
QtColorTriangle, Menu, ClickableLabel, AnimatedCheckBox,
TableModelView (a generic model/view table), ScriptTextEdit /
ScriptEditor (the Python console), ProgressPanel /
ProgressTaskInfo, MessageBox / LogWindow / AboutWindow /
SplashScreen, and the file dialog SequenceFileDialog (sequence-aware,
backed by Engine’s FileSystemModel). QtEnumConvert translates
between Qt enums and Natron’s toolkit-independent enums (Global/Enums.h,
KeySymbols.h) so Engine code never sees Qt key/modifier types.
GUI Python integration
PyGuiApp and PythonPanels expose the GUI to Python (custom panels and
menus), bound through Shiboken with typesystem_natronGui.xml. See
Python Bindings (Shiboken / PySide).