Scene Graph View

SceneGraphView

Module providing the SceneGraphView class which provides a view of the scene graph generated by Geolib3 from an arbitrary node.

You can find a complete set of examples using the SceneGraphView widget in $KATANA_ROOT/plugins/Resources/Examples/Tabs/PrototypeSceneGraphTab.py

Feature Summary

The following list provides a summary of the features currently provided by the SceneGraphView API:

  • View the scene graph produced from an arbitrary node, usually this will be currently viewed node (defined by the blue view flag) but this does not need to be the case.
  • Customizable columns allowing you to view attributes at any scene graph location directly in the SceneGraphView, with the ability to specify sets of columns which can be shown or hidden.
  • Ability to specify arbitrary scene graph locations to act as top-level locations from which to view the currently generated scene graph.
  • Ability to customize context menus based on the scene graph location, column and/or current selection state when they were triggered.
  • Ability to interrogate attributes at arbitrary locations in the scene graph and be notified via a callback when they have changed.
  • Support for drag and drop of items through custom event callbacks.
  • Support for changing parameter values of multiple selected items in SceneGraphView widgets. When changing the value in a cell while multiple rows are selected, the cells in other selected rows in the same column change as well.
  • Support for indicating a difference between the final value of an attribute that corresponds to a cell in a SceneGraphView widget and the value of a parameter that corresponds to the same cell, using an asterisk shown next to the value within a cell. When moving the pointer over such a cell, a pop-up widget is shown, showing the value of the attribute.
class UI4.Widgets.SceneGraphView.SceneGraphView.SceneGraphView(debugMode=False, parent=None)

Bases: object

The SceneGraphView class provides a customizable view of the scene graph as produced by Geolib3, from an arbitrary node which you specify. The following sections describe the various elements you are able to customize providing references to the relevant functions.

Example tab plug-ins that demonstrate the use of the SceneGraphView class can be found in $KATANA_ROOT/plugins/Resources/Examples/Tabs/PrototypeSceneGraphTab.py

You are able to specify any node in the node graph document from which to view the scene graph. Historically the Scene Graph tab always used the node which had the view flag set. It is possible to mirror this behavior if you wish but it does not have to be the case.

You can use the function setViewNode to set the node you wish to view from. This can be changed at any time during the life of a SceneGraphView.

Internally, the setViewNode function extracts the terminal Op backing the given node and uses it as the terminal Op for its managed Geolib3 client.

You can find example code for this feature in the examples module under ExampleSceneGraphTab.

setViewNode setTerminalOps updateTerminalOps

You are able to completely customize the columns of data which are displayed in a SceneGraphView instance.

Each column supports:

  • Specifying the column title display text and optional icon.
  • Specifying the scene graph attribute to display for a given row.
  • Controlling the column’s data type which in turn drives the mode of interaction in cells of a SceneGraphView’s columns.
  • Specifying the display order of a column.
  • Controlling the editability of values in a column.

Columns can be grouped into column sets. For example, columns Color, *Intensity* and Exposure could all belong to a column set Basic Light Properties. You can control the visibility of individual columns or the visibility of the entire set.

You can find example code for this feature in the examples module under ColumnTestExample.

addColumnSet addColumn hideColumnSet

SceneGraphColumn SceneGraphColumnSet

Through a SceneGraphView instance you can programmatically obtain scene graph attributes for any location and register a callback for any further updates. This allows you to customize the behaviour of your own tabs based on the current state of the scene graph.

You can find example code for this feature in the examples module under GetSceneGraphAttributesExample

getSceneGraphAttributes

You are able to specify any number of scene graph location paths to act as top-level locations within the SceneGraphView. Historically, the only top-level location has been /root. Now, any scene graph location can be used as a top-level location.

Top-level locations are efficient to add and remove and can be changed at any point during the lifetime of the SceneGraphView. They can be thought of as pointers into the larger scene graph effectively allowing you to focus a users attention on a smaller sub-tree of the larger scene graph.

You can find example code for this feature in the examples module under TopLevelItemExampleTab

addTopLevelLocation removeTopLevelLocation getTopLevelLocations clearTopLevelLocations

When a user right-clicks on a location in the SceneGraphView a context menu will be displayed. The SceneGraphView provides a hook to allow you to customize the context menu and provide custom actions based on:

  • The current selection state.
  • The column in which the right-click occurred.
  • The scene graph location path and top-level item under the pointer when the context menu was triggered.

You can find example code for this feature in the examples module under ContextMenuExample.

setContextMenuEventCallback

ContextMenuEvent

You are able to configure a set of rules to filter what is displayed by the SceneGraphView. A Rule is composed of a target column, a specific evaluator (such as EqualTo or Regular Expression matching) and one or more evaluator-specific criteria.

In addition to specifying the rules that govern what is filtered you can also specify the matching policy for the set of rules.

You can find example code for triggering the rule filter dialog in the examples module under FilteringExample.

addRule removeRule getCurrentRules setRuleTarget setRuleEvaluator setRuleCriteria setRuleMatchPolicy

Support for dragging and dropping of items in a SceneGraphView widget is available in the form of two event callback functions that can be set using functions in the SceneGraphView API.

The first of the event callbacks, setDragMoveEventCallback, is called when items are being dragged over a SceneGraphView widget, and can be used to determine whether the dragged items could be dropped onto the widget.

The second of the event callbacks, setDropEventCallback, is called when dragged items are dropped onto the SceneGraphView widget, and can be used to provide custom behavior based on the number and types of the dropped items and the item onto which the dragged items have been dropped (if any).

You can find example code for this feature in the examples module under TopLevelItemExampleTab

setDragMoveEventCallback setDropEventCallback

See:SceneGraphViewColumn
See:ContextMenuEvent
classmethod GetStopAtLocationTypes()
Return type:tuple of str
Returns:The names of types of locations at which to stop expanding or collapsing the scene graph when using the Expand To or Collapse To menu commands, or when double-clicking a group location in the **Scene Graph** tab.
classmethod Initialize()

Initializes components of the SceneGraphView widget Python package.

classmethod SetStopAtLocationTypes(*locationTypes)

Sets the types of locations at which to stop expanding or collapsing the scene graph when using the Expand To or Collapse To menu commands, or when double-clicking a group location in the Scene Graph tab.

Parameters:locationTypes (sequence of str) – A sequence of names of types of locations at which to stop expanding or collapsing the scene graph.
__dict__ = dict_proxy({'getColumnVisibilitySettings': <function getColumnVisibilitySettings at 0x7f60a1c0ab90>, 'getColumnWidthsSettings': <function getColumnWidthsSettings at 0x7f60a1c0ac80>, 'isLocationExpanded': <function isLocationExpanded at 0x7f60a1c80398>, 'addColumnSet': <function addColumnSet at 0x7f60a1c0a848>, 'scrollToLocation': <function scrollToLocation at 0x7f60a1c80410>, 'getCurrentRules': <function getCurrentRules at 0x7f60a1c0ae60>, 'setDropEventCallback': <function setDropEventCallback at 0x7f60a1c809b0>, 'setAboutToDragCallback': <function setAboutToDragCallback at 0x7f60a1c80938>, 'showColumnSet': <function showColumnSet at 0x7f60a1c0aaa0>, 'setLocationNamesPolished': <function setLocationNamesPolished at 0x7f60a1c80500>, '__dict__': <attribute '__dict__' of 'SceneGraphView' objects>, 'setTopLevelLocations': <function setTopLevelLocations at 0x7f60a1c80c80>, '__weakref__': <attribute '__weakref__' of 'SceneGraphView' objects>, 'setRuleEvaluator': <function setRuleEvaluator at 0x7f60a1c0af50>, 'addAttributeDataItemType': <function addAttributeDataItemType at 0x7f60a1c805f0>, 'allowMultipleSelection': <function allowMultipleSelection at 0x7f60a1c806e0>, 'isStopping': <function isStopping at 0x7f60a1c0a5f0>, 'updateViewport': <function updateViewport at 0x7f60a1c849b0>, 'addRule': <function addRule at 0x7f60a1c0ad70>, 'selectLocations': <function selectLocations at 0x7f60a1c84ed8>, 'Initialize': <classmethod object at 0x7f60a1c719b8>, 'getWidget': <function getWidget at 0x7f60a1c848c0>, 'setLocationAddedOrUpdatedCallback': <function setLocationAddedOrUpdatedCallback at 0x7f60a1c0a140>, '__doc__': "\n The C{SceneGraphView} class provides a customizable view of the scene\n graph as produced by Geolib3, from an arbitrary node which you specify.\n The following sections describe the various elements you are able to\n customize providing references to the relevant functions.\n\n Example tab plug-ins that demonstrate the use of the C{SceneGraphView}\n class can be found in\n C{$KATANA_ROOT/plugins/Resources/Examples/Tabs/PrototypeSceneGraphTab.py}\n\n View Node\n =========\n You are able to specify any node in the node graph document from which\n to view the scene graph. Historically the B{Scene Graph} tab always\n used the node which had the view flag set. It is possible to mirror\n this behavior if you wish but it does not have to be the case.\n\n You can use the function L{setViewNode()} to set the node you wish to\n view from. This can be changed at any time during the life of a\n SceneGraphView.\n\n Internally, the L{setViewNode()} function extracts the terminal Op\n backing the given node and uses it as the terminal Op for its managed\n Geolib3 client.\n\n 1.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{ExampleSceneGraphTab}.\n\n 1.2 Related Functions\n ---------------------\n L{setViewNode()} L{setTerminalOps()} L{updateTerminalOps()}\n\n Column Configuration\n ====================\n You are able to completely customize the columns of data which are\n displayed in a C{SceneGraphView} instance.\n\n Each column supports:\n - Specifying the column title display text and optional icon.\n - Specifying the scene graph attribute to display for a given row.\n - Controlling the column's data type which in turn drives the mode\n of interaction in cells of a SceneGraphView's columns.\n - Specifying the display order of a column.\n - Controlling the editability of values in a column.\n\n Columns can be grouped into column sets. For example, columns I{Color},\n I{Intensity} and I{Exposure} could all belong to a column set\n I{Basic Light Properties}. You can control the visibility of individual\n columns or the visibility of the entire set.\n\n 2.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{ColumnTestExample}.\n\n 2.2 Related Functions\n ---------------------\n L{addColumnSet()} L{addColumn()} L{hideColumnSet()}\n\n 2.3 Related Classes\n -------------------\n L{SceneGraphColumn<UI4.Widgets.SceneGraphView.SceneGraphViewColumn.\n SceneGraphColumn>}\n L{SceneGraphColumnSet<UI4.Widgets.SceneGraphView.SceneGraphViewColumn.\n SceneGraphColumnSet>}\n\n Scene Graph Attribute Inspection\n ================================\n Through a C{SceneGraphView} instance you can programmatically obtain\n scene graph attributes for any location and register a callback for\n any further updates. This allows you to customize the behaviour of\n your own tabs based on the current state of the scene graph.\n\n 3.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{GetSceneGraphAttributesExample}\n\n 3.2 Related Functions\n ---------------------\n L{getSceneGraphAttributes()}\n\n Top-Level Locations\n ===================\n You are able to specify any number of scene graph location paths to act\n as top-level locations within the C{SceneGraphView}. Historically, the\n only top-level location has been C{/root}. Now, any scene graph\n location can be used as a top-level location.\n\n Top-level locations are efficient to add and remove and can be changed\n at any point during the lifetime of the C{SceneGraphView}. They can be\n thought of as pointers into the larger scene graph effectively allowing\n you to focus a users attention on a smaller sub-tree of the larger\n scene graph.\n\n 4.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{TopLevelItemExampleTab}\n\n 4.2 Related Functions\n ---------------------\n L{addTopLevelLocation()} L{removeTopLevelLocation()}\n L{getTopLevelLocations()} L{clearTopLevelLocations()}\n\n Context Menu Customization\n ==========================\n When a user right-clicks on a location in the SceneGraphView a\n context menu will be displayed. The SceneGraphView provides a\n hook to allow you to customize the context menu and provide\n custom actions based on:\n\n - The current selection state.\n - The column in which the right-click occurred.\n - The scene graph location path and top-level item under the pointer\n when the context menu was triggered.\n\n 5.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{ContextMenuExample}.\n\n 5.2 Related Functions\n ---------------------\n L{setContextMenuEventCallback()}\n\n 5.3 Related Classes\n -------------------\n L{ContextMenuEvent<UI4.Widgets.SceneGraphView.ContextMenuEvent.\n ContextMenuEvent>}\n\n Filtering\n =========\n You are able to configure a set of rules to filter what is displayed by\n the SceneGraphView. A Rule is composed of a target column, a specific\n evaluator (such as EqualTo or Regular Expression matching) and one or\n more evaluator-specific criteria.\n\n In addition to specifying the rules that govern what is filtered you\n can also specify the matching policy for the set of rules.\n\n 6.1 Example Code\n ----------------\n You can find example code for triggering the rule filter dialog in the\n examples module under C{FilteringExample}.\n\n 6.2 Related Functions\n ---------------------\n L{addRule()}\n L{removeRule()}\n L{getCurrentRules()}\n L{setRuleTarget()}\n L{setRuleEvaluator()}\n L{setRuleCriteria()}\n L{setRuleMatchPolicy()}\n\n Drag & Drop\n ===========\n Support for dragging and dropping of items in a C{SceneGraphView}\n widget is available in the form of two event callback functions that\n can be set using functions in the C{SceneGraphView} API.\n\n The first of the event callbacks, L{setDragMoveEventCallback()}, is\n called when items are being dragged over a C{SceneGraphView} widget,\n and can be used to determine whether the dragged items could be dropped\n onto the widget.\n\n The second of the event callbacks, L{setDropEventCallback()}, is called\n when dragged items are dropped onto the C{SceneGraphView} widget, and\n can be used to provide custom behavior based on the number and types of\n the dropped items and the item onto which the dragged items have been\n dropped (if any).\n\n 7.1 Example Code\n ----------------\n You can find example code for this feature in the examples module under\n C{TopLevelItemExampleTab}\n\n 7.2 Related Functions\n ---------------------\n L{setDragMoveEventCallback()}\n L{setDropEventCallback()}\n\n @see: L{SceneGraphViewColumn<UI4.Widgets.SceneGraphView.\n SceneGraphViewColumn>}\n @see: L{ContextMenuEvent<UI4.Widgets.SceneGraphView.ContextMenuEvent>}\n ", 'setLocationRemovedCallback': <function setLocationRemovedCallback at 0x7f60a1c0a1b8>, 'removeRule': <function removeRule at 0x7f60a1c0ade8>, 'setUpdateViewportAutomatically': <function setUpdateViewportAutomatically at 0x7f60a1c84a28>, 'updateTerminalOps': <function updateTerminalOps at 0x7f60a1c0a0c8>, 'setTerminalOps': <function setTerminalOps at 0x7f60a1c0a050>, 'getColumnPresetManager': <function getColumnPresetManager at 0x7f60a1c0a6e0>, 'setLocationNamePolishCallback': <function setLocationNamePolishCallback at 0x7f60a1c80aa0>, 'setFrozenWhenHidden': <function setFrozenWhenHidden at 0x7f60a1c0a410>, 'setExpandsOnDoubleClick': <function setExpandsOnDoubleClick at 0x7f60a1c80578>, 'setLocationActive': <function setLocationActive at 0x7f60a1c80e60>, 'getParent': <function getParent at 0x7f60a1c84758>, 'saveExpandedLocations': <function saveExpandedLocations at 0x7f60a1c84de8>, 'applyColumnVisibilitySettings': <function applyColumnVisibilitySettings at 0x7f60a1c0ac08>, 'getTopLevelLocations': <function getTopLevelLocations at 0x7f60a1c80c08>, 'getSelectedLocations': <function getSelectedLocations at 0x7f60a1c84b90>, 'applyColumnWidthsSettings': <function applyColumnWidthsSettings at 0x7f60a1c0acf8>, 'SetStopAtLocationTypes': <classmethod object at 0x7f60a1c71980>, 'clearExpandedLocationsRegistry': <function clearExpandedLocationsRegistry at 0x7f60a1c84d70>, 'setViewNode': <function setViewNode at 0x7f60a1c80ed8>, 'addColumn': <function addColumn at 0x7f60a1c0a8c0>, 'updateSelection': <function updateSelection at 0x7f60a1c84f50>, 'topLevelLocationRenamed': <function topLevelLocationRenamed at 0x7f60a1c80de8>, 'frozenWhenHidden': <function frozenWhenHidden at 0x7f60a1c0a398>, 'showRuleConfigDialog': <function showRuleConfigDialog at 0x7f60a1c0b140>, '__module__': 'UI4.Widgets.SceneGraphView.SceneGraphView', 'addWorkingSetColumn': <function addWorkingSetColumn at 0x7f60a1c0a938>, 'getNumberOfChildren': <function getNumberOfChildren at 0x7f60a1c0b320>, 'setRuleTarget': <function setRuleTarget at 0x7f60a1c0aed8>, 'setDragMoveEventCallback': <function setDragMoveEventCallback at 0x7f60a1c808c0>, 'setAllowMultipleSelection': <function setAllowMultipleSelection at 0x7f60a1c80668>, 'setStopRecursiveExpandAttributeNames': <function setStopRecursiveExpandAttributeNames at 0x7f60a1c802a8>, 'setRuleMatchPolicy': <function setRuleMatchPolicy at 0x7f60a1c0b0c8>, 'setStopRecursiveExpandLocationTypes': <function setStopRecursiveExpandLocationTypes at 0x7f60a1c80320>, 'isProcessing': <function isProcessing at 0x7f60a1c0a578>, 'updateLocationIcons': <function updateLocationIcons at 0x7f60a1c84b18>, 'getSceneGraphChildren': <function getSceneGraphChildren at 0x7f60a1c847d0>, 'setViewOp': <function setViewOp at 0x7f60a1c80f50>, 'getChildLocations': <function getChildLocations at 0x7f60a1c84cf8>, 'setLocationCollapsedCallback': <function setLocationCollapsedCallback at 0x7f60a1c0a2a8>, '__init__': <function __init__ at 0x7f60a1c846e0>, 'GetStopAtLocationTypes': <classmethod object at 0x7f60a1c71910>, 'setSelectionState': <function setSelectionState at 0x7f60a1c84e60>, 'endColumnConfiguration': <function endColumnConfiguration at 0x7f60a1c0aa28>, 'addTopLevelLocation': <function addTopLevelLocation at 0x7f60a1c80b18>, 'getChildNameByIndex': <function getChildNameByIndex at 0x7f60a1c0b488>, 'setLocationExpandedRecursive': <function setLocationExpandedRecursive at 0x7f60a1c801b8>, 'clearTopLevelLocations': <function clearTopLevelLocations at 0x7f60a1c80cf8>, 'isFrozen': <function isFrozen at 0x7f60a1c0a488>, 'setSelectionChangedCallback': <function setSelectionChangedCallback at 0x7f60a1c80758>, 'beginColumnConfiguration': <function beginColumnConfiguration at 0x7f60a1c0a758>, 'setLocationExpandedCallback': <function setLocationExpandedCallback at 0x7f60a1c0a230>, 'locationNamesPolished': <function locationNamesPolished at 0x7f60a1c80488>, 'setMaxEventsToProcess': <function setMaxEventsToProcess at 0x7f60a1c0a668>, 'setRuleCriteria': <function setRuleCriteria at 0x7f60a1c0b050>, 'updateLocation': <function updateLocation at 0x7f60a1c84aa0>, 'getRootColumnSet': <function getRootColumnSet at 0x7f60a1c0a7d0>, 'setLocationDataProcessedCallback': <function setLocationDataProcessedCallback at 0x7f60a1c0a320>, 'getSceneGraphAttributes': <function getSceneGraphAttributes at 0x7f60a1c84848>, 'selectChildLocations': <function selectChildLocations at 0x7f60a1c800c8>, 'getColumnByName': <function getColumnByName at 0x7f60a1c0a9b0>, 'getSelectedItems': <function getSelectedItems at 0x7f60a1c84c08>, 'selectParentLocations': <function selectParentLocations at 0x7f60a1c80050>, 'setOverrideParameterRequestCallback': <function setOverrideParameterRequestCallback at 0x7f60a1c80a28>, 'setTopLevelDisplayIndex': <function setTopLevelDisplayIndex at 0x7f60a1c80d70>, 'interruptClientProcessing': <function interruptClientProcessing at 0x7f60a1c0a500>, 'setLocationCollapsed': <function setLocationCollapsed at 0x7f60a1c80230>, 'updateWidget': <function updateWidget at 0x7f60a1c84938>, 'setLocationExpanded': <function setLocationExpanded at 0x7f60a1c80140>, 'hideColumnSet': <function hideColumnSet at 0x7f60a1c0ab18>, 'setContextMenuEventCallback': <function setContextMenuEventCallback at 0x7f60a1c807d0>, 'getAllLocations': <function getAllLocations at 0x7f60a1c84c80>, 'removeTopLevelLocation': <function removeTopLevelLocation at 0x7f60a1c80b90>, 'setKeyPressEventCallback': <function setKeyPressEventCallback at 0x7f60a1c80848>})
__init__(debugMode=False, parent=None)

Initializes an instance of the class.

Parameters:
  • debugMode (bool) – Flag that controls whether to use a DebugViewLink or a TreeWidgetViewLink implementation for the view link used by the Bridge.
  • parent (QtWidgets.QWidget or None) – The parent widget to use for the SceneGraphView widget instance, or None to initialize a top-level widget.
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphView'
__weakref__

list of weak references to the object (if defined)

addAttributeDataItemType(itemTypeClass)

Adds a custom attribute data item type. This enables attribute data to be displayed as items in the widget as a child of a location. An example use case for this is displaying of error messages or collection items in the **Scene Graph** tab.

Parameters:itemTypeClass (type) – A class derived from AttributeDataTreeWidgetItem that implements the appearance of a custom attribute data item type.
addColumn(columnName)

Adds a stand-alone column to this SceneGraphView with the specified column name.

By default, the column will display the current location name, as a text field. As this function returns a reference to the column created you can use it to further configure it.

Parameters:columnName (str) – The name to assign to this column, the name is also used as the title text for this column.
Return type:SceneGraphColumn
Returns:A reference to the SceneGraphColumn object to allow further configuration.
See:SceneGraphColumn
addColumnSet(columnSetName)

Adds a column set with the specified name to the SceneGraphView. A column set is a grouping of column headers.

It has an ordering index which determines the relative order of its members compared to other column sets. Each member of a column set (which can be a column or other column set) itself has a local (within the group) ordering index.

Parameters:columnSetName (str) – The name given to this column set.
Return type:SceneGraphColumnSet
Returns:A reference to the SceneGraphColumnSet object.
See:SceneGraphColumnSet
addRule(ruleName)

Adds a new rule to the current rule set using the specified name which can be used later as a key to configure the rule.

Parameters:ruleName (str) – Name of the rule by which you can reference it later.
Raises:RuleManagerException – If ruleName already exists in the current rule set.
addTopLevelLocation(topLevelLocationPath, index=None)

Adds a new top-level location to the SceneGraphView. By default the only top level location will be /root.

If the location specified does not exist in the currently viewed scene then it will not be shown in the SceneGraphView. However, if the view node subsequently changes and the resulting scene does contain the specified location it will then be displayed in the SceneGraphView.

If the scene graph location you specify is already a top-level location this function will have no effect. You can obtain the current list of top-level locations from getTopLevelLocations

Top-level locations will be displayed in the order they were added to the SceneGraphView.

Parameters:
  • topLevelLocationPath (str) – The scene graph location path which should be added as a top-level location to this SceneGraphView.
  • index (int or None) – The index in the list of top-level locations at which to add the new location, or {None} to append the location to the list.
See:

getTopLevelLocations

addWorkingSetColumn(workingSetName, columnIcon=None, columnTitle=None, columnTitleToolTip=None)

Adds a column to this SceneGraphView, configured as a Working Set column using the given registered Working Set name.

Return type:

SceneGraphColumn

Parameters:
  • workingSetName (str) – The name of a Working Set to represent and control with the column, as registered in the Working Set Manager.
  • columnIcon (QtGui.QIcon or None) – A QtGui.QIcon instance to use for the column header. If None, no icon will be used. If provided, the displayed title style of the column will be set to SceneGraphColumnTitle.IconOnly. If you want to use both an icon and a title, you can call setTitleStyle() on the returned column object.
  • columnTitle (str or None) – The text to use on the title of the column. If None, the workingSetName will be used.
  • columnTitleToolTip (str or None) – An optional tooltip to display on the column title.
Returns:

A reference to the SceneGraphColumn object to allow further configuration.

allowMultipleSelection()
Return type:bool or None
Returns:True if the user can select multiple items in the widget, otherwise False, or None if the SceneGraphView widget has been destroyed.
applyColumnVisibilitySettings(columnVisibility)
Parameters:columnVisibility (dict) – A dictionary containing visibility settings for columns and column sets in the SceneGraphView widget, indexed by name. Can be used to restore the visible columns and column sets when restoring a tab layout.
See:SceneGraphColumn
applyColumnWidthsSettings(columnWidths)
Parameters:columnWidths (dict) – A dictionary containing the widths of columns in the SceneGraphView widget, indexed by name. Can be used to restore the widths of columns when restoring a tab layout.
See:SceneGraphColumn
beginColumnConfiguration()

A function that together with endColumnConfiguration can be used to wrap several calls of addColumnSet and addColumn without triggering column configuration change callback functions, to allow for efficient updating of UI widgets.

A registered column configuration change callback function is triggered when calling endColumnConfiguration.

clearExpandedLocationsRegistry(clearCurrent=False)

Clears the cache of previously expanded locations, and optionally of currently expanded locations as well.

Parameters:clearCurrent (bool) – Flag indicating whether the registry of currently expanded locations should be cleared.
Note:This does not cause any locations to be collapsed.
clearTopLevelLocations()

Removes all top-level locations from the SceneGraphView widget, so that it will be empty.

endColumnConfiguration()

A function that together with beginColumnConfiguration can be used to wrap several calls of addColumnSet and addColumn without triggering column configuration change callback functions, to allow for efficient updating of UI widgets.

Triggers a registered column configuration change callback function.

frozenWhenHidden()
Return type:bool or None
Returns:True if the Geolib clients are frozen (deactivated) when the widget is hidden and thawed (activated) when it is shown, or None if the SceneGraphView widget has been destroyed.
getAllLocations(visibleOnly=False)

Returns a list of scene graph locations that are currently displayed in the SceneGraphView widget.

For each item the list contains a 2 element tuple object of the following form:

(top-level location path, location path)

  • top-level location path refers to the scene graph location path of the top-level item which the selected scene graph location path belongs to.
  • location path refers to the scene graph location path selected.
  • If the top-level location path and location path are the same you can infer it is the top-level scene graph item which has been selected.

The scene graph location paths will be in their fully qualified form, unsorted containing no duplicates.

Return type:list of tuple or None
Parameters:visibleOnly (bool) – If True, then only locations which are currently visible in the SceneGraphView widget will be returned.
Returns:List of currently visible scene graph locations and the top-level item to which they belong, or None if the SceneGraphView widget has been destroyed.
getChildLocations(locationPath, topLevelLocationPath, visibleOnly=True, allDescendants=True)

Returns a list of child locations of the given location path that are currently visible in the SceneGraphView widget.

Return type:

list of str or None

Parameters:
  • locationPath (str) – The location for which the visible child locations should be returned.
  • topLevelLocationPath (str or None) – The top-level location under which the visible children for the given location should be returned, or None to return all visible children under the given location under any top-level location.
  • visibleOnly (bool) – If True, then only locations which are currently visible in the SceneGraphView widget will be returned.
  • allDescendants (bool) – If True, then all descendants of the given location will be returned. Otherwise, only immediate children will be returned.
Returns:

List of currently visible child locations of the given location, or None if the SceneGraphView widget has been destroyed.

getChildNameByIndex(parentLocationPath, childIndex)
Deprecated:This function will be removed. Please use getSceneGraphChildren() instead.
getColumnByName(columnName)
Return type:SceneGraphColumn or None
Parameters:columnName (str) – The name of the column to return.
Returns:The first column object found with the given name, or None if no such column exists.
getColumnPresetManager()
Return type:ColumnPresetManager
Returns:An instance of the internal ColoumnPresetManager.
getColumnVisibilitySettings()
Return type:dict
Returns:A dictionary containing the visibility settings for all columns and column sets in the SceneGraphView widget, indexed by name. Can be used to retrieve and save the visible columns and column sets when saving a tab layout.
See:SceneGraphColumn
getColumnWidthsSettings()
Return type:dict
Returns:A dictionary containing the widths of all columns in the SceneGraphView widget, indexed by name. Can be used to retrieve and save column widths when saving a tab layout.
See:SceneGraphColumn
getCurrentRules()
Return type:dict of dict
Returns:Current Rule set described as dictionary of dictionaries.
getNumberOfChildren(parentLocationPath)
Deprecated:This function will be removed. Please use getSceneGraphChildren() instead.
getParent(locationPath)
Return type:str or None
Parameters:locationPath (str) – The path to return the parent for.
Returns:The parent path of the given location path, or None if the path is the root of the tree.
getRootColumnSet()
Return type:SceneGraphColumnSet
Returns:A reference to the root SceneGraphColumnSet object for the widget.
getSceneGraphAttributes(locationPath, callback=None, oneShot=False)

Returns the scene graph attributes at the scene graph location with the given path. The method has two modes of operation:

  • If callback is not specified and the SceneGraphView widget does not already have the requested location cached then it will return None, otherwise it will return the attributes of the requested location.
  • If callback is specified, it will first check its cache and return the attribute data stored if present via this function. Otherwise it will activate the location with Geolib3, return from this function call with None, and call you back via callback when it’s ready. This mode obeys the parameter oneShot, which, if True will only notify the callback once, otherwise the callback will be called whenever the location’s attributes change.

The callback is expected to have the following signature:

C{function(locationPath, attributes)}

Where:

  • locationPath is an str providing the path of the scene graph location the corresponding attributes relate to.
  • attributes is an instance of PyFnAttribute.Attribute and contains the attributes at the specified location.

The callback is expected to return True if it should continue to receive updates for the requested location, otherwise it should return False. The return value will be ignored where :py:obj:`oneShot=True`.

If the callback raises an exception, it will no longer be called for the location it was registered for. However, it will still be called for other locations it may have been registered for.

Return type:

PyFnAttribute.GroupAttribute or None

Parameters:
  • locationPath (str) – The path of the scene graph location whose attributes to return.
  • callback (callable) – If not None this will be called back if the location data is not immediately available.
  • oneShot (bool) – If True, and callback is not None then callback will only be called once.
Returns:

A group attribute containing the attributes of the scene graph location with the given path, or None if no such attributes are available.

getSceneGraphChildren(parentLocationPath, callback=None, oneShot=False)

Returns the list of children under the scene graph location with the given path. The method has two modes of operation:

  • If callback is not specified and the SceneGraphView widget does not already have the requested location cached then it will return None, otherwise it will return the children of the requested location.
  • If callback is specified, it will first check its cache and return the children stored if present via this function. Otherwise it will activate the location with Geolib3, return from this function call with None, and call you back via callback when it’s ready. This mode obeys the parameter oneShot, which, if True will only notify the callback once, otherwise the callback will be called whenever the location’s attributes change.

The callback is expected to have the following signature:

C{function(parentLocationPath, children)}

Where:

  • parentLocationPath is an str providing the path of the scene graph location the corresponding children relate to.
  • children is a list of names of scene graph locations that exist underneath the parent scene graph location with the given path.

The callback is expected to return True if it should continue to receive updates for the requested location, otherwise it should return False. The return value will be ignored where :py:obj:`oneShot=True`.

If the callback raises an exception, it will no longer be called for the location it was registered for. However, it will still be called for other locations it may have been registered for.

Return type:

list or None

Parameters:
  • parentLocationPath (str) – The path of the scene graph location whose children to return.
  • callback (callable) – If not None this will be called back if the location data is not immediately available.
  • oneShot (bool) – If True, and callback is not None then callback will only be called once.
Returns:

The children of the scene graph location with the given path, or None if the scene graph location does not have any children.

getSelectedItems()
Return type:list of TreeWidgetItem or None
Returns:A list of the items in the SceneGraphView widget that the user currently has selected, or None if the SceneGraphView widget has been destroyed.
getSelectedLocations(sortBySceneGraphOrder=False)

Returns a list of scene graph locations that the user currently has selected.

For each selected item the list contains a 2 element tuple object of the following form:

(top-level location path, location path)

  • top-level location path refers to the scene graph location path of the top-level item which the selected scene graph location path belongs to.
  • location path refers to the scene graph location path selected.
  • If the top-level location path and location path are the same you can infer it is the top-level scene graph item which has been selected.

The scene graph location paths will be in their fully qualified form, unsorted containing no duplicates.

Return type:list of tuple or None
Parameters:sortBySceneGraphOrder (bool) – True if the results should be sorted according to the order they appear in the widget, or False to return the locations in the order in which they were selected.
Returns:List of currently selected scene graph locations and the top-level item to which they belong, or None if the SceneGraphView widget has been destroyed.
getTopLevelLocations()

Returns a list of all top-level locations this SceneGraphView knows about.

You can infer the display order of top-level locations based on the order they are defined in the list returned by this function.

It is possible that there are locations in the list returned by this function which are not visible in the SceneGraphView. This is because the scene graph location path may refer to a location which does not exist in the currently viewed scene.

Return type:list of str
Returns:A list of the scene graph location paths which are top-level locations.
getWidget()
Return type:QtWidgets.QWidget or None
Returns:Returns a handle to a QtWidgets.QWidget instance which represents the viewable SceneGraphView widget capable of being displayed in a Qt application, or None if the SceneGraphView widget has been destroyed.
hideColumnSet(columnSetName)

Makes the column set with the given name invisible.

This function will have no effect if the specified name does not exist.

Parameters:columnSetName (str) – The name assigned to the column set that should be hidden.
See:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn
interruptClientProcessing()

Cancel client processing. Useful to halt a long running cook process.

isFrozen()
Return type:bool
Returns:True if the Geolib3 clients managed by this SceneGraphView are currently frozen (not active), otherwise False.
isLocationExpanded(topLevelLocationPath, locationPath)

Indicates whether the given location is expanded in the view.

Return type:

bool or None

Parameters:
  • topLevelLocationPath (str) – The top level location which under which the location’s expansion state should be returned.
  • locationPath (str) – The location path whose expansion state should be returned.
Returns:

The expansion state of the given location under the given top-level location, or None if the SceneGraphView widget has been destroyed.

isProcessing()
Return type:bool
Returns:True if events were processed during the last idle loop, otherwise False.
isStopping()
Return type:bool
Returns:True if the clients managed by this SceneGraphView have been interrupted and are still processing events received since the interruption, otherwise False.
locationNamesPolished()
Return type:bool or None
Returns:A boolean value indicating whether scene graph location names are being “polished” for display in the widget, or None if the SceneGraphView widget has been destroyed
removeRule(ruleName)

Removes the rule specified by ruleName from the current rule set.

Parameters:ruleName (str) – The name of the rule to remove from the rule set.
removeTopLevelLocation(topLevelLocationPath)

Removes the top level location specified by topLevelLocationPath from the SceneGraphView. This will not delete scene graph locations or modify the underlying scene graph in any way.

If you specify a location which is not a top-level item then this function will raise a TreeWidgetException.

Parameters:topLevelLocationPath (str) – The scene graph location path which should be removed from the top-level locations displayed by this SceneGraphView.
Raises:TreeWidgetException – If topLevelLocationPath is not a valid top-level scene graph location path.
saveExpandedLocations()

Saves the currently expanded locations. This can be called before performing actions which might cause the expansion state to be lost (for example, when the viewed node changes), so that locations’ expansion state can be recovered later on.

Return type:set of (str, str) or None
Returns:A set of tuples in the form (locationPath, topLevelLocationPath) indicating the currently expanded locations, or None if the SceneGraphView widget has been destroyed.
scrollToLocation(topLevelLocationPath, locationPath)

Scrolls the view so that the scene graph location specified by topLevelLocationPath and locationPath is visible.

Parameters:
  • topLevelLocationPath (str) – The top-level location which under which the location should be scrolled to.
  • locationPath (str) – The location path to which to scroll the view.
selectChildLocations(replaceSelection=True)
selectLocations(locations, replaceSelection=True)

Selects the scene graph locations specified by locations, optionally replacing the current selection.

locations is a list whose elements are either 2-tuples of:

(top-level location path, location path)

or single strings representing locations paths, in which case every occurrence of each element of locations will be selected.

Parameters:
  • locations (list of tuple containing a pair of str, or list of str) – A list of the locations to select, either in tuples of the form (topLevelLocationPath, locationPath) or just as a list of locations. In the latter case, every instance of the specified location will be selected (i.e. under any top-level location).
  • replaceSelection (bool) – A flag to indicate whether the specified locations should replace what is currently selected.
selectParentLocations(replaceSelection=True)
setAboutToDragCallback(callback)

Registers a function to be called when a drag action begins. This allows the MIME data for the drag event to be configured.

If this is not specified then a default will be provided that provides the textual representation of the selected scene graph location paths in a space-delimited list.

The callback is expected to have the following signature:

C{function(items, dragObject)}

Where:

  • items is a list of specialized QtWidgets.QTreeWidgetItem instances that represent the items that are about to be dragged.
  • dragObject is an instance of QtGui.QDrag, and provides details about the drag operation.

The callback is not expected to return a value.

Parameters:callback (callable) – A callable function to handle about to drag events.
setAllowMultipleSelection(allowMultipleSelection)

Enable or disable multiple selections in the View

Parameters:allowMultipleSelection (bool) – A flag indicating whether the user can select multiple items.
setContextMenuEventCallback(callback)

Sets a function to be called when the user right-clicks on a scene graph location in the widget or into empty space within the widget, in order to customize the contents of the context menu that is shown.

The callback is expected to have the following signature:

C{function(contextMenuEvent, menu)}

Where:

  • contextMenuEvent is an instance of ContextMenuEvent and allows you to interrogate the scene graph location path, top-level location path and column under the pointer when the menu was requested.

It also allows you to interrogate the current selection state, thus allowing you to provide actions specific to particular scene graph locations.

  • menu is an instance of QtWidgets.QMenu to which custom actions can be added by calling its addAction() function.

The callback is not expected to return a value.

For the Name column, the context menu passed to the callback will contain the following commands by default:

  1. **Expand Branches** - Expands all selected locations recursively, including their child locations.
  2. **Expand Branches To** - Expands all selected locations recursively, including their child locations, but stops at locations of a particular type, as chosen in the submenu.
  3. **Collapse Branches To** - Collapses all selected locations recursively, including their child and parent locations, but stops at locations of a particular type, as chosen in the submenu.
  4. **Collapse Branches** - Collapses all selected locations recursively, including their child locations.
  5. **Expand Locations** - Shown when at least one location is selected. Expands the selected locations while keeping the expansion state of child locations.
  6. **Collapse Locations** - Shown when at least one location is selected. Collapses the selected locations while keeping the expansion state of child locations.

If the context menu is opened when all top-level locations are selected, the commands for expanding and collapsing branches are named Expand All, Expand All To, Collapse All To and Collapse All, respectively. Those commands are also included when the user right-clicks into empty space within a SceneGraphView widget while no locations are selected.

Parameters:callback (callable) – A callback that will be triggered when the user right-clicks within the SceneGraphView widget.
See:UI4.Widgets.SceneGraphView.ContextMenuEvent.ContextMenuEvent
setDragMoveEventCallback(callback)

Registers a function to be called when items are dragged over the SceneGraphView widget in order to determine whether dragged items could be dropped onto the widget.

The callback is expected to have the following signature:

C{function(dragMoveEvent, draggedItems, parentItem, childItemIndex)}

Where:

  • dragMoveEvent is an instance of QtGui.QDragMoveEvent, and provides details about the drag operation in progress.
  • draggedItems is a list of specialized QtWidgets.QTreeWidgetItem instances that represent the items that are being dragged over the widget.
  • parentItem is a specialized QtWidgets.QTreeWidgetItem instance that represents an item in the SceneGraphView widget that contains the item over which the dragged items are being dragged. parentItem is None if items are being dragged over empty space in the SceneGraphView widget.
  • childItemIndex is an integer number representing the index of the item under the pointer underneath the given parentItem.

The callback is not expected to return a value.

By default, the given dragMoveEvent is ignored, meaning that dragged items cannot be dropped. If you want to allow dragged items to be dropped, call accept() on the given dragMoveEvent in your callback.

Parameters:callback (callable) – A callable function to handle drag move events.
setDropEventCallback(callback)

Registers a function to be called when dragged items are dropped over the SceneGraphView widget in order to trigger custom behavior depending on the number and type of the dragged items and the item onto which the dragged items have been dropped.

The callback is expected to have the following signature:

C{function(dropEvent, droppedItems, parentItem, childItemIndex)}

Where:

  • dropEvent is an instance of QtGui.QDropEvent, and provides details about the drop operation.
  • droppedItems is a list of specialized QtWidgets.QTreeWidgetItem instances that represent the items that have been been dropped onto the widget.
  • parentItem is a specialized QtWidgets.QTreeWidgetItem instance that represents an item in the SceneGraphView widget that contains the item over which the dragged items have been dropped. parentItem is None if items have been dropped over empty space in the SceneGraphView widget.
  • childItemIndex is an integer number representing the index of the item under the pointer underneath the given parentItem.

The callback is not expected to return a value.

Parameters:callback (callable) – A callable function to handle drag move events.
setExpandsOnDoubleClick(expandsOnDoubleClick)

Enable or disable recursively expanding child locations when a double- click event is received. The default is True.

Parameters:expandsOnDoubleClick (bool) – Whether or not to expand child locations on double-click.
setFrozenWhenHidden(frozenWhenHidden=True)
Parameters:frozenWhenHidden (bool) – A flag indicating whether the internal Geolib clients in the widget will be frozen (deactivated) when the widget is hidden, and thawed (activated) when it is shown. Default is True.
setKeyPressEventCallback(callback)

Specifies a function to handle keyPress events from the underlying Qt widget.

The callback is expected to have the following signature:

C{function(keyPressEvent)}

Where:

  • keyPressEvent is an instance of QtGui.QKeyEvent, and specifies which key has been pressed.

The callback is not expected to return a value.

Parameters:callback (callable) – A callable function to handle key press events.
setLocationActive(locationPath)

Sets the scene graph location with the given path in the managed client for SceneGraphView to the active state.

Active locations are explicitly recomputed every time anything is committed to the Geolib3 runtime.

Parameters:locationPath (str) – The path of the scene graph location to activate in the managed client.
setLocationAddedOrUpdatedCallback(callback)

Sets the function to be called whenever a new location is added or updated in the scene graph view.

The callback is expected to have the following signature:

C{function(locationPath, topLevelLocationPath)}

Where:

  • locationPath is a str containing the path to the location which has been added
  • topLevelLocationPath is a str containing the top-level location under which the given location exists in the widget

The callback is not expected to return a value.

Parameters:callback (callable) – The callback that will be called when a location is added or updated.
setLocationCollapsed(topLevelLocationPath, locationPath)

Sets the scene graph location specified by the topLevelLocationPath and locationPath to be collapsed in the view.

Parameters:
  • topLevelLocationPath (str) – The top level location which under which the location should be collapsed.
  • locationPath (str) – The location path to collapse.
setLocationCollapsedCallback(callback)

Sets the function to be called whenever a location is collapsed in the scene graph view.

The callback is expected to have the following signature:

C{function(locationPath, topLevelLocationPath, recursive)}

Where:

  • locationPath is a str containing the path to the location which has been collapsed
  • topLevelLocationPath is a str containing the top-level location under which the given location was collapsed in the widget
  • recursive is a bool indicating whether the location was collapsed recursively.

The callback is not expected to return a value.

Parameters:callback (callable) – The callback that will be called when a location is collapsed in the scene graph view.
setLocationDataProcessedCallback(callback)

Sets the function to be called after all location data has finished being processed.

The callback is expected to have the following signature:

C{function(processedLocations)}

Where:

  • processedLocations is a set of tuples of the form (top-level location path, location path), representing the scene graph locations whose data have been changed.

The callback is not expected to return a value.

Parameters:callback (callable) – The callback that will be called after the location update callbacks are finished being processed.
setLocationExpanded(topLevelLocationPath, locationPath)

Sets the scene graph location specified by the topLevelLocationPath and locationPath to be expanded in the view.

Parameters:
  • topLevelLocationPath (str) – The top level location which under which the location should be expanded.
  • locationPath (str) – The location path to expand.
setLocationExpandedCallback(callback)

Sets the function to be called whenever a location is expanded in the scene graph view.

The callback is expected to have the following signature:

C{function callback(locationPath, topLevelLocationPath, recursive)}

Where:

  • locationPath is a str containing the path to the location which has been expanded
  • topLevelLocationPath is a str containing the top-level location under which the given location was expanded in the widget
  • recursive is a bool indicating whether the location was expanded recursively.

The callback is not expected to return a value.

Parameters:callback (callable) – The callback that will be called when a location is expanded in the scene graph view.
setLocationExpandedRecursive(topLevelLocationPath, locationPath)

Recursively opens the location locationPath and its descendant locations, respecting configured stop conditions.

Parameters:
  • topLevelLocationPath (str) – The top level location which under which the location should be expanded.
  • locationPath (str) – The location path to expand.
setLocationNamePolishCallback(callback)

Sets the function to call to “polish” the name displayed for a scene graph location.

The callback is expected to have the following signature:

C{function(locationPath, topLevelLocationPath) :
polishedLocationPath}

Where:

  • locationPath is a str containing the full path of the scene graph location whose name is being displayed, e.g. "/root/world/lgt/lightRig1/lightRig1_keyLight"
  • topLevelLocationPath is a str containing the full path of the top level location under which this location is displayed, e.g. "/root/world/lgt"

The callback is expected to return the polished name which will be displayed for the scene graph location, e.g. keyLight.

Parameters:callback (callable) – A callable object that will be called to determine the name to be displayed for a scene graph location.
setLocationNamesPolished(namesPolished)

Sets whether name “polishing” should be applied to scene graph location names displayed in the widget.

Parameters:namesPolished (bool) – A boolean value indicating whether we wish to run the specified name polishing callback on scene graph location names displayed in the widget.
setLocationRemovedCallback(callback)

Sets the function to be called whenever a location is removed in the scene graph view. This allows users to respond to the specific locations being removed by the scene graph processing instructions.

The callback is expected to have the following signature:

C{function(locationPath, topLevelLocationPath)}

Where:

  • locationPath is a str containing the path to the location which has been removed
  • topLevelLocationPath is a str containing the top-level location under which the given location existed in the widget

The callback is not expected to return a value.

Parameters:callback (callable) – The callback that will be called when a location is removed from the currently viewed scene.
setMaxEventsToProcess(maxEventsToProcess)

Set the maximum number of events that the client manager can process per cycle.

Parameters:maxEventsToProcess (int) – The maximum number of events that the client manager can process per cycle. A negative or zero value indicates no maximum.
setOverrideParameterRequestCallback(callback)

Sets the function to call when override parameters for attributes of scene graph locations are requested.

The callback is expected to have the following signature:

C{function(overrideParameters)}

Where:

  • overrideParameters is a nested dictionary with paths of scene graph locations and resolved names of scene graph attributes for which override parameters have been requested. The callback is expected to populate the dictionary with tuples of a node and the name of an override parameter as values: (NodegraphAPI.Node, str)

The callback is not expected to return a value.

Parameters:callback (callable) – A callable object that will be called when override parameters corresponding to attributes of scene graph locations are requested.
setRuleCriteria(ruleName, criteriaName, criteria)

Sets the criteria of the specified evaluator for a given rule.

This function will have no effect if ruleName refers to a non-existent Rule.

Parameters:
  • ruleName (str) – The rule name assigned to the Rule.
  • criteriaName (str) – The criteria name required by the evaluator.
  • criteria (Criteria) – The criteria object.
setRuleEvaluator(ruleName, evaluator)

Sets the evaluator of the specified rule.

This function will have no effect if ruleName refers to a non-existent Rule.

Parameters:
  • ruleName (str) – The rule name assigned to the Rule.
  • evaluator (Evaluator) – The evaluator object to set.
setRuleMatchPolicy(ruleMatchPolicy)

Sets the rule matching policy that should apply when testing scene graph locations against the current set of configured rules.

Valid policies are:

  • MatchAnyPolicy
  • MatchAllPolicy

The default policy is MatchAnyPolicy.

Parameters:ruleMatchPolicy (int) – A valid rule matching policy
setRuleTarget(ruleName, column)

Sets the target column of the specified rule.

This function will have no effect if ruleName refers to a non-existent rule.

Parameters:
  • ruleName (str) – The rule name assigned to the Rule.
  • column (SceneGraphColumn) – The column which will be targeted for the rule.
Todo:

Extend this function to allow target to work in Attribute or Parameter mode.

setSelectionChangedCallback(callback)

Sets the specified selection changed callback. Whenever the selection changes as a result of user interaction this callback will be triggered.

It is possible to interrogate the current selection using getSelectedLocations.

The callback is expected to have the following signature:

C{function()}

The callback takes no arguments and is not expected to return a value.

Parameters:callback (callable) – A callback that will be triggered each time the selection changes.
See:getSelectedLocations
setSelectionState(topLevelLocationPath, locationPath, selected)

Sets the scene graph location specified by topLevelLocationPath and locationPath to the given selection state.

If topLevelLocationPath is None then every occurrence of locationPath will have the selected state applied.

Parameters:
  • topLevelLocationPath (str) – The top-level location path under which to set the selection state of the specified location path. If None, then every occurrence of the specified location path will have its selection state set.
  • locationPath (str) – The scene graph location path whose selection state should be set.
  • selected (bool) – The selection state to which to set the given scene graph location.
setStopRecursiveExpandAttributeNames(attributeNames)

Sets a list of attribute names whose presence at a location should stop recursive expansion.

Parameters:attributeNames (list of str) – A list of attribute names whose presence at a location should stop recursive expansion.
setStopRecursiveExpandLocationTypes(locationTypes)

Sets a list of location types at which recursive expansion should stop.

Parameters:locationTypes (list of str) – A list of location types at which recursive expansion should stop.
setTerminalOps(terminalOpArgs)

Creates a chain of Ops, based on the given Op description in the form of a sequence of Op type and Op argument tuples, and sets the last one of them to be the Op to use in the clients managed by this client manager. The Op arguments can be omitted if there are no arguments for the Op. If Op arguments has been given, an optional ‘key’ can be provided which is used to identify the Op when updating its arguments.

When created, each Op will take its input from the previous Op in the sequence. These Ops will overwrite any previously created terminal Ops.

Parameters:terminalOpArgs (tuple of tuple of (str, FnAttribute.GroupAttribute, str) or (str, FnAttribute.GroupAttribute) or (str)) – A list of Op type name, Op args and terminal Op key triplets.
setTopLevelDisplayIndex(locationPath, index)

Set the display index for the given top-level location.

Parameters:
  • locationPath (str) – The scene graph location of a top level item to move.
  • index (int) – The new display index for the specified item.
setTopLevelLocations(topLevelLocationPaths)

Sets the list of paths of scene graph locations the SceneGraphView widget shows as top-level locations to the given list.

Parameters:topLevelLocationPaths (list of str) – A list of paths of scene graph locations to show as top-level locations in the SceneGraphView widget.
setUpdateViewportAutomatically(updateViewportAutomatically)

Sets whether the viewport of the SceneGraphView widget should update automatically. By default, this is True.

Parameters:updateViewportAutomatically (bool) – True if the viewport of the widget should update automatically, or False for the viewport to only update when updateViewport is called.
setViewNode(node, applyImplicitResolvers=False, extraImplicitResolverOpArgs=None)

Sets the Op used in the SceneGraphView widget’s Geolib3 client to the terminal Op for the given viewed node, optionally appending Ops related to the resolving of materials, constraints etc.

Parameters:
  • node (NodegraphAPI.Node or None) – The node whose terminal Op to use for the Geolib3 client, or None to reset the Geolib3 client.
  • applyImplicitResolvers (bool) – Flag that controls whether Ops for implicit resolvers are to be appended to the given viewed node’s terminal Op in the Geolib3 client used by the SceneGraphView widget.
  • extraImplicitResolverOpArgs (dict or None) – dict mapping Op type names (str) to group attributes (GroupAttribute) describing additional arguments to pass to Ops with the given types.
setViewOp(op, applyImplicitResolvers=False, extraImplicitResolverOpArgs=None)

Sets the Op used in the SceneGraphView widget’s Geolib3 client to the given Op, optionally appending Ops related to the resolving of materials, constraints etc.

Parameters:
  • op (FnGeolibOp or None) – The Op to use for the Geolib3 client, or None to reset the Geolib3 client.
  • applyImplicitResolvers (bool) – Flag that controls whether Ops for implicit resolvers are to be appended to the given viewed node’s terminal Op in the Geolib3 client used by the SceneGraphView widget.
  • extraImplicitResolverOpArgs (dict or None) – dict mapping Op type names (str) to group attributes (GroupAttribute) describing additional arguments to pass to Ops with the given types.
showColumnSet(columnSetName)

Makes the column set with the given name visible.

This function will have no effect if the specified name does not exist.

Parameters:columnSetName (str) – The name assigned to the column set that should be shown.
See:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn
showRuleConfigDialog()

Makes the rule filtering configuration dialog box visible.

topLevelLocationRenamed(oldLocationPath, newLocationPath)

Notifies the SceneGraphView widget that a top-level location has been renamed. This is intended to be called in response to a UI event, e.g. a node being renamed in the Gaffer UI.

updateLocation(topLevelLocationPath, locationPath)

Refreshes the UI of the SceneGraphView for the given location path.

Parameters:
  • topLevelLocationPath (str) – The top-level location which under which the location should be updated.
  • locationPath (str) – The location path to update
updateLocationIcons(topLevelLocationPath, locationPath)

Refreshes the icons displayed in the SceneGraphView for the given location path.

Parameters:
  • topLevelLocationPath (str) – The top-level location which under which the location should have its icons updated.
  • locationPath (str) – The location path to update the icons for.
updateSelection(selectedLocations, deselectedLocations)

Updates the set of selected locations, adding those in selectedLocations and removing those in deselectedLocations.

Parameters:
  • selectedLocations (list of 2-tuple of str, or list of str) – A list of the locations to add to the selection, either in tuples of the form (topLevelLocationPath, locationPath) or just as a list of locations. In the latter case, every instance of the specified location will be selected (i.e. under any top-level location).
  • deselectedLocations (list of 2-tuple of str, or list of str) – A list of the locations to remove from the selection, either in tuples of the form (topLevelLocationPath, locationPath) or just as a list of locations. In the latter case, every instance of the specified location will be selected (i.e. under any top-level location).
updateTerminalOps(terminalOpArgs, txn=None)

Updates the arguments of a chain of custom terminal Ops that were previously appended to the Op tree.

Parameters:
  • terminalOpArgs (tuple of tuple of (str, FnAttribute.GroupAttribute, str)) – A sequence of terminal Op type, Op arguments and terminal op key triplets.
  • txn (FnGeolib.GeolibRuntime.Transaction or None) – The transaction that will be used to set the Op arguments. If no transaction is provided, a new one is created.
updateViewport()

Refreshes the viewport of the SceneGraphView widget.

updateWidget()

Refreshes the UI of the SceneGraphView widget to reflect changes in the column configuration and in scene graph location attributes.

Bridge

Module containing the Bridge abstract base class.

class UI4.Widgets.SceneGraphView.Bridge.Bridge

Bases: object

Abstract base class that represents the functions exposed by the Bridge to allow users to configure and interrogate the information stored about the scene graph.

__abstractmethods__ = frozenset(['getTitleText', 'addColumnSet', 'updateViewLink', 'getCurrentRules', 'setLocationNamesPolished', 'setTopLevelLocations', 'setRuleEvaluator', 'matchRules', 'isStopping', 'getColumnByName', 'getNumberOfChildren', 'setRuleShowChildren', 'addRule', 'getNumberOfTopLevelLocations', 'renameRule', 'setLocationAddedOrUpdatedCallback', 'getColumnByIndex', 'setLocationRemovedCallback', 'thaw', 'setRuleEnabled', 'getTopLevelDisplayIndex', 'fontChanged', 'getRuleByName', 'setUpdateViewportAutomatically', 'setRuleComment', 'setTerminalOps', 'getColumnPresetManager', 'setLocationNamePolishCallback', 'getParent', 'getOverrideNodeAndParameterName', 'setRuleMatchInversion', 'addAttributeDataItemType', 'getTopLevelLocations', 'setViewNode', 'addColumn', 'topLevelLocationRenamed', 'isEditable', 'setRuleTarget', 'freeze', 'setStopRecursiveExpandAttributeNames', 'setRuleMatchPolicy', 'setStopRecursiveExpandLocationTypes', 'isProcessing', 'getSceneGraphChildren', 'endColumnConfiguration', 'setLocationActive', 'addTopLevelLocation', 'removeTopLevelLocation', 'getNumberOfColumns', 'clearTopLevelLocations', 'isFrozen', 'removeRule', 'beginColumnConfiguration', 'getViewLink', 'locationNamesPolished', 'getColumnDataType', 'setMaxEventsToProcess', 'setLocationDataProcessedCallback', 'getRootColumnSet', 'expandLocation', 'isNameColumn', 'getAttributeDataItemTypes', 'setRuleCriteria', 'getPotentialChildren', 'getSceneGraphAttributes', 'getResolvedAttributeName', 'collapseLocation', 'setViewOp', 'getDisplayData', 'setTopLevelDisplayIndex', 'resetAttributeDataItemTypes', 'interruptClientProcessing', 'getRuleMatchInversion', 'clearRuleCriteria', 'setRuleInverted', 'setKeyPressEventCallback'])
__dict__ = dict_proxy({'getColumnVisibilitySettings': <function getColumnVisibilitySettings at 0x7f60a1c599b0>, '__abstractmethods__': frozenset(['getTitleText', 'addColumnSet', 'updateViewLink', 'getCurrentRules', 'setLocationNamesPolished', 'setTopLevelLocations', 'setRuleEvaluator', 'matchRules', 'isStopping', 'getColumnByName', 'getNumberOfChildren', 'setRuleShowChildren', 'addRule', 'getNumberOfTopLevelLocations', 'renameRule', 'setLocationAddedOrUpdatedCallback', 'getColumnByIndex', 'setLocationRemovedCallback', 'thaw', 'setRuleEnabled', 'getTopLevelDisplayIndex', 'fontChanged', 'getRuleByName', 'setUpdateViewportAutomatically', 'setRuleComment', 'setTerminalOps', 'getColumnPresetManager', 'setLocationNamePolishCallback', 'getParent', 'getOverrideNodeAndParameterName', 'setRuleMatchInversion', 'addAttributeDataItemType', 'getTopLevelLocations', 'setViewNode', 'addColumn', 'topLevelLocationRenamed', 'isEditable', 'setRuleTarget', 'freeze', 'setStopRecursiveExpandAttributeNames', 'setRuleMatchPolicy', 'setStopRecursiveExpandLocationTypes', 'isProcessing', 'getSceneGraphChildren', 'endColumnConfiguration', 'setLocationActive', 'addTopLevelLocation', 'removeTopLevelLocation', 'getNumberOfColumns', 'clearTopLevelLocations', 'isFrozen', 'removeRule', 'beginColumnConfiguration', 'getViewLink', 'locationNamesPolished', 'getColumnDataType', 'setMaxEventsToProcess', 'setLocationDataProcessedCallback', 'getRootColumnSet', 'expandLocation', 'isNameColumn', 'getAttributeDataItemTypes', 'setRuleCriteria', 'getPotentialChildren', 'getSceneGraphAttributes', 'getResolvedAttributeName', 'collapseLocation', 'setViewOp', 'getDisplayData', 'setTopLevelDisplayIndex', 'resetAttributeDataItemTypes', 'interruptClientProcessing', 'getRuleMatchInversion', 'clearRuleCriteria', 'setRuleInverted', 'setKeyPressEventCallback']), 'getColumnWidthsSettings': <function getColumnWidthsSettings at 0x7f60a1c59aa0>, 'getTitleText': <function getTitleText at 0x7f60a1c59f50>, 'addColumnSet': <function addColumnSet at 0x7f60a1c59758>, 'updateViewLink': <function updateViewLink at 0x7f60a1c5b578>, 'getCurrentRules': <function getCurrentRules at 0x7f60a1c5bde8>, 'showColumnSet': <function showColumnSet at 0x7f60a1c598c0>, 'setLocationNamesPolished': <function setLocationNamesPolished at 0x7f60a1c5f050>, '__dict__': <attribute '__dict__' of 'Bridge' objects>, 'setTopLevelLocations': <function setTopLevelLocations at 0x7f60a1c59320>, '__weakref__': <attribute '__weakref__' of 'Bridge' objects>, 'setRuleEvaluator': <function setRuleEvaluator at 0x7f60a1c5b9b0>, 'matchRules': <function matchRules at 0x7f60a1c5b758>, 'isStopping': <function isStopping at 0x7f60a1cb9f50>, 'getColumnByName': <function getColumnByName at 0x7f60a1c59ed8>, 'getNumberOfChildren': <function getNumberOfChildren at 0x7f60a1c5b140>, 'setRuleShowChildren': <function setRuleShowChildren at 0x7f60a1c5bb90>, 'setViewLink': <function setViewLink at 0x7f60a1c5b500>, 'getRuleMatchInversion': <function getRuleMatchInversion at 0x7f60a1c5bd70>, 'getNumberOfTopLevelLocations': <function getNumberOfTopLevelLocations at 0x7f60a1c59398>, 'renameRule': <function renameRule at 0x7f60a1c5b8c0>, '_abc_negative_cache': <_weakrefset.WeakSet object at 0x7f60a1c566d0>, 'updateTerminalOps': <function updateTerminalOps at 0x7f60a1cb9938>, 'setLocationAddedOrUpdatedCallback': <function setLocationAddedOrUpdatedCallback at 0x7f60a1cb9758>, 'getOverrideNodeAndParameterName': <function getOverrideNodeAndParameterName at 0x7f60a1c5b5f0>, 'getColumnByIndex': <function getColumnByIndex at 0x7f60a1c59e60>, 'setLocationRemovedCallback': <function setLocationRemovedCallback at 0x7f60a1cb97d0>, 'thaw': <function thaw at 0x7f60a1cb9d70>, 'setRuleEnabled': <function setRuleEnabled at 0x7f60a1c5baa0>, 'removeRule': <function removeRule at 0x7f60a1c5b848>, 'fontChanged': <function fontChanged at 0x7f60a1c5b6e0>, 'getRuleByName': <function getRuleByName at 0x7f60a1c5bed8>, 'setUpdateViewportAutomatically': <function setUpdateViewportAutomatically at 0x7f60a1c5b668>, 'setRuleComment': <function setRuleComment at 0x7f60a1c5bc08>, 'setTerminalOps': <function setTerminalOps at 0x7f60a1cb98c0>, '__doc__': '\n Abstract base class that represents the functions exposed by the B{Bridge}\n to allow users to configure and interrogate the information stored about\n the scene graph.\n ', 'getColumnPresetManager': <function getColumnPresetManager at 0x7f60a1c595f0>, 'setLocationNamePolishCallback': <function setLocationNamePolishCallback at 0x7f60a1c5bf50>, 'setRuleMatchInversion': <function setRuleMatchInversion at 0x7f60a1c5bcf8>, 'setLocationActive': <function setLocationActive at 0x7f60a1cb9aa0>, 'getParent': <function getParent at 0x7f60a1c5b0c8>, 'addAttributeDataItemType': <function addAttributeDataItemType at 0x7f60a1c5f140>, 'applyColumnVisibilitySettings': <function applyColumnVisibilitySettings at 0x7f60a1c59a28>, 'getTopLevelLocations': <function getTopLevelLocations at 0x7f60a1c592a8>, 'applyColumnWidthsSettings': <function applyColumnWidthsSettings at 0x7f60a1c59b18>, '_abc_negative_cache_version': 22, 'columnResized': <function columnResized at 0x7f60a1c59b90>, 'setViewNode': <function setViewNode at 0x7f60a1cb9b18>, 'addColumn': <function addColumn at 0x7f60a1c597d0>, '_abc_registry': <_weakrefset.WeakSet object at 0x7f60a1c56550>, 'topLevelLocationRenamed': <function topLevelLocationRenamed at 0x7f60a1c59488>, '__module__': 'UI4.Widgets.SceneGraphView.Bridge', '__metaclass__': <class 'abc.ABCMeta'>, 'isEditable': <function isEditable at 0x7f60a1c59d70>, 'setRuleTarget': <function setRuleTarget at 0x7f60a1c5b938>, 'freeze': <function freeze at 0x7f60a1cb9cf8>, 'setStopRecursiveExpandAttributeNames': <function setStopRecursiveExpandAttributeNames at 0x7f60a1c590c8>, 'setRuleMatchPolicy': <function setRuleMatchPolicy at 0x7f60a1c5bc80>, 'setStopRecursiveExpandLocationTypes': <function setStopRecursiveExpandLocationTypes at 0x7f60a1c59140>, 'isProcessing': <function isProcessing at 0x7f60a1cb9ed8>, 'getSceneGraphChildren': <function getSceneGraphChildren at 0x7f60a1cb99b0>, '_abc_cache': <_weakrefset.WeakSet object at 0x7f60a1c56650>, 'addRule': <function addRule at 0x7f60a1c5b7d0>, 'endColumnConfiguration': <function endColumnConfiguration at 0x7f60a1c59848>, 'columnTitleClicked': <function columnTitleClicked at 0x7f60a1c59c80>, 'addTopLevelLocation': <function addTopLevelLocation at 0x7f60a1c591b8>, 'removeTopLevelLocation': <function removeTopLevelLocation at 0x7f60a1c59230>, 'getNumberOfColumns': <function getNumberOfColumns at 0x7f60a1c59de8>, 'clearTopLevelLocations': <function clearTopLevelLocations at 0x7f60a1c59410>, 'isFrozen': <function isFrozen at 0x7f60a1cb9de8>, 'moveColumn': <function moveColumn at 0x7f60a1c59c08>, 'getTopLevelDisplayIndex': <function getTopLevelDisplayIndex at 0x7f60a1c59500>, 'beginColumnConfiguration': <function beginColumnConfiguration at 0x7f60a1c59668>, 'getViewLink': <function getViewLink at 0x7f60a1c5b320>, 'locationNamesPolished': <function locationNamesPolished at 0x7f60a1c5f0c8>, 'getColumnDataType': <function getColumnDataType at 0x7f60a1c5b050>, 'setMaxEventsToProcess': <function setMaxEventsToProcess at 0x7f60a1c59050>, 'setRuleCriteria': <function setRuleCriteria at 0x7f60a1c5ba28>, 'getRootColumnSet': <function getRootColumnSet at 0x7f60a1c596e0>, 'getPotentialChildren': <function getPotentialChildren at 0x7f60a1c5b1b8>, 'isNameColumn': <function isNameColumn at 0x7f60a1c59cf8>, 'getAttributeDataItemTypes': <function getAttributeDataItemTypes at 0x7f60a1c5f1b8>, 'setLocationDataProcessedCallback': <function setLocationDataProcessedCallback at 0x7f60a1cb9848>, 'expandLocation': <function expandLocation at 0x7f60a1cb9c08>, 'getSceneGraphAttributes': <function getSceneGraphAttributes at 0x7f60a1cb9a28>, 'getResolvedAttributeName': <function getResolvedAttributeName at 0x7f60a1c5b230>, 'collapseLocation': <function collapseLocation at 0x7f60a1cb9c80>, 'setViewOp': <function setViewOp at 0x7f60a1cb9b90>, 'getDisplayData': <function getDisplayData at 0x7f60a1c5b2a8>, 'setTopLevelDisplayIndex': <function setTopLevelDisplayIndex at 0x7f60a1c59578>, 'resetAttributeDataItemTypes': <function resetAttributeDataItemTypes at 0x7f60a1c5f230>, 'interruptClientProcessing': <function interruptClientProcessing at 0x7f60a1cb9e60>, 'hideColumnSet': <function hideColumnSet at 0x7f60a1c59938>, 'clearRuleCriteria': <function clearRuleCriteria at 0x7f60a1c5be60>, 'setRuleInverted': <function setRuleInverted at 0x7f60a1c5bb18>, 'setKeyPressEventCallback': <function setKeyPressEventCallback at 0x7f60a1c5b398>})
__metaclass__

alias of ABCMeta

__module__ = 'UI4.Widgets.SceneGraphView.Bridge'
__weakref__

list of weak references to the object (if defined)

addAttributeDataItemType(itemTypeClass)

Adds a custom attribute data item type. This enables attribute data to be displayed as items in the widget as a child of a location. An example use-case for this is displaying of error messages or collection items in the Scene Graph tab.

Parameters:itemTypeClass (type) – A class derived from AttributeDataTreeWidgetItem that implements the appearance of a custom attribute data item type.
addColumn(columnName)

Add a stand-alone column to this view with the given column title and return a handle to the column so it can be configured.

By default, the column will display the current location name, as a text field but. You must set the display index to a particular value.

addColumnSet(columnSetName)

A column set is a grouping of column headers. It has an ordering index which determined where in the top-level its group members should be ordered.

Each column member itself has a local (within the group) ordering index.

addRule(ruleName)
addTopLevelLocation(topLevelLocationPath, index=None)

Adds a new top-level location to the SceneGraphView widget. By default the only top-level location will be /root. If index is supplied, inserts the new top-level location at the given index in the widget, otherwise appends to the widget.

Parameters:
  • topLevelLocationPath (str) – Full path to location to be added as a top- level location.
  • index (int or None) – The index in the list of top-level locations at which to add the new location, or {None} to append the location to the list.
applyColumnVisibilitySettings(columnVisibility)
Parameters:columnVisibility (dict) – A dictionary containing the visibility settings for all columns and column sets, indexed by name. Can be used to restore the visible columns and column sets when restoring a tab layout.
See:SceneGraphColumn
applyColumnWidthsSettings(columnWidths)
Parameters:columnWidths (dict) – A dictionary containing the widths of columns, indexed by name. Can be used to restore column widths when restoring a tab layout.
See:SceneGraphColumn
beginColumnConfiguration()

A function that together with :py:obj:`endColumnConfiguration` can be used to wrap several calls of :py:obj:`addColumnSet` and :py:obj:`addColumn` without triggering column configuration change callback functions, to allow for efficient updating of UI widgets.

A registered column configuration change callback function is triggered when calling :py:obj:`endColumnConfiguration`.

clearRuleCriteria(ruleName, triggerEvaluation=True)
clearTopLevelLocations()

Removes all top-level locations from the SceneGraphView widget, so that it will be empty.

collapseLocation(handle, topLevelHandle, recursive=False)

Collapses the scene graph location represented by the given handle underneath the top-level scene graph location represented by the given top-level handle, optionally recursively collapsing all its child locations.

Parameters:
  • handle (SceneGraphHandle) – A handle representing the scene graph location to collapse, optionally including its children.
  • topLevelHandle (SceneGraphHandle) – A handle representing the top-level scene graph location that contains the scene graph location(s) to collapse.
  • recursive (bool) – Flag to control whether to collapse all child locations of the scene graph location represented by the given handle. If set to True, the entire hierarchy underneath the scene graph location is collapsed, if False, only the scene graph location itself is collapsed (the default).
columnResized(columnIndex, newColumnWidth)

Called by the ViewLink when a column is resized by the user.

columnTitleClicked(columnIndex, columnTitleRect)

Called by the ViewLink when a column title is clicked by the user.

endColumnConfiguration()

A function that together with :py:obj:`beginColumnConfiguration` can be used to wrap several calls of :py:obj:`addColumnSet` and :py:obj:`addColumn` without triggering column configuration change callback functions, to allow for efficient updating of UI widgets.

Triggers a registered column configuration change callback function.

expandLocation(handle, topLevelHandle, recursive=False, stopTypes=None)

Expands the scene graph location represented by the given handle underneath the top-level scene graph location represented by the given top-level handle, optionally recursively expanding all its child locations.

Parameters:
  • handle (SceneGraphHandle) – A handle representing the scene graph location to expand, optionally including its children.
  • topLevelHandle (SceneGraphHandle) – A handle representing the top-level scene graph location that contains the scene graph location(s) to expand.
  • recursive (bool) – Flag to control whether to expand all child locations of the scene graph location represented by the given handle. If set to True, the entire hierarchy underneath the scene graph location is expanded, if False, only the scene graph location itself is expanded (the default).
  • stopTypes (tuple or list or set or str or None) – A tuple or list of names of types of scene graph locations or a single location type name at which the expansion should be stopped. Only used when recursive is True.
fontChanged()

Triggers an update of the columns when the font is changed.

freeze()

Freezes the clients managed by this SceneGraphView. Usually wired into show/hide UI event handlers, this will freeze updates to the clients managed by this SceneGraphView. Calling this function will ensure that potentially expensive work will be deferred until the corresponding thaw() call is made. Usually called by the hide() event handler.

getAttributeDataItemTypes()
Return type:list of type
Returns:A list of classes derived from AttributeDataTreeWidgetItem that are registered as custom attribute data item types.
getColumnByIndex(columnIndex, visibleOnly=True)
Return type:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn or None
Parameters:columnIndex (int) – The index of the column to return.
Returns:The SceneGraphColumn object with the given index, or None if no such column was found.
getColumnByName(columnName)
Return type:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn or None
Parameters:columnName (str) – The name of the column to return.
Returns:The first SceneGraphColumn object found with the given name, or None if no such column was found.
getColumnDataType(columnIndex)
Return type:int
Parameters:columnIndex (int) – The index of the column whose data type to return.
Returns:The type of data contained in the column with the given index.
getColumnPresetManager()
Return type:ColumnPresetManager
Returns:An instance of the internal ColoumnPresetManager.
getColumnVisibilitySettings()
Return type:dict
Returns:A dictionary containing the visibility settings for all columns and column sets, indexed by name. Can be used to retrieve and save the visible columns and column sets when saving a tab layout.
See:SceneGraphColumn
getColumnWidthsSettings()
Return type:dict
Returns:A dictionary containing the widths of all columns, indexed by name. Can be used to retrieve and save the column widths when saving a tab layout.
See:SceneGraphColumn
getCurrentRules()
getDisplayData(handle, topLevelHandle, columnIndex)
Return type:str or float or list
Returns:The data that is to be displayed in the column with the given index for the scene graph location represented by the given handles.
getNumberOfChildren(locationPath)
Return type:str or None
Parameters:locationPath (str) – The path to return the number of children of.
Returns:The number of children under the given location path. This is the number of children for which we have cached location data.
getNumberOfColumns()
Returns:The number of columns that should be displayed.
getNumberOfTopLevelLocations()
Return type:int
Returns:The number of top-level locations displayed in the SceneGraphView widget.
getOverrideNodeAndParameterName(locationPath, attributeName)
Return type:

tuple of NodegraphAPI.Node or None and str or None.

Parameters:
  • locationPath (str) – The path of a scene graph location for which to return an override parameter node.
  • attributeName (str) – The name of a scene graph attribute for which to return an override node and parameter name pair.
Returns:

A node and parameter name pair. Where the node contains a parameter which sets the value of the scene graph attribute with the given name on the scene graph location with the given path, or a tuple containing two instances of None if no such node and parameter pair is available.

getParent(locationPath)
Return type:str or None
Parameters:locationPath (str) – The path to return the parent for.
Returns:The parent path of the given location path, or None if the path is the root of the tree.
getPotentialChildren(locationPath)
Return type:list of str
Parameters:locationPath (str) – The path to return the potential children of.
Returns:A list of the potential children under the given location path. These are potential children according to the data returned from the runtime, and so not all these children may end up existing in the viewed scene, and we may not have data cached for all of them. Note therefore that the size of this array may not match the result from getNumberOfChildren.
getResolvedAttributeName(handle, attributeName)

Resolves names of meta attributes to names of actual attributes for a given renderer, for example material.meta.intensity to material.prmanLightParams.Intensity.

Return type:

tuple of (bool, str)

Parameters:
  • handle (SceneGraphHandle) – A handle representing the scene graph location that contains the attribute whose resolved name to return.
  • attributeName (str) – The potentially unresolved name of the attribute to resolve.
Returns:

A tuple containing a boolean value indicating whether the attribute name needed to be resolved and was resolved, and the resolved name of the attribute with the given unresolved name contained in the scene graph location represented by the given handle, if so.

getRootColumnSet()
Return type:SceneGraphColumnSet
Returns:A reference to the root SceneGraphColumnSet object for the widget.
getRuleByName(ruleName)
getRuleMatchInversion()
getSceneGraphAttributes(locationPath, callback=None, oneShot=False)

Obtain the scene graph attributes at the specified location.

See:UI4.Widgets.SceneGraphView.SceneGraphView
getSceneGraphChildren(parentLocationPath, callback=None, oneShot=False)

Obtain the children at the specified location.

See:UI4.Widgets.SceneGraphView.SceneGraphView
getTitleText(columnIndex)
Return type:str
Parameters:columnIndex (int) – The index of the column whose title text to return.
Returns:The title text that should be displayed for the column with the given index.
getTopLevelDisplayIndex(handle)

Get the display index for the given top-level location.

getTopLevelLocations()
Return type:list of str
Returns:A list of paths of scene graph locations displayed as top-level locations in the SceneGraphView widget.
Return type:ViewLink or None
Returns:The view link set for this bridge, or None if no view link has been set.
hideColumnSet(columnSetName)

Makes the column set with the given name invisible.

This function will have no effect if the specified name does not exist.

Parameters:columnSetName (str) – The name assigned to the column set that should be hidden.
See:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn
interruptClientProcessing()

Cancel client processing. Useful to halt a long running cook process.

isEditable(columnIndex)

Return True if the column at the given column index represents an editable piece of data.

isFrozen()
Return type:bool
Returns:True if the clients managed by this SceneGraphView are frozen, otherwise False.
isNameColumn(columnIndex)

Return True if the column at the given column index represents the scene graph location’s name.

isProcessing()
Return type:bool
Returns:True if events were processed during the last idle loop, and the clients managed by this SceneGraphView are not frozen, otherwise False.
isStopping()
Return type:bool
Returns:True if the widget has had processing interrupted, and is in the process of stopping - i.e. is still receiving incoming events from the client manager since the interruption was sent.
locationNamesPolished()
Return type:bool
Returns:A boolean value indicating whether scene graph location names are being “polished” in the widget.
matchRules(handle, topLevelHandle)
moveColumn(columnIndex, newColumnIndex)

Called by the ViewLink when a column is moved by the user.

removeRule(ruleName)
removeTopLevelLocation(topLevelLocationPath)

Removes the top-level location with the given path from the SceneGraphView widget.

Parameters:topLevelLocationPath (str) – The path of the top-level scene graph location to remove.
renameRule(oldName, newName)
resetAttributeDataItemTypes()

Clears all registered custom attribute data item types.

setKeyPressEventCallback(callback)

Specifies a function to handle key press events from the underlying Qt widget.

The callback is expected to have the following signature:

function(keyPressEvent)

  • keyPressEvent is an instance of QtGui.QKeyEvent, and specifies which key has been pressed.
Parameters:callback (callable) – A callable function to handle key press events.
setLocationActive(locationPath)

This will instruct Geolib3 to recompute the specified location whenever it receives updates for the OpTree.

Parameters:locationPath (str) – The scene graph location path that will be set as active in the Geolib3 client.
setLocationAddedOrUpdatedCallback(callback)

Sets the callback which is triggered when a location is added or updated.

setLocationDataProcessedCallback(callback)

Sets the callback which is triggered after any (and all) location updates have been processed.

setLocationNamePolishCallback(callback)

Sets the function to call to “polish” the name for a scene graph location.

The callback is expected to have the following signature:

function(locationPath, topLevelLocationPath) : polishedLocationPath

  • locationPath is a str containing the full path of the scene graph location whose name is to be polished, e.g. “/root/world/lgt/lightRig1/lightRig1_keyLight”
  • topLevelLocationPath is a str containing the full path of the top-level location under which this location is being polished, e.g. “/root/world/lgt”
  • polishedLocationPath is the polished name for the scene graph location, e.g. “keyLight”
Parameters:callback (callable) – A callable object that will be called to determine the polished name for a scene graph location.
setLocationNamesPolished(locationNamesPolished)

Sets whether name “polishing” should be applied to scene graph location names in the widget.

Parameters:namesPolished (bool) – A boolean value indicating whether we wish to run the specified name polishing callback on scene graph location names in the widget.
setLocationRemovedCallback(callback)

Sets the callback which is triggered when a location is removed.

setMaxEventsToProcess(maxEventsToProcess)

Set the maximum number of events that the client manager can process per cycle.

Parameters:maxEventsToProcess (int) – The maximum number of events that the client manager can process per cycle. A negative or zero value indicates no maximum.
setRuleComment(ruleName, comment)
setRuleCriteria(ruleName, criteriaName, criteria)
setRuleEnabled(ruleName, isEnabled)
setRuleEvaluator(ruleName, evaluator, useDefaultCriteria=False)
setRuleInverted(ruleName, isInverted)
setRuleMatchInversion(invert)
setRuleMatchPolicy(policy)
setRuleShowChildren(ruleName, showChildren)
setRuleTarget(ruleName, column)
setStopRecursiveExpandAttributeNames(attributeNames)

Sets a list of attribute names whose presence at a location should stop recursive expansion.

Parameters:attributeNames (list of str) – A list of attribute names whose presence at a location should stop recursive expansion.
setStopRecursiveExpandLocationTypes(locationTypes)

Sets a list of location types at which recursive expansion should stop.

Parameters:locationTypes (list of str) – A list of location types at which recursive expansion should stop.
setTerminalOps(terminalOpArgs)

Creates a chain of Ops, based on the given Op description in the form of a sequence of Op type and Op argument tuples, and sets the last one of them to be the Op to use in the clients managed by this client manager. The Op arguments can be omitted if there are no arguments for the Op. If Op arguments has been given, an optional ‘key’ can be provided which is used to identify the Op when updating its arguments.

When created, each Op will take its input from the previous Op in the sequence. These Ops will overwrite any previously created terminal Ops.

Parameters:terminalOpArgs (tuple of tuple of (str, FnAttribute.GroupAttribute, str) or (str, FnAttribute.GroupAttribute) or (str)) – A list of Op type name, Op args and terminal Op key triplets.
setTopLevelDisplayIndex(locationPath, index)

Set the display index for the given top-level location to change its order in the top-level list.

Parameters:
  • locationPath (str) – A string representing the scene graph location to set.
  • index (int) – The new display index for the specified item.
setTopLevelLocations(topLevelLocations)

Sets the list of paths of scene graph locations the SceneGraphView widget shows as top-level locations to the given list.

Parameters:topLevelLocations (list of str) – A list of paths of scene graph locations to show as top-level locations in the SceneGraphView widget.
setUpdateViewportAutomatically(updateViewportAutomatically)

Sets whether the viewport of the SceneGraphView widget should update automatically. By default, this is True.

Parameters:updateViewportAutomatically (bool) – True if the viewport of the widget should update automatically, or False for the viewport to only update when updateViewport is called.
Deprecated:This function will be removed.
setViewNode(viewNode, applyImplicitResolvers=False, extraImplicitResolverOpArgs=None)

Sets the Op used in the SceneGraphView widget’s Geolib3 client to the terminal Op for the given viewed node, and optionally appends Ops related to resolving of materials, constraints etc.

Parameters:
  • viewNode (NodegraphAPI.Node or None) – The node whose terminal Op to use for the Geolib3 client, or None to reset the Geolib3 client.
  • applyImplicitResolvers (bool) – Flag that controls whether Ops for implicit resolvers are to be appended to the given viewed node’s terminal Op in the Geolib3 client used by the SceneGraphView widget.
  • extraImplicitResolverOpArgs (dict or None) – dict mapping Op type names (str) to group attributes (GroupAttribute) describing additional arguments to pass to Ops with the given types.
setViewOp(viewOp, applyImplicitResolvers=False, extraImplicitResolverOpArgs=None)

Sets the Op used in the SceneGraphView widget’s Geolib3 client to the given Op, and optionally appends Ops related to resolving of materials, constraints etc.

Parameters:
  • op (FnGeolibOp or None) – The Op to use for the Geolib3 client, or None to reset the Geolib3 client.
  • applyImplicitResolvers (bool) – Flag that controls whether Ops for implicit resolvers are to be appended to the given viewed node’s terminal Op in the Geolib3 client used by the SceneGraphView widget.
  • extraImplicitResolverOpArgs (dict or None) – dict mapping Op type names (str) to group attributes (GroupAttribute) describing additional arguments to pass to Ops with the given types.
showColumnSet(columnSetName)

Makes the column set with the given name visible.

This function will have no effect if the specified name does not exist.

Parameters:columnSetName (str) – The name assigned to the column set that should be shown.
See:UI4.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn
thaw()

Thaws the clients managed by this SceneGraphView, thereby causing updates sent by Geolib3 to be processed and displayed in the UI.

topLevelLocationRenamed(oldLocationPath, newLocationPath)

Notify the SceneGraphView widget that a top-level location has been renamed. This is intended to be called in response to a UI event, e.g. a node being renamed in the Gaffer UI.

updateTerminalOps(terminalOpArgs, txn=None)

Updates the arguments of a chain of custom terminal Ops that were previously appended to the Op tree.

Parameters:
  • terminalOpArgs (tuple of tuple of (str, FnAttribute.GroupAttribute, str)) – A sequence of terminal Op type, Op arguments and terminal op key triplets.
  • txn (FnGeolib.GeolibRuntime.Transaction or None) – The transaction that will be used to set the Op arguments. If no transaction is provided, we create one.

Updates the view link that has been set for this bridge.

ColumnDataType

Module containing the RegisterDataType function and the ColumnDataType class.

class UI4.Widgets.SceneGraphView.ColumnDataType.ColumnDataType

Bases: object

Simple class encapsulating a number of data types to drive the editing of data in a given column.

Color

alias of ColorItemDelegate

Dummy

alias of DummyItemDelegate

alias of LightLinkItemDelegate

Mute

alias of MuteItemDelegate

Name

alias of NameItemDelegate

Number

alias of NumberItemDelegate

Shader

alias of ShaderItemDelegate

Solo

alias of SoloItemDelegate

String

alias of ParameterItemDelegate

WorkingSet

alias of WorkingSetItemDelegate

__dict__ = dict_proxy({'Dummy': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.BaseItemDelegate.DummyItemDelegate'>, '__module__': 'UI4.Widgets.SceneGraphView.ColumnDataType', 'String': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.ParameterItemDelegate.ParameterItemDelegate'>, 'WorkingSet': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.WorkingSetItemDelegate.WorkingSetItemDelegate'>, 'Color': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.ColorItemDelegate.ColorItemDelegate'>, 'Mute': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.MuteAndSoloItemDelegates.MuteItemDelegate'>, 'Number': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.NumberItemDelegate.NumberItemDelegate'>, 'Shader': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.ShaderItemDelegate.ShaderItemDelegate'>, 'LightLink': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.LightLinkItemDelegate.LightLinkItemDelegate'>, '__dict__': <attribute '__dict__' of 'ColumnDataType' objects>, 'Solo': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.MuteAndSoloItemDelegates.SoloItemDelegate'>, '__weakref__': <attribute '__weakref__' of 'ColumnDataType' objects>, '__doc__': '\n Simple class encapsulating a number of data types to drive the editing of\n data in a given column.\n ', 'Name': <class 'UI4.Widgets.SceneGraphView.ItemDelegates.NameItemDelegate.NameItemDelegate'>})
__module__ = 'UI4.Widgets.SceneGraphView.ColumnDataType'
__weakref__

list of weak references to the object (if defined)

UI4.Widgets.SceneGraphView.ColumnDataType.RegisterDataType(dataTypeName, itemDelegateClass)

Registers a data type that can be assigned to a column.

Parameters:
  • dataTypeName (str) – A descriptive name by which to refer to the data type.
  • itemDelegateClass (QStyledItemDelegated-derived class) – The item delegate class to use for controlling the appearance and editing behavior of data of the given data type name.

ColumnManager

Module containing the ColumnManager class.

class UI4.Widgets.SceneGraphView.ColumnManager.ColumnManager(columnChangedCallback, columnPresetManager=None)

Bases: object

Class that handles all logic and requests for column configuration for the SceneGraphView widget.

Should be read in conjunction with SceneGraphViewColumn.py.

__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.ColumnManager', 'setColumnChangedCallback': <function setColumnChangedCallback at 0x7f60a1c67488>, 'getColumnWidthsSettings': <function getColumnWidthsSettings at 0x7f60a1c67d70>, 'isEditable': <function isEditable at 0x7f60a1c67aa0>, 'setColumnSetVisible': <function setColumnSetVisible at 0x7f60a1c67c08>, 'addColumnSet': <function addColumnSet at 0x7f60a1c67398>, 'showColumnSet': <function showColumnSet at 0x7f60a1c67b18>, 'getColumnVisibilitySettings': <function getColumnVisibilitySettings at 0x7f60a1c67c80>, 'getColumnAttributeName': <function getColumnAttributeName at 0x7f60a1c678c0>, '__dict__': <attribute '__dict__' of 'ColumnManager' objects>, 'getColumnCount': <function getColumnCount at 0x7f60a1c675f0>, 'getColumnTitles': <function getColumnTitles at 0x7f60a1c677d0>, 'getColumnWidths': <function getColumnWidths at 0x7f60a1c67848>, 'getRootColumnSet': <function getRootColumnSet at 0x7f60a1c67578>, 'hideColumnSet': <function hideColumnSet at 0x7f60a1c67b90>, '__init__': <function __init__ at 0x7f60a1c67320>, 'getDataType': <function getDataType at 0x7f60a1c679b0>, 'getColumnByName': <function getColumnByName at 0x7f60a1c676e0>, '__weakref__': <attribute '__weakref__' of 'ColumnManager' objects>, 'getColumnTitleText': <function getColumnTitleText at 0x7f60a1c67758>, 'applyColumnVisibilitySettings': <function applyColumnVisibilitySettings at 0x7f60a1c67cf8>, 'isLocationNameColumn': <function isLocationNameColumn at 0x7f60a1c67a28>, 'moveColumn': <function moveColumn at 0x7f60a1c67500>, 'applyColumnWidthsSettings': <function applyColumnWidthsSettings at 0x7f60a1c67de8>, 'getColumnAttributeNames': <function getColumnAttributeNames at 0x7f60a1c67938>, 'addColumn': <function addColumn at 0x7f60a1c67410>, '__doc__': '\n Class that handles all logic and requests for column configuration for the\n SceneGraphView widget.\n\n Should be read in conjunction with C{SceneGraphViewColumn.py}.\n ', 'getColumnByIndex': <function getColumnByIndex at 0x7f60a1c67668>})
__init__(columnChangedCallback, columnPresetManager=None)

Initializes an instance of the class.

Parameters:
  • columnChangedCallback (callable or None) – A callback to be triggered when the configuration of columns has been changed.
  • columnPresetManager (ColumnPresetManager or None) – A ColumnPresetManager to manage keyboard shortcuts and presets for column sets managed by this class.
Raises:

ValueError – If the given callback object is not callable.

__module__ = 'UI4.Widgets.SceneGraphView.ColumnManager'
__weakref__

list of weak references to the object (if defined)

addColumn(columnName)
addColumnSet(columnSetName)
applyColumnVisibilitySettings(columnVisibility)
applyColumnWidthsSettings(columnWidths)
getColumnAttributeName(columnIndex, visibleOnly=True)

The SceneGraphTree module requires this special “__location_name__” attribute name to be returned in order to display the location name rather than an attribute name in location name columns.

Return type:

str

Parameters:
  • columnIndex (int) – The index of the column whose attribute name to return.
  • visibleOnly (bool) – Flag to control whether to skip invisible columns.
Returns:

The name of the attribute whose data is to be displayed in the column with the given index.

getColumnAttributeNames(columnIndex, visibleOnly=True)

The SceneGraphTree module requires this special “__location_name__” attribute name to be returned in order to display the location name rather than an attribute name in location name columns.

Return type:

list of str

Parameters:
  • columnIndex (int) – The index of the column whose attribute name to return.
  • visibleOnly (bool) – Flag to control whether to skip invisible columns.
Returns:

A list of names of attributes whose data are to be displayed in the column with the given index.

getColumnByIndex(columnIndex, visibleOnly=True)
getColumnByName(columnName)
getColumnCount(visibleOnly=True)
getColumnTitleText(columnIndex, visibleOnly=True)
getColumnTitles(visibleOnly=True)
getColumnVisibilitySettings()
getColumnWidths(visibleOnly=True)
getColumnWidthsSettings()
getDataType(columnIndex)
Return type:int
Parameters:columnIndex (int) – The index of the column whose data type to return.
Returns:The type of data contained in the column with the given index.
getRootColumnSet()
hideColumnSet(columnSetName)
isEditable(columnIndex, visibleOnly=True)
isLocationNameColumn(columnIndex, visibleOnly=True)
moveColumn(columnIndex, newColumnIndex, visibleOnly=True)
setColumnChangedCallback(callback)
setColumnSetVisible(columnSetName, visible)
showColumnSet(columnSetName)

ColumnPresetManager

Module containing the ColumnPreset and ColumnPresetManager classes.

class UI4.Widgets.SceneGraphView.ColumnPresetManager.ColumnPreset

Bases: object

Class representing a column configuration preset.

__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.ColumnPresetManager', 'activate': <function activate at 0x7f60a1c77320>, 'removeShown': <function removeShown at 0x7f60a1c771b8>, 'addHidden': <function addHidden at 0x7f60a1c77050>, 'addToggled': <function addToggled at 0x7f60a1c77230>, '__doc__': '\n Class representing a column configuration preset.\n ', 'addShown': <function addShown at 0x7f60a1c77140>, '__dict__': <attribute '__dict__' of 'ColumnPreset' objects>, 'removeHidden': <function removeHidden at 0x7f60a1c770c8>, '__weakref__': <attribute '__weakref__' of 'ColumnPreset' objects>, 'removeToggled': <function removeToggled at 0x7f60a1c772a8>, '__init__': <function __init__ at 0x7f60a1c67f50>})
__init__()

Initializes an instance of the class.

__module__ = 'UI4.Widgets.SceneGraphView.ColumnPresetManager'
__weakref__

list of weak references to the object (if defined)

activate()

Activates the preset by hiding/showing/toggling the registered columns or column sets.

addHidden(columnOrSet)

Adds a column or set which should be hidden when this preset is activated.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set which should be hidden in this preset.
addShown(columnOrSet)

Adds a column or set which should be shown when this preset is activated.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set which should be shown in this preset.
addToggled(columnOrSet)

Adds a column or set whose visibility state should be toggled when this preset is actived.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set whose visibility state should be toggled when this preset is activated.
removeHidden(columnOrSet)

Removes a column or set from the list of items to hide when this preset is activated.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set to remove from the list of items to hide when this preset is activated.
removeShown(columnOrSet)

Removes a column or set from the list of items to show when this preset is activated.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set to remove from the list of items to show when this preset is activated.
removeToggled(columnOrSet)

Removes a column or set from the list of items whose visibility state should be toggled when this preset is actived.

Parameters:columnOrSet (BaseSceneGraphColumn) – A column or set to remove from the list of items whose visibility state should be toggled when this preset is activated.
class UI4.Widgets.SceneGraphView.ColumnPresetManager.ColumnPresetManager

Bases: object

Class implenting a manager for ColumnPresets. Handles key press events and activates any presets associated with the keys pressed.

class ShortcutMode

Bases: object

Constants used for uniquely identifying different shortcut modes which can be provided to ColumnPresetManager.setShortcutMode. These define the behaviour of shortcuts that are added through addColumnSetShortcut, but not addPreset.

Toggle = 1
Unique = 0
__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.ColumnPresetManager', 'getValidShortcutModes': <classmethod object at 0x7f60a1c711a0>, 'Toggle': 1, '__dict__': <attribute '__dict__' of 'ShortcutMode' objects>, 'Unique': 0, '__weakref__': <attribute '__weakref__' of 'ShortcutMode' objects>, '__doc__': '\n Constants used for uniquely identifying different shortcut modes which\n can be provided to L{ColumnPresetManager.setShortcutMode()}. These define\n the behaviour of shortcuts that are added through\n L{addColumnSetShortcut()}, but not L{addPreset()}.\n '})
__module__ = 'UI4.Widgets.SceneGraphView.ColumnPresetManager'
__weakref__

list of weak references to the object (if defined)

classmethod getValidShortcutModes()
Return type:list of int
Returns:A list of valid shortcut mode values.
ColumnPresetManager.__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.ColumnPresetManager', 'removeColumnSetShortcut': <function removeColumnSetShortcut at 0x7f60a1c776e0>, 'addPreset': <function addPreset at 0x7f60a1c77578>, '__weakref__': <attribute '__weakref__' of 'ColumnPresetManager' objects>, 'processKeyPressEvent': <function processKeyPressEvent at 0x7f60a1c77488>, 'removePreset': <function removePreset at 0x7f60a1c775f0>, 'removeColumnSetShortcuts': <function removeColumnSetShortcuts at 0x7f60a1c77758>, '__dict__': <attribute '__dict__' of 'ColumnPresetManager' objects>, 'addColumnSetShortcut': <function addColumnSetShortcut at 0x7f60a1c77668>, 'setShortcutMode': <function setShortcutMode at 0x7f60a1c77500>, '__doc__': '\n Class implenting a manager for ColumnPresets. Handles key press events and\n activates any presets associated with the keys pressed.\n ', '__init__': <function __init__ at 0x7f60a1c77398>, 'ShortcutMode': <class 'UI4.Widgets.SceneGraphView.ColumnPresetManager.ShortcutMode'>})
ColumnPresetManager.__init__()

Initializes an instance of the class.

Presets are stored in a dictionary, indexed by the key press value. Each entry in the __presets dictionary is a list of ColumnPreset objects which should be activated for the corresponding key press. Each entry in the __shortcutsForColumnSets dictionary is a list of SceneGraphColumnSet objects which should be shown/hidden for the corresponding key press.

ColumnPresetManager.__module__ = 'UI4.Widgets.SceneGraphView.ColumnPresetManager'
ColumnPresetManager.__weakref__

list of weak references to the object (if defined)

ColumnPresetManager.addColumnSetShortcut(columnSet, shortcut)

Adds a new column set to the manager, associated with the given shortcut.

Parameters:
  • shortcut (string or None or int or QKeySequence) – A value that can be accepted by the QKeySequence constructor, for use as a keyboard shortcut that will activate the column set.
  • columnSet (SceneGraphColumnSet) – The column set to associate with the shortcut.
ColumnPresetManager.addPreset(shortcut)

Adds a new preset to the manager, and returns it.

Return type:ColumnPreset
Parameters:shortcut (string or None or int or QKeySequence) – A value that can be accepted by the QKeySequence constructor, for use as a keyboard shortcut that will activate this preset.
Returns:The new preset.
ColumnPresetManager.processKeyPressEvent(event)

Handles a keyPressEvent from a layout containing SceneGraphColumn objects. Checks the list of registered presets and activates any whose shortcut key matches the key pressed.

Return type:bool
Parameters:event (QtGui.QKeyEvent) – The keyPressEvent which we wish to handle.
Returns:True if the given event has been handled, otherwise False.
ColumnPresetManager.removeColumnSetShortcut(columnSet, shortcut)

Removes a shortcut for the given column set from the manager.

Parameters:
  • columnSet (SceneGraphColumnSet) – The column set to remove from the manager.
  • shortcut (string or None or int or QKeySequence) – A value that can be accepted by the QKeySequence constructor, representing the shortcut to remove.
ColumnPresetManager.removeColumnSetShortcuts(columnSet)

Removes all shortcuts for the given column set from the manager.

Parameters:columnSet (SceneGraphColumnSet) – The column set to remove the shortcuts for.
ColumnPresetManager.removePreset(preset)

Removes a given preset from the manager.

Parameters:preset (ColumnPreset) – The preset to remove from the manager.
ColumnPresetManager.setShortcutMode(shortcutMode)

Sets the shortcut mode used when handling keyboard shortcuts that are added through addColumnSetShortcut. The valid modes are defined by constants in ColumnPresetManager.ShortcutMode.

Parameters:shortcutMode (int) – The mode to use - must be one of the constants defined by ColumnPresetManager.ShortcutMode

ContextMenuEvent

Module providing the ContextMenuEvent class which encapsulates information related to context menu customization.

class UI4.Widgets.SceneGraphView.ContextMenuEvent.ContextMenuEvent(event, locationPath=None, topLevelLocationPath=None, selectedLocations=None, sceneGraphColumn=None)

Bases: PyQt5.QtGui.QContextMenuEvent

Class that provides information related to the selection state and context at the point in time when a user requests a right-click menu be displayed.

If you make use of the setContextMenuEventCallback() function, your callback will be passed an instance of this class which will be pre-populated with a range of information pertaining to the context in which the right-click menu was requested.

__init__(event, locationPath=None, topLevelLocationPath=None, selectedLocations=None, sceneGraphColumn=None)
__module__ = 'UI4.Widgets.SceneGraphView.ContextMenuEvent'
getLocationPath()

Returns the path of the scene graph location under the mouse pointer when this ContextMenuEvent was triggered.

If ContextMenuEvent did not occur over a scene graph location this will return None.

Return type:str or None
Returns:Path of the scene graph location under the mouse pointer.
getSceneGraphColumn()

Returns the column object which refers to the column in which this ContextMenuEvent occurred.

Return type:SceneGraphColumn
Returns:The column object.
getSelectedLocations()

Returns a list of scene graph locations that were selected by the user when this ContextMenuEvent was triggered.

For each selected scene graph location the list contains a 2-tuple of the following form:

(top-level location path, location path)

  • top-level location path refers to the top-level scene graph location that the selected scene graph location belongs to.
  • location path refers to the selected scene graph location.
Return type:list of tuple
Returns:List of currently selected scene graph locations and the top-level scene graph locations to which they belong.
getTopLevelLocationPath()

Returns the path of the top-level scene graph location to which the scene graph location returned by getLocationPath belongs.

If getLocationPath returns None this function also returns None.

Return type:str or None
Returns:Top-level item’s scene graph location path or None if this event did not occur over a scene graph location.

HorizontalHeaderView

Module containing the HorizontalHeaderView class.

class UI4.Widgets.SceneGraphView.HorizontalHeaderView.HorizontalHeaderView(parent=None)

Bases: PyQt5.QtWidgets.QHeaderView

Class implementing a custom header view for the SceneGraphView widget’s tree widget. Controls resizing behaviour of columns with support for a fixed width, minimum width and maximum width set on item delegates used for the columns in the tree widget.

ClickStyleRole = 258
HeaderTitleIconRole = 260
IsToggledOnFunctionRole = 259
SectionClickableRole = 257
__init__(parent=None)

Initializes an instance of the class.

Parameters:parent (QtWidgets.QWidget) – The parent widget to use for the header view instance, should be an instance of TreeWidget.
__module__ = 'UI4.Widgets.SceneGraphView.HorizontalHeaderView'
contextMenuEvent(contextMenuEvent)

Event handler for context menu events.

Parameters:contextMenuEvent (QtGui.QContextMenuEvent) – An object containing details about the context menu event to process.
enterEvent(event)

Event handler for widget enter events.

Reimplemented in order to paint sections that are clickable in a hovered appearance.

Parameters:event (QtCore.QEvent) – An object containing details about the enter event to process.
leaveEvent(event)

Event handler for widget leave events.

Reimplemented in order to paint sections that are clickable and that had been painted in a hovered appearance in a normal appearance again.

Parameters:event (QtCore.QEvent) – An object containing details about the leave event to process.
mouseDoubleClickEvent(mouseEvent)

Event handler for mouse double-click events.

Reimplemented in order to call a specialized function of the tree widget parent to resize a column to its contents if its section handle has been double-clicked, bypassing the default behavior.

Parameters:mouseEvent (QtGui.QMouseEvent) – An object containing details about the mouse event to process.
mouseMoveEvent(mouseEvent)

Event handler for mouse move events.

Reimplemented in order to change the cursor shape when the pointer is over a section handle of a column that cannot be resized.

Parameters:mouseEvent (QtGui.QMouseEvent) – An object containing details about the mouse event to process.
mousePressEvent(mouseEvent)

Event handler for mouse press events.

Reimplemented in order to support clickable sections without making the entire header view clickable. Whether or not sections are clickable is determined by user data stored in the header view’s model. The function emits the "sectionPressed" signal if a clickable section has been clicked with the left button.

Parameters:mouseEvent (QtGui.QMouseEvent) – An object containing details about the mouse press event to process.
mouseReleaseEvent(mouseEvent)

Event handler for mouse release events.

Reimplemented in order to cause a re-draw of the title that was previously clicked.

Parameters:mouseEvent (QtGui.QMouseEvent) – An object containing details about the mouse release event to process.
paintSection(painter, rect, logicalIndex)

Paints the section specified by the given logical index, using the given painter and rectangle.

Parameters:
  • painter (QtGui.QPainter) – The painter to use for drawing the section.
  • rect (QtCore.QRect) – The rectangular area of the section to draw.
  • logicalIndex (int) – The index of the section to draw.
resizeSection(logicalIndex, size)

Resizes the section specified by logicalIndex to size measured in pixels.

Reimplemented to respect item delegate column width constraints.

Parameters:
  • logicalIndex (int) – Logical index of column to be resized
  • size (int) – New size

SceneGraphLocationTranslation

Module providing utility functions for working with paths of scene graph locations.

UI4.Widgets.SceneGraphView.SceneGraphLocationTranslation.GetParentPath(locationPath, topLevelLocationPath='/root')

Return the parent scene graph location of path. If path represents the root of the scene then None will be returned.

UI4.Widgets.SceneGraphView.SceneGraphLocationTranslation.GetLocationName(locationPath)

Extract the location name from the location path.

E.g.

/root -> root /root/world/geo -> geo

UI4.Widgets.SceneGraphView.SceneGraphLocationTranslation.IsLocationUnderTopLevelLocation(locationPath, topLevelLocationPath)

Return True if locationPath exists under topLevelLocationPath otherwise return False.

e.g. /root -> /root/world/geo == True /root/world/light -> /root/world == False /root/world/ -> /root/world_1/geo == False /root/world/geo -> /root/world/geo_scalar/geo == False /root/world/geo -> /root/world/geo/arm/hand == True

UI4.Widgets.SceneGraphView.SceneGraphLocationTranslation.ExplodePath(locationPath)

Explodes the scene graph location path into a list of all its child locations including itself.

e.g. /root/world/cam = [‘/root’, ‘/root/world’, ‘/root/world/cam’]

SceneGraphTree

Module providing the SceneGraphTree class.

class UI4.Widgets.SceneGraphView.SceneGraphTree.SceneGraphTree

Bases: object

Encapsulates a raw ‘locations and attributes’ view of the scene graph that is currently being displayed by the SceneGraphView.

It is made up of TreeItems which represent a single location in the scene graph. There is a single root location in the scene graph which has the location path /root. A TreeItem also contains attribute data which can be interrogated.

A TreeItem has one or more children of type TreeItem. They can be efficiently accessed in O(1) time by name or index. The index ordering is strict and defined by the scene graph processing commands that created it, this can be determined by the potential children list.

Provides an interface to the Bridge which provides efficient access to TreeItems.

__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.SceneGraphTree', '__weakref__': <attribute '__weakref__' of 'SceneGraphTree' objects>, 'clear': <function clear at 0x7f60a1c7f5f0>, 'hasLocation': <function hasLocation at 0x7f60a1c7f578>, '__dict__': <attribute '__dict__' of 'SceneGraphTree' objects>, 'addOrUpdateSceneGraphLocation': <function addOrUpdateSceneGraphLocation at 0x7f60a1c7f410>, 'getTreeItem': <function getTreeItem at 0x7f60a1c7f500>, 'deleteSceneGraphLocation': <function deleteSceneGraphLocation at 0x7f60a1c7f488>, '__doc__': "\n Encapsulates a raw 'locations and attributes' view of the scene graph that\n is currently being displayed by the C{SceneGraphView}.\n\n It is made up of L{TreeItem}s which represent a single location in the\n scene graph. There is a single root location in the scene graph which has\n the location path C{/root}. A L{TreeItem} also contains attribute data\n which can be interrogated.\n\n A L{TreeItem} has one or more children of type L{TreeItem}. They can be\n efficiently accessed in O(1) time by name or index. The index ordering is\n strict and defined by the scene graph processing commands that created it,\n this can be determined by the potential children list.\n\n Provides an interface to the C{Bridge} which provides efficient access to\n L{TreeItem}s.\n ", '__init__': <function __init__ at 0x7f60a1c7f398>})
__init__()

Initializes an instance of the class.

__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphTree'
__weakref__

list of weak references to the object (if defined)

addOrUpdateSceneGraphLocation(locationPath, locationData)

Creates a new scene graph tree item to represent the scene graph location with the given path, and stores the given location data on it.

If the location already exists, this function updates the location data on the existing tree item.

Return type:

TreeItem

Parameters:
  • locationPath (str) – The path of the scene graph location for which to create or update a scene graph tree item.
  • locationData (PyFnGeolib.LocationData) – An object that contains the data to store for the scene graph location represented by the tree item to create or update.
Returns:

The created or updated scene graph tree item.

clear()

Deletes all tree items in this SceneGraphTree instance.

deleteSceneGraphLocation(locationPath)

Delete the TreeItem specified by locationPath.

If locationPath refers to a TreeItem which does not exist, or has child tree items, this function will throw an error.

getTreeItem(locationPath)
Return type:TreeItem
Parameters:locationPath (str) – The path of the scene graph location for which to return the corresponding scene graph tree item.
Returns:The tree item that represents the scene graph location with the given path.
Raises:SceneGraphTreeException – If no tree item exists that corresponds to the given scene graph location path.
hasLocation(locationPath)
Return type:bool
Parameters:locationPath (str) – The path of the scene graph location for which to check whether a corresponding scene graph tree item exists.
Returns:True if there is a tree item that corresponds to the given location path, otherwise False.
exception UI4.Widgets.SceneGraphView.SceneGraphTree.SceneGraphTreeException

Bases: exceptions.Exception

Exception thrown when attempting invalid tree operations.

__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphTree'
__weakref__

list of weak references to the object (if defined)

class UI4.Widgets.SceneGraphView.SceneGraphTree.TreeItem(locationPath, locationData, parentTreeItem)

Bases: object

Is used by the SceneGraphTree to store scene graph locations and their attributes.

Provides a number of functions by which its children and location within the SceneGraphTree topology can be interrogated.

__dict__ = dict_proxy({'addChild': <function addChild at 0x7f60a1c7f1b8>, '__module__': 'UI4.Widgets.SceneGraphView.SceneGraphTree', 'getPotentialChildren': <function getPotentialChildren at 0x7f60a1c77938>, 'getNumberOfChildren': <function getNumberOfChildren at 0x7f60a1c77f50>, 'getAttributeData': <function getAttributeData at 0x7f60a1c7f050>, 'getChildBySceneGraphIndex': <function getChildBySceneGraphIndex at 0x7f60a1c77cf8>, 'getSceneGraphIndexOfChildTreeItem': <function getSceneGraphIndexOfChildTreeItem at 0x7f60a1c77e60>, 'getLocationType': <function getLocationType at 0x7f60a1c77c08>, 'getLocationName': <function getLocationName at 0x7f60a1c77b18>, '_TreeItem__populateLookupMaps': <function __populateLookupMaps at 0x7f60a1c7f2a8>, '__dict__': <attribute '__dict__' of 'TreeItem' objects>, 'deleteChild': <function deleteChild at 0x7f60a1c7f230>, '__weakref__': <attribute '__weakref__' of 'TreeItem' objects>, '__init__': <function __init__ at 0x7f60a1c778c0>, 'getChildItems': <function getChildItems at 0x7f60a1c77a28>, 'getLocationPath': <function getLocationPath at 0x7f60a1c77b90>, 'getParent': <function getParent at 0x7f60a1c77aa0>, 'getChildByName': <function getChildByName at 0x7f60a1c77c80>, 'getSceneGraphIndexOfLocationName': <function getSceneGraphIndexOfLocationName at 0x7f60a1c77d70>, 'updateLocationData': <function updateLocationData at 0x7f60a1c77ed8>, 'getLocationData': <function getLocationData at 0x7f60a1c7f140>, 'getAttributes': <function getAttributes at 0x7f60a1c7f0c8>, '__repr__': <function __repr__ at 0x7f60a1c7f320>, 'getSceneGraphIndexInParent': <function getSceneGraphIndexInParent at 0x7f60a1c77de8>, '__doc__': '\n Is used by the C{SceneGraphTree} to store scene graph locations and their\n attributes.\n\n Provides a number of functions by which its children and location within\n the C{SceneGraphTree} topology can be interrogated.\n ', 'getChildNames': <function getChildNames at 0x7f60a1c779b0>})
__init__(locationPath, locationData, parentTreeItem)

Initializes an instance of the class.

Parameters:
  • locationPath (str) – The path of the scene graph location to represent by this tree item instance.
  • locationData (PyFnGeolib.LocationData) – Data to store in the tree item instance.
  • parentTreeItem (TreeItem or None) – The tree item to use as the parent of this tree item instance, or None if this tree item instance is to be considered the root of a scene graph tree.
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphTree'
__repr__()
__weakref__

list of weak references to the object (if defined)

addChild(childTreeItem)

Add the specified child TreeItem to children of this TreeItem.

deleteChild(childTreeItem)

Delete the specified child TreeItem from the location’s list of children

getAttributeData(attributeName, returnResolvedData=True)
Return type:

str or float or int or list or None

Parameters:
  • attributeName (str) – The name of the attribute whose data to return.
  • returnResolvedData (bool) – Flag to control whether to return the data of the resolved attribute if the name of a meta attribute is given. For example, attributeName could be material.meta.intensity, which could contain the name of an actual attribute, such as material.prmanLightParams.Intensity. If returnResolvedData is True, the data of the actual attribute is returned. If it is False, the name of the actual attribute is returned.
Returns:

The data of the attribute with the given name, or None if no data for the attribute with the given name is available.

getAttributes()
Return type:PyFnAttribute.Attribute
Returns:The scene graph attributes stored at the location represented by this tree item instance.
getChildByName(locationName)
Return type:TreeItem
Parameters:locationName (str) – The name of the scene graph location whose corresponding tree item to return.
Returns:The child tree item with the given location name.
Note:The cost of this operation is O(1)
Raises:SceneGraphTreeException – If the given location name does not correspond to a child tree item of this tree item instance.
getChildBySceneGraphIndex(sceneGraphIndex)

Return the TreeItem at the specified scene graph index.

If the location name is not a child of this TreeItem then a SceneGraphTreeException will be thrown.

The cost of this operation is O(1)

getChildItems()
Return type:list of TreeItem
Returns:A list of all child tree items of this tree item.
getChildNames()
Return type:list of str
Returns:A list of names of child tree items of this tree item.
getLocationData()
Return type:PyFnGeolib.LocationData
Returns:An object that contains the data stored for the scene graph location represented by this tree item instance. Can be used to test the data’s hash against new updates.
getLocationName()
Return type:str
Returns:The leaf-level location of this tree item, for example geo for /root/world/geo, and root for /root.
getLocationPath()
Return type:str
Returns:The path of the scene graph location represented by this tree item instance.
getLocationType()
Return type:str or None
Returns:The name of the type attribute of the scene graph location represented by this tree item instance, or None if the location type is not available.
getNumberOfChildren()
Return type:int
Returns:The number of child locations under the scene graph location represented by this tree item instance.
getParent()
Return type:TreeItem or None
Returns:The parent tree item of this tree item instance, or None if this tree item instance represents the root of the scene graph tree.
getPotentialChildren()
Return type:list
Returns:A list of potential children of this tree item instance. The ordering of the returned list defines the order in which they should appear.
getSceneGraphIndexInParent()

Return the scene graph index of this TreeItem in its parent.

If this is the root of the SceneGraph then the scene graph index is 0

The cost of this operation is O(1)

getSceneGraphIndexOfChildTreeItem(childTreeItem)

Return the scene graph index of the child TreeItem.

If childTreeItem is not a child of this TreeItem then a SceneGraphTreeException will be thrown.

The cost of this operation is O(1)

getSceneGraphIndexOfLocationName(locationName)

Returns the scene graph index of the specified location name.

If the location name is not a child of this TreeItem then a SceneGraphTreeException will be thrown.

The cost of this operation is O(1)

updateLocationData(locationData)

Updates the location data for this TreeItem and also regenerates any internal data structures.

Parameters:locationData (PyFnGeolib.LocationData) – An object that contains the data to store for the scene graph location represented by this tree item instance.

SceneGraphViewClientManager

Module containing the SceneGraphViewClientManager class.

class UI4.Widgets.SceneGraphView.SceneGraphViewClientManager.SceneGraphViewClientManager

Bases: UI4.Util.ClientManager.ClientManager

Class responsible for managing Geolib3 clients for the SceneGraphView widget.

One client is created per top-level location in the widget.

__init__()
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewClientManager'
topLevelLocationAdded(topLevelLocation)

Informs ClientManager that there is a new top-level location.

Parameters:topLevelLocation (str) – The top-level location being added.
topLevelLocationRemoved(topLevelLocation)

Informs ClientManager that a top-level location has been removed

Parameters:topLevelLocation (str) – The top-level location being removed.

SceneGraphViewColumn

Module providing the SceneGraphColumn, SceneGraphColumnSet and SceneGraphColumnTitle classes.

UI4.Widgets.SceneGraphView.SceneGraphViewColumn.GetNonInformationalAttributeName(attributeNames)
Return type:str or None
Parameters:attributeNames (list of str) – A list of names of attributes to filter.
Returns:The name of the first attribute that doesn’t store data for informational purposes only, or the name of the first attribute if all attribute names indicate informational purposes, or None if the given list of attribute names is empty.
class UI4.Widgets.SceneGraphView.SceneGraphViewColumn.BaseSceneGraphColumn(name='Untitled', columnChangedCallback=None, parentSet=None)

Bases: object

A base class for columns and column sets.

A column or column set may live inside a parent column set, or may stand alone.

__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn', 'setColumnChangedCallback': <function setColumnChangedCallback at 0x7f60a1f42500>, 'setName': <function setName at 0x7f60a1f42050>, 'setParentSet': <function setParentSet at 0x7f60a1f42230>, 'setIndex': <function setIndex at 0x7f60a1f42320>, 'getParentSets': <function getParentSets at 0x7f60a1f42140>, '__dict__': <attribute '__dict__' of 'BaseSceneGraphColumn' objects>, 'callColumnChangedCallback': <function callColumnChangedCallback at 0x7f60a1f42578>, 'getParentSetNames': <function getParentSetNames at 0x7f60a1f421b8>, 'getColumnChangedCallback': <function getColumnChangedCallback at 0x7f60a1f42488>, 'getParentSet': <function getParentSet at 0x7f60a1f420c8>, '__weakref__': <attribute '__weakref__' of 'BaseSceneGraphColumn' objects>, '__init__': <function __init__ at 0x7f60a1f1ced8>, 'getIndex': <function getIndex at 0x7f60a1f422a8>, 'getName': <function getName at 0x7f60a1f1cf50>, 'isVisible': <function isVisible at 0x7f60a1f42398>, 'setVisible': <function setVisible at 0x7f60a1f42410>, '__doc__': '\n A base class for columns and column sets.\n\n A column or column set may live inside a parent column set, or may stand\n alone.\n '})
__init__(name='Untitled', columnChangedCallback=None, parentSet=None)

Initializes an instance of the class.

Parameters:
  • name (str) – The name to use for the column object.
  • columnChangedCallback (callable or None) – A callback to be triggered when the configuration of columns has been changed. This includes changes to visibility state.
  • parentSet (SceneGraphColumnSet or None) – The set to which this new instance should be added, or None if the column object is a stand-alone column or column set.
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn'
__weakref__

list of weak references to the object (if defined)

callColumnChangedCallback()

Tries to execute the callback that is set to be triggered when the configuration of columns has been changed, and logs an error if an exception occurs.

Does nothing if no such callback has been set.

getColumnChangedCallback()
Return type:callable or None
Returns:The callback to be triggered when the configuration of columns has been changed, or None if no such callback has been set.
Note:The callback is also called when the visibility state of the column or column set has been changed.
getIndex()
Return type:int
Returns:The index of this instance within its parent set, or -1 if the instance does not have a parent set.
getName()
Return type:str
Returns:The name of this column object.
getParentSet()
Return type:SceneGraphColumnSet or None
Returns:The column set that contains the column or column set represented by this instance, or None if the column is not part of a column set.
getParentSetNames()
Return type:list of str
Returns:A list of the names of all this column object’s ancestors.
getParentSets()
Return type:list of SceneGraphColumnSet
Returns:A list of all this column object’s ancestors.
isVisible()
Return type:bool
Returns:The visibility of the column or column set represented by this instance.
setColumnChangedCallback(callback)

Sets the callback that is to be triggered when the configuration of columns has been changed. This includes the visibility state of columns.

Parameters:callback (callable or None) – The callback to be triggered when the configuration of columns has been changed.
Raises:ValueError – If the given callback object is not callable.
setIndex(index)

Sets the index of this column object within its parent set to the given index.

Parameters:index (int) – The index to set for this column object within its parent set.
setName(name)

Sets the name of this column object to the given name.

Parameters:name (str) – The name to set for this column object.
setParentSet(parentSet)

Sets the parent of this column object to the given column set.

Parameters:parentSet (SceneGraphColumnSet or None) – The parent set to set for this column object, or None to make this column object a stand-alone column or column set.
setVisible(visible)

Sets the visibility of the column or column set represented by this instance to the given visibility.

Parameters:visible (bool) – The visibility to set for the column or column set represented by this instance.
class UI4.Widgets.SceneGraphView.SceneGraphViewColumn.SceneGraphColumn(columnName='Untitled', columnChangedCallback=None, parentSet=None)

Bases: UI4.Widgets.SceneGraphView.SceneGraphViewColumn.BaseSceneGraphColumn

A SceneGraphColumn represents a single column in a SceneGraphView.

__init__(columnName='Untitled', columnChangedCallback=None, parentSet=None)

Initializes an instance of the class.

Parameters:
  • columnName (str) – The name of the new column.
  • columnChangedCallback (callable) – A function to be called when the configuration of columns changes. This includes changes to visibility state.
  • parentSet (SceneGraphColumnSet) – The set to which this new column should be added.
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn'
getAttributeName()
Return type:str or None
Returns:The attribute name associated with this column, or None if no attribute name is set for this column.
getAttributeNames()
Return type:list of str
Returns:The attribute names associated with this column.
classmethod getColorDisplayTypeName()
Return type:str
Returns:The data type name for color data.
See:getSupportedDisplayTypes
getDataType()
Return type:int
Returns:The type of data that the column represents.
classmethod getDefaultDisplayTypeIndex()
Return type:int
Returns:The index of the supported default display type.
See:getSupportedDisplayTypes
classmethod getDefaultDisplayTypeName()
Return type:str
Returns:The name of the default display type to associate with a column.
See:getSupportedDisplayTypes
getFixedWidth()
Return type:int or None
Returns:The fixed width of the column in pixels, or None if no fixed width has been set for the column.
getLookFileMaterialAssignmentCallback()
Return type:callable or None
Returns:The callback that is used for assigning a Look File Material to a package.
getMasterMaterialCallbacks()
Return type:tuple of callable or None
Returns:A tuple of callbacks to use for obtaining a list of paths of scene graph locations that represent Master Materials and for assigning a Master Material to a light.
getMaximumWidth()
Return type:int or None
Returns:The maximum width of the column in pixels, or None if no maximum width has been set for the column.
getMinimumWidth()
Return type:int or None
Returns:The minimum width of the column in pixels, or None if no minimum width has been set for the column.
getProperties()
Return type:list of tuple of (str, object)
Returns:The list of (propertyName, propertyValue) tuples that are currently assigned to the column.
classmethod getSupportedDisplayTypes()
Return type:list of str
Returns:A list of supported column display type names. These data type names are used to differentiate between different widgets that should be displayed for a scene graph column.
getTitle()
Return type:SceneGraphColumnTitle
Returns:The title object for this column.
getTitleClickStyle()
Return type:str
Returns:The style in which the title behaves in response to click events.
getTitleClickedCallback()
Return type:callable or None
Returns:A callback that is to be triggered when the header of this column is clicked, or None if no such callback has been set for this column.
getTitleIcon()
Return type:QtGui.QIcon or None
Returns:The icon to display on the column title, if one is set.
getTitleIconName()
Return type:str
Returns:The name of the icon used for the title of this column.
Note:The title icon may or may not be displayed in the header for the column, depending on its title style.
getTitleStyle()
Return type:str
Returns:The title style for the column. Will be one of SceneGraphColumnTitle.TextOnly, IconOnly or TextAndIcon.
getTitleText()
Return type:str
Returns:The title text for the column.
Note:The title text may or may not be displayed in the header for the column, depending on its title style.
getTitleToolTip()
Return type:str
Returns:The tooltip text to display for the title.
getWidth()
Return type:int
Returns:The width of the column in pixels. This is -1 by default, indicating no preference for the width of the column.
isEditable()
Return type:bool
Returns:The editable state of the column.
isLocationName()
Return type:bool
Returns:True if this column is intended for displaying location names, otherwise False.
isTitleToggledOn()
Return type:bool
Returns:Whether the title is turned on or off. This is only valid if the title’s ClickStyle is Toggle (see setTitleClickStyle).
isValueComparisonEnabled()
Return type:bool
Returns:True if the value of a parameter that corresponds to a cell in the column for which the item delegate instance is used is to be compared to the value of the corresponding attribute in the scene that is produced at the currently viewed node, or False if not.
See:setValueComparisonEnabled
setAttributeName(attributeName, callCallback=True)

Sets the attribute name associated with this column.

Parameters:
  • attributeName (str) – The attribute name to set for this column.
  • callCallback (bool) – An optional flag (default: True) indicating whether the column changed callback should be called if the given attribute name is different to the currently set attribute name for this column.
setAttributeNames(*attributeNames, **kwargs)

Sets the attribute names associated with this column.

Specifying callCallback=False as a keyword argument will prevent the column changed callback from being called.

Parameters:attributeNames (list of str) – The attribute names to set for this column.
setDataType(dataType)

Sets the type of data that the column represents to the given column data type.

Parameters:dataType (cls) – The type of data that the column is to represent.
setEditable(editable)

Sets the editable state of this column to the given editable state.

Parameters:editable (bool) – The editable state to set for the column.
setFixedWidth(fixedWidth)

Sets or resets the fixed width used for the column.

Parameters:fixedWidth (int or None) – The fixed width to use for the column, or None to reset the fixed width.
setIsLocationName(isLocationName)

Sets whether this column is intended for displaying location names.

Parameters:isLocationName (bool) – True if this column is intended for displaying location names, otherwise False.
setLookFileMaterialCallback(lookFileMaterialAssignmentCallback)

Sets the callback used to assign a Look File Material to a given package.

Parameters:lookFileMaterialAssignmentCallback (callable or None) – The callback to use when assigning a Look File Material to a package.
Raises:ValueError – If the given callback object is not callable.
setMasterMaterialCallbacks(masterMaterialsRequestCallback, masterMaterialAssignmentCallback)

Sets the callbacks to use for obtaining a list of paths of scene graph locations that represent Master Materials and for assigning a Master Material to a light to the given callbacks.

Parameters:
  • masterMaterialsRequestCallback (callable or None) – The callback to use for obtaining a list of paths of Master Material scene graph locations.
  • masterMaterialAssignmentCallback (callable or None) – The callback to use for assigning a Master Material to a light.
Raises:

ValueError – If one of the given callback objects is not callable.

setMaximumWidth(maximumWidth)

Sets or resets the maximum width used for the column.

Parameters:maximumWidth (int or None) – The maximum width to use for the column, or None to reset the maximum width.
setMinimumWidth(minimumWidth)

Sets or resets the minimum width used for the column.

Parameters:minimumWidth (int or None) – The minimum width to use for the column, or None to reset the minimum width.
setProperty(propertyName, propertyValue)

Sets the column property with the given name to the given value.

Parameters:
  • propertyName (str) – The name of the column property to set.
  • propertyValue (object or None) – The value to set for the column property.
Raises:
  • RuntimeError – When an attempt is made to set a property when the data type of the column has not been set.
  • ValueError – When the column’s data type doesn’t declare the name of the property valid.
setTitleClickStyle(titleClickStyle)
Parameters:titleClickStyle (str) – The style in which the title behaves in response to click events. Must be one of SceneGraphColumnTitle.ClickStyles.MenuIndicator or SceneGraphColumnTitle.ClickStyles.Toggle. By default it is MenuIndicator.
setTitleClickedCallback(callback)

Sets a callback to be triggered when the title of this column is clicked.

Parameters:callback (callable or None) – The callback to be triggered when the header of the column is clicked, or None to reset the callback.
Raises:ValueError – If the given callback object is not callable.
setTitleIcon(icon)
Parameters:icon (QtGui.QIcon or None) – The icon to show in the column title, or None if no icon is to be shown.
setTitleIconName(titleIconName)

Sets the name of the icon to use for the title of this column to the given title icon name.

For convenience, also sets the title style to TextAndIcon if it is currently set to TextOnly. If you would like only the icon to be shown, set the title style to IconOnly using setTitleStyle.

Parameters:titleIconName (str) – The name of the title icon to use for the column.
Note:The title icon may or may not be displayed in the header for the column, depending on its title style.
setTitleStyle(titleStyle)

Sets the title style for this column to the given title style.

Parameters:titleStyle (str) – The new title style for the column. Must be one of SceneGraphColumnTitle.TextOnly, IconOnly or TextAndIcon.
setTitleText(titleText)

Sets the title text for this column to the given title text.

Parameters:titleText (str) – The new title text for the column.
Note:The title text may or may not be displayed in the header for the column, depending on its title style.
setTitleToggledOn(titleToggledOn)
Parameters:titleToggledOn (bool) – Whether the title is turned on or off.
setTitleToolTip(toolTip)

Sets the tooltip text to display for the title.

Parameters:toolTip (str) – The tooltip text to display for the title.
setValueComparisonEnabled(valueComparisonEnabled)

Sets the flag that controls whether the item delegate instance is to check if the value of a parameter that corresponds to a cell in the column for which the instance is used matches the value of the corresponding attribute in the scene that is produced at the currently viewed node. Item delegate classes can evaluate the flag in initStyleOption() functions to determine whether to alter the appearance and editing behaviour of cells for which the values differ.

Parameters:valueComparisonEnabled (bool) – The flag value.
setWidth(width)
Parameters:width (int) – The desired width of the column in pixels. This is -1 by default, indicating no preference for the width of the column.
titleClicked(columnTitleRect)

Called when the title of this column is clicked by the user.

Parameters:columnTitleRect (QtCore.QRect) – The global screen position and size of the column title that was clicked.
class UI4.Widgets.SceneGraphView.SceneGraphViewColumn.SceneGraphColumnSet(setName='Untitled', columnChangedCallback=None, parentSet=None, columnPresetManager=None)

Bases: UI4.Widgets.SceneGraphView.SceneGraphViewColumn.BaseSceneGraphColumn

A SceneGraphColumnSet contains an ordered list of columns or sets of columns.

__init__(setName='Untitled', columnChangedCallback=None, parentSet=None, columnPresetManager=None)

Initializes an instance of the class.

Parameters:
  • setName (str) – The name of the new set.
  • columnChangedCallback (callable) – A function to be called when the configuration of columns changes. This includes changes to visibility state.
  • parentSet (SceneGraphColumnSet) – The set to which this new set should be added.
  • columnPresetManager (ColumnPresetManager or None) – A ColumnPresetManager to manage keyboard shortcuts and presets for this column set, and any of its children.
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn'
addChild(child, resetParentSet=True)

Adds the given child object to this set.

Parameters:child (BaseSceneGraphColumn) – The child object which we wish to add to this set.
addColumn(columnName)

Adds a new column to this set.

Return type:SceneGraphColumn
Parameters:columnName (str) – The new name of the column.
Returns:The newly created column object.
addColumnSet(setName='Untitled')

Adds a new column set to this set.

Return type:SceneGraphColumnSet
Parameters:setName (str) – The new name of the column.
Returns:The newly created column set object.
addKeyboardShortcut(shortcut)

Associates a keyboard shortcut with this column set. Depending on the ColumnPresetManager‘s shortcut ‘mode’, when this key is pressed, the visibility state of this and other column sets will be altered.

Parameters:shortcut (string or None or int or QKeySequence) – A value that can be accepted by the QKeySequence constructor, for use as a keyboard shortcut that will modify the visibility of this column set.
applyColumnVisibilitySettings(columnVisibilitySettings)
Parameters:columnVisibilitySettings (dict) – A dictionary containing visibility settings this set and its child columns and column sets, indexed by name. This is used when loading a layout to restore the columns and column sets that were visible when the Tab layout was saved.
clearChildren()

Removes all child objects from this set.

getAttributeName(columnIndex, visibleOnly=True)
Return type:

str or None

Parameters:
  • columnIndex (int) – The index of the column whose attribute name to return.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The name of an attribute whose value to show in the column with the given index, or None if the given index is out of range.

getAttributeNames(columnIndex, visibleOnly=True)
Return type:

list of str

Parameters:
  • columnIndex (int) – The index of the column whose attribute names to return.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The names of attributes whose values to show in the column with the given index, or None if the given index is out of range.

getChildByName(childName)

Recursively searches the hierarchy in this column set for the first column or column set of the given name.

Return type:SceneGraphColumn, SceneGraphColumnSet or None
Parameters:childName (str) – The name of the column or column set to return.
Returns:The first column or column set with the given name, or None if no column or column set by that name is found.
getChildIndex(child)
Return type:int
Parameters:child (BaseSceneGraphColumn) – The child object whose index in this set we wish to get.
Returns:The index of the specified child within this set, or -1 if the child is not found.
getColumnByIndex(columnIndex, visibleOnly=True)

Return the column which would appear nth in the flattened list of all the columns in this set (which may include other sets).

If visibleOnly is True, then columns and column sets with their visibility state set to False are ignored and not included in the indexing.

Return type:

BaseSceneGraphColumn

Parameters:
  • columnIndex (int) – The index in the flattened list of columns in the set of the column which we will return
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The column found at the requested index, or None if the given index is out of range.

getColumnByName(columnName)

Recursively searches the hierarchy in this column set for the first column of the given name.

Return type:BaseSceneGraphColumn or None
Parameters:columnName (str) – The name of the column we will search for in the hierarchy under this set.
Returns:The first column with the specified name, or None if no column by that name is found.
getColumnCount(visibleOnly=True)
Return type:int
Parameters:visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:The total number of (visible) columns in this set and any nested sets.
getColumnSetByName(columnSetName)

Recursively searches the hierarchy in this column set for the first column set of the given name.

Return type:SceneGraphColumnSet or None
Parameters:columnSetName (str) – The name of the column set to return.
Returns:The first column set with the given name, or None if no column set by that name is found.
getColumnVisibilitySettings()
Return type:dict
Returns:A dictionary containing the visibility settings for all the columns and column sets in this column set, indexed by name. This is used to save the visible columns and column sets when saving the Tab layout.
getColumns(visibleOnly=True)
Return type:list of BaseSceneGraphColumn
Parameters:visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:A flattened list of all the columns in this set.
getDataType(columnIndex, visibleOnly=True)
Return type:

int or None

Parameters:
  • columnIndex (int) – The index of the column whose data type to return.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The type of data that the column with the given index represents, or None if the given index is out of range.

getNames(visibleOnly=True)
Return type:list of str
Parameters:visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:A flattened list of all names of the columns in the hierarchy under this column set.
getTitleText(columnIndex, visibleOnly=True)
Return type:

str or None

Parameters:
  • columnIndex (int) – The index of the column whose title text to return.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The title text for the column with the given index, or None if the given index is out of range.

getTitles(visibleOnly=True)
Return type:list of SceneGraphColumnTitle
Parameters:visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:A flattened list of all title objects for the columns in the hierarchy under this column set.
getWidth(columnIndex, visibleOnly=True)
Return type:

int or None

Parameters:
  • columnIndex (int) – The index of the column whose width to return.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

The width in pixels for the column with the given index, or None if the given index is out of range.

getWidths(visibleOnly=True)
Return type:list of int
Parameters:visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:A flattened list of all column widths for the columns in the hierarchy under this column set.
isEditable(columnIndex, visibleOnly=True)
Return type:

bool or None

Parameters:
  • columnIndex (int) – The index of the column whose editable state will returned.
  • visibleOnly (bool) – Flag that controls whether to only consider columns that are visible.
Returns:

True if the column with the given index is editable, False if not, or None if the given index is out of range.

isLocationNameColumn(columnIndex, visibleOnly=True)
Return type:

bool or None

Parameters:
  • columnIndex (int) – The index of the column which we wish to interrogate.
  • visibleOnly (bool) – Should we only count visible columns in the indexing?
Returns:

True if the column with the given index is a location name column, False if not, or None if the given index is out of range.

removeChild(child, resetParentSet=True)

Removes the given child object from this set.

Parameters:child (BaseSceneGraphColumn) – The child object which we wish to remove from this set.
removeKeyboardShortcut(shortcut)

Removes a keyboard shortcut that was previously associated with this column set.

Parameters:shortcut (string or None or int or QKeySequence) – A value that can be accepted by the QKeySequence constructor, representing the keyboard shortcut to remove the association for.
removeKeyboardShortcuts()

Removes all keyboard shortcuts that were previously associated with this column set.

setChildIndex(child, index)

Sets the index of the specified child within this set. Logs a warning if the given child is not found.

Parameters:
  • child (BaseSceneGraphColumn) – The child object whose index in this set we wish to set.
  • index (int) – The index we wish to give to the specified child.
setColumnChangedCallback(callback)

Sets the callback that is to be triggered when the configuration of columns has been changed. This includes the visibility state of columns.

Parameters:callback (callable or None) – The callback to be triggered when the configuration of columns has been changed.
class UI4.Widgets.SceneGraphView.SceneGraphViewColumn.SceneGraphColumnTitle(text, iconName, style)

Bases: object

Class to describe the header for a column in the SceneGraphView widget.

class ClickStyles

Bases: object

Enumeration of possible values for the style of click behaviour.

All = ['menuIndicator', 'toggle']
MenuIndicator = 'menuIndicator'
Toggle = 'toggle'
__dict__ = dict_proxy({'__module__': 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn', 'All': ['menuIndicator', 'toggle'], 'MenuIndicator': 'menuIndicator', 'Toggle': 'toggle', '__dict__': <attribute '__dict__' of 'ClickStyles' objects>, '__weakref__': <attribute '__weakref__' of 'ClickStyles' objects>, '__doc__': '\n Enumeration of possible values for the style of click behaviour.\n '})
__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn'
__weakref__

list of weak references to the object (if defined)

SceneGraphColumnTitle.DisplayStyles = ['textOnly', 'iconOnly', 'textAndIcon']
SceneGraphColumnTitle.IconOnly = 'iconOnly'
SceneGraphColumnTitle.TextAndIcon = 'textAndIcon'
SceneGraphColumnTitle.TextOnly = 'textOnly'
SceneGraphColumnTitle.__dict__ = dict_proxy({'getClickedCallback': <function getClickedCallback at 0x7f60a1f43c08>, 'TextAndIcon': 'textAndIcon', '__module__': 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn', 'setIconName': <function setIconName at 0x7f60a1f43aa0>, '__dict__': <attribute '__dict__' of 'SceneGraphColumnTitle' objects>, 'getToolTip': <function getToolTip at 0x7f60a1f43848>, '_SceneGraphColumnTitle__shouldShowIcon': <function __shouldShowIcon at 0x7f60a1f450c8>, '__str__': <function __str__ at 0x7f60a1f45140>, 'callClickedCallback': <function callClickedCallback at 0x7f60a1f43cf8>, 'getText': <function getText at 0x7f60a1f43758>, 'setStyle': <function setStyle at 0x7f60a1f43b90>, 'getIconName': <function getIconName at 0x7f60a1f43a28>, 'IconOnly': 'iconOnly', 'getStyle': <function getStyle at 0x7f60a1f43b18>, 'ClickStyles': <class 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn.ClickStyles'>, 'setToggledOn': <function setToggledOn at 0x7f60a1f43ed8>, 'isToggledOn': <function isToggledOn at 0x7f60a1f43e60>, 'setClickStyle': <function setClickStyle at 0x7f60a1f43de8>, 'TextOnly': 'textOnly', 'setClickedCallback': <function setClickedCallback at 0x7f60a1f43c80>, '__init__': <function __init__ at 0x7f60a1f436e0>, '_SceneGraphColumnTitle__shouldShowText': <function __shouldShowText at 0x7f60a1f45050>, 'setToolTip': <function setToolTip at 0x7f60a1f438c0>, 'getIcon': <function getIcon at 0x7f60a1f43938>, '__weakref__': <attribute '__weakref__' of 'SceneGraphColumnTitle' objects>, 'setText': <function setText at 0x7f60a1f437d0>, 'DisplayStyles': ['textOnly', 'iconOnly', 'textAndIcon'], 'getClickStyle': <function getClickStyle at 0x7f60a1f43d70>, '__repr__': <function __repr__ at 0x7f60a1f451b8>, 'setUpdateFunction': <function setUpdateFunction at 0x7f60a1f43f50>, 'setIcon': <function setIcon at 0x7f60a1f439b0>, '__doc__': '\n Class to describe the header for a column in the SceneGraphView widget.\n '})
SceneGraphColumnTitle.__init__(text, iconName, style)

Initializes an instance of the class.

Parameters:
  • text (str) – The text to display in the header.
  • iconName (str) – The name of an icon to display in the header. Mapped to an icon file by the SceneGraphViewIconManager.
  • style (str) – Whether to show text, an icon, or both in the header.
SceneGraphColumnTitle.__module__ = 'UI4.Widgets.SceneGraphView.SceneGraphViewColumn'
SceneGraphColumnTitle.__repr__()
SceneGraphColumnTitle.__str__()
SceneGraphColumnTitle.__weakref__

list of weak references to the object (if defined)

SceneGraphColumnTitle.callClickedCallback(columnTitleRect)

Calls a registered callback that is to be triggered when the column title is clicked.

Parameters:columnTitleRect (QtCore.QRect) – The global screen position and size of the column title that was clicked.
SceneGraphColumnTitle.getClickStyle()
Return type:str
Returns:A SceneGraphColumnTitle.ClickStyles attribute that represents the style in which to behave in response to click events.
SceneGraphColumnTitle.getClickedCallback()
Return type:callable or None
Returns:A callback that is to be triggered when the header of this column is clicked, or None if no such callback has been set for this column.
SceneGraphColumnTitle.getIcon()
Return type:QtGui.QIcon or None
Returns:The icon to be shown in the column title, or None if no icon has been set.
SceneGraphColumnTitle.getIconName()
Return type:str
Returns:The name of the icon to display, taking into account the display style.
SceneGraphColumnTitle.getStyle()
Return type:str
Returns:The style in which to display the header.
SceneGraphColumnTitle.getText()
Return type:str
Returns:The text to display, taking into account the display style.
SceneGraphColumnTitle.getToolTip()
Return type:str
Returns:The tooltip text to display.
SceneGraphColumnTitle.isToggledOn()
Return type:bool
Returns:Whether the title is turned on or off. This is only valid if the title’s ClickStyle is Toggle (see setClickStyle).
SceneGraphColumnTitle.setClickStyle(clickStyle)
Parameters:clickStyle (str) – The style in which to behave in response to click events. Must be one of SceneGraphColumnTitle.ClickStyles.MenuIndicator or SceneGraphColumnTitle.ClickStyles.Toggle.
SceneGraphColumnTitle.setClickedCallback(callback)

Sets a callback to be triggered when the column title is clicked.

Parameters:callback (callable or None) – The callback to be triggered when the header of the column is clicked, or None to reset the callback.
Raises:ValueError – If the given callback object is not callable.
SceneGraphColumnTitle.setIcon(icon)

Sets the icon to use for the column title to the given icon.

Parameters:icon (QtGui.QIcon or None) – The icon to show in the column title, or None if no icon is to be shown.
Raises:TypeError – If icon is neither None nor a QtGui.QIcon.
SceneGraphColumnTitle.setIconName(iconName)

Sets the name of the icon to display to the given icon name.

Parameters:iconName (str) – The name of the icon to display.
SceneGraphColumnTitle.setStyle(style)
Parameters:style (str) – The style in which to display the header. Must be one of SceneGraphColumnTitle.TextOnly, SceneGraphColumnTitle.IconOnly or SceneGraphColumnTitle.TextAndIcon.
SceneGraphColumnTitle.setText(text)

Sets the text to display.

Parameters:text (str) – The text to display.
SceneGraphColumnTitle.setToggledOn(toggledOn)
Parameters:toggledOn (bool) – Whether the title is turned on or off.
SceneGraphColumnTitle.setToolTip(toolTip)

Sets the tooltip text to display.

Parameters:toolTip (str) – The tooltip text to display.
SceneGraphColumnTitle.setUpdateFunction(updateFunction, *args)

Sets an update function and any arguments that can be used to cause a redraw of the column title.

Parameters:
  • updateFunction (callable or None) – An update function.
  • args (list) – Any arguments to be passed to the update function when it is run.