PyFlow.UI.Widgets package¶
Submodules¶
PyFlow.UI.Widgets.BlueprintCanvas module¶
-
class
PyFlow.UI.Widgets.BlueprintCanvas.BlueprintCanvas(graphManager, pyFlowInstance=None)¶ Bases:
PyFlow.UI.Canvas.CanvasBase.CanvasBaseUI canvas class
-
__init__(graphManager, pyFlowInstance=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
addNode(uiNode, jsonTemplate, parentGraph=None)¶ Adds node to a graph
Parameters: uiNode ( UINodeBase) – Raw node wrapper
-
dragEnterEvent(self, event: PySide2.QtGui.QDragEnterEvent)¶
-
dragLeaveEvent(self, event: PySide2.QtGui.QDragLeaveEvent)¶
-
dragMoveEvent(self, event: PySide2.QtGui.QDragMoveEvent)¶
-
dropEvent(self, event: PySide2.QtGui.QDropEvent)¶
-
eventFilter(self, arg__1: PySide2.QtCore.QObject, arg__2: PySide2.QtCore.QEvent) → bool¶
-
getAllNodes()¶ returns all ui nodes list
-
keyPressEvent(self, event: PySide2.QtGui.QKeyEvent)¶
-
keyReleaseEvent(self, event: PySide2.QtGui.QKeyEvent)¶
-
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
nodes¶ returns all ui nodes dict including compounds
-
pins¶ Returns UI pins dict {uuid: UIPinBase}
-
validateConnections(graph)¶ Hides show if needed. Changes endpoints positions if needed
-
PyFlow.UI.Widgets.EditPropertiesWidget module¶
PyFlow.UI.Widgets.EnumComboBox module¶
-
class
PyFlow.UI.Widgets.EnumComboBox.EnumComboBox(values=[], parent=None)¶ Bases:
PySide2.QtWidgets.QComboBox-
__init__(values=[], parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
setModel(self, model: PySide2.QtCore.QAbstractItemModel)¶
-
setModelColumn(self, visibleColumn: int)¶
-
view(self) → PySide2.QtWidgets.QAbstractItemView¶
-
PyFlow.UI.Widgets.GraphEditor_ui module¶
PyFlow.UI.Widgets.InputActionWidget module¶
PyFlow.UI.Widgets.InputWidgets module¶
-
class
PyFlow.UI.Widgets.InputWidgets.InputWidgetRaw(parent=None, dataSetCallback=None, defaultValue=None, **kwds)¶ Bases:
PySide2.QtWidgets.QWidget,PyFlow.UI.Widgets.InputWidgets.IInputWidgetThis type of widget can be used as a base class for complex ui generated by designer
-
__init__(parent=None, dataSetCallback=None, defaultValue=None, **kwds)¶ Initialize self. See help(type(self)) for accurate signature.
-
contextMenuEvent(self, event: PySide2.QtGui.QContextMenuEvent)¶
-
setWidgetValue(value)¶ to widget
-
widgetValueUpdated(value)¶ from widget
-
-
class
PyFlow.UI.Widgets.InputWidgets.InputWidgetSingle(parent=None, dataSetCallback=None, defaultValue=None, **kwds)¶ Bases:
PyFlow.UI.Widgets.InputWidgets.InputWidgetRawThis type of widget is used for a simple widgets like buttons, checkboxes etc. It consists of horizontal layout widget itself and reset button.
-
__init__(parent=None, dataSetCallback=None, defaultValue=None, **kwds)¶ Initialize self. See help(type(self)) for accurate signature.
-
PyFlow.UI.Widgets.KeyCapture module¶
-
class
PyFlow.UI.Widgets.KeyCapture.KeyCaptureWidget(parent=None)¶ Bases:
PySide2.QtWidgets.QPushButtondocstring for KeyCaptureWidget.
-
__init__(parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent)¶
-
mousePressEvent(self, e: PySide2.QtGui.QMouseEvent)¶
-
PyFlow.UI.Widgets.KeyboardModifiersCapture module¶
-
class
PyFlow.UI.Widgets.KeyboardModifiersCapture.KeyboardModifiersCaptureWidget(parent=None)¶ Bases:
PySide2.QtWidgets.QPushButtondocstring for KeyboardModifiersCaptureWidget.
-
__init__(parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent)¶
-
mousePressEvent(self, e: PySide2.QtGui.QMouseEvent)¶
-
PyFlow.UI.Widgets.MouseButtonCapture module¶
-
class
PyFlow.UI.Widgets.MouseButtonCapture.MouseButtonCaptureWidget(parent=None)¶ Bases:
PySide2.QtWidgets.QPushButtondocstring for MouseButtonCaptureWidget.
-
__init__(parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
keyPressEvent(self, arg__1: PySide2.QtGui.QKeyEvent)¶
-
mousePressEvent(self, e: PySide2.QtGui.QMouseEvent)¶
-
PyFlow.UI.Widgets.PreferencesWindow module¶
PyFlow.UI.Widgets.PropertiesFramework module¶
-
class
PyFlow.UI.Widgets.PropertiesFramework.CollapSibleGoupBox(name)¶ Bases:
PySide2.QtWidgets.QWidget-
__init__(name)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.PropertiesFramework.CollapsibleFormWidget(parent=None, headName='Collapse', noSpacer=True, collapsed=False, hideLabels=False)¶ Bases:
PyFlow.UI.Widgets.PropertiesFramework.CollapsibleWidget-
__init__(parent=None, headName='Collapse', noSpacer=True, collapsed=False, hideLabels=False)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.PropertiesFramework.CollapsibleWidget(parent=None, headName='Collapse', noSpacer=True, collapsed=False)¶ Bases:
PySide2.QtWidgets.QWidgetHas content widget and button on top to hide or show content
-
__init__(parent=None, headName='Collapse', noSpacer=True, collapsed=False)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.PropertiesFramework.HeadButton(parent=None, maxHeight=25)¶ Bases:
PySide2.QtWidgets.QPushButtondocstring for HeadButton.
-
__init__(parent=None, maxHeight=25)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.PropertiesFramework.PropertiesWidget(parent=None, searchByHeaders=False)¶ Bases:
PySide2.QtWidgets.QWidgetdocstring for PropertiesWidget.
-
__init__(parent=None, searchByHeaders=False)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.PropertiesFramework.PropertyEntry(label, widget, parent=None, hideLabel=False, maxLabelWidth=None, toolTip='')¶ Bases:
PySide2.QtWidgets.QWidgetdocstring for PropertyEntry.
-
__init__(label, widget, parent=None, hideLabel=False, maxLabelWidth=None, toolTip='')¶ Initialize self. See help(type(self)) for accurate signature.
-
PyFlow.UI.Widgets.QtSliders module¶
-
class
PyFlow.UI.Widgets.QtSliders.DoubleSlider(parent=None, sliderRange=(-100.0, 100.0), defaultValue=0.0, dencity=1000000, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001])¶ Bases:
PyFlow.UI.Widgets.QtSliders.slider-
__init__(parent=None, sliderRange=(-100.0, 100.0), defaultValue=0.0, dencity=1000000, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001])¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.QtSliders.draggers(parent=None, isFloat=True, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001])¶ Bases:
PySide2.QtWidgets.QWidgetPopUp Draggers Houdini Style
Custom Widget that holds a bunch of
inputDraggerto drag values when midClick over field type input widget, Right Drag increments value, Left Drag decreases Value-
__init__(parent=None, isFloat=True, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001])¶ Initialize self. See help(type(self)) for accurate signature.
-
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) → bool¶
-
-
class
PyFlow.UI.Widgets.QtSliders.inputDragger(parent, factor, *args, **kwargs)¶ Bases:
PySide2.QtWidgets.QWidgetCustom Widget to drag values when midClick over field type input widget, Right Drag increments value, Left Drag decreases Value
- Signals:
valueChanged: Signal Emitted when value has change (float)
-
__init__(parent, factor, *args, **kwargs)¶ Parameters: - parent (QtWidget) – parent Widget
- factor (float/int) – amount to increment the value
-
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) → bool¶
-
class
PyFlow.UI.Widgets.QtSliders.pyf_ColorSlider(parent=None, startColor=[0, 0, 0], type='float', alpha=False, h=50, *args)¶ Bases:
PySide2.QtWidgets.QWidgetCustom Slider to choose a color by components. It encapsulates a bunch of
valueBoxandpyf_GradientSlider- Signals:
valueChanged: Signal emitted when any of the sliders/valueBoxes changes
-
__init__(parent=None, startColor=[0, 0, 0], type='float', alpha=False, h=50, *args)¶ Parameters: - parent (QtWidgets.QWidget) – Parent Widget
- startColor (list(float/int), optional) – Initialization color, defaults to [0, 0, 0]
- type (str, optional) – Choose if create a float or int Slider, defaults to “float”
- alpha (bool, optional) – Choose if create a 4 input for the alpha channel, defaults to False
- h (int, optional) – Maximum Widget Height, defaults to 50
-
contextMenuEvent(self, event: PySide2.QtGui.QContextMenuEvent)¶
-
class
PyFlow.UI.Widgets.QtSliders.pyf_GradientSlider(parent, color1=[0, 0, 0], color2=[255, 255, 255], sliderRange=(0.0, 255.0), draggerSteps=[5.0, 1.0, 0.25], *args)¶ Bases:
PyFlow.UI.Widgets.QtSliders.DoubleSliderCustom Slider to select a color by Non Editable gradient
# Extends: # :obj: DoubleSlider
-
__init__(parent, color1=[0, 0, 0], color2=[255, 255, 255], sliderRange=(0.0, 255.0), draggerSteps=[5.0, 1.0, 0.25], *args)¶ Parameters:
-
getColor()¶ Computes the current Color
Returns: Int list in range 0-255 representing rgb colors Return type: [int, int, int]
-
paintEvent(self, ev: PySide2.QtGui.QPaintEvent)¶
-
-
class
PyFlow.UI.Widgets.QtSliders.pyf_HueSlider(parent, *args)¶ Bases:
PyFlow.UI.Widgets.QtSliders.DoubleSliderCustom Slider to select a color by a hue selector
- Extends:
obj: DoubleSlider
-
__init__(parent, *args)¶ Parameters: parent (QtWidgets.QWidget) – Parent QtWidget
-
getColor()¶ Gets the current Color
Returns: Float list in range 0-1 representing rgb colors Return type: [float,float,float]
-
getHue(hue)¶ Compute hue based on input value in range 0-1
Parameters: hue (float) – U value where to calculate hue Returns: Float list in range 0-1 representing rgb colors Return type: [float,float,float]
-
paintEvent(self, ev: PySide2.QtGui.QPaintEvent)¶
-
class
PyFlow.UI.Widgets.QtSliders.pyf_RampColor(raw_ramp, parent=None, bezier=True)¶ Bases:
PyFlow.UI.Widgets.QtSliders.pyf_RampSplineSimilar to the
pyf_RampSplineto create editable gradients with interpolation support- Signals:
tickClicked: Signal emitted when a UiTick element clicked, emits UiTick valueClicked: Signal emitted when a UiTick element clicked, emits (u,v) colorClicked: Signal emitted when a UiTick element clicked. emits [float,float,float] in range 0-1 tickAdded: Signal emitted when a UiTick element added tickChanged: Signal emitted when a UiTick element cahnges values tickMoved: Signal emitted when a UiTick element moved tickRemoved: Signal emitted when a UiTick element deleted - Extends:
obj: pyf_RampSpline
-
__init__(raw_ramp, parent=None, bezier=True)¶ Parameters: - raw_ramp (
PyFlow.Core.structs.splineRamp) – Core ramp that will perform the interpolation - parent (QtWidgets.QWidget, optional) – Parent QWidget
- bezier (bool, optional) – Initialize as linear or bezier, defaults to False
- raw_ramp (
-
addItem(u=0, v=[0, 0, 0], raw_item=None)¶ Adds a new Item to the ramp
Parameters: - u (float, optional) – X postion for the item, defaults to 0
- v ([float,float,float], optional) – color value for the item, defaults to [0,0,0]
- raw_item (
PyFlow.Core.structs.Tick, optional) – ExistingPyFlow.Core.structs.Tickto link with, if none, one new created , defaults to None
-
drawBackground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF)¶
-
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
resizeEvent(self, event: PySide2.QtGui.QResizeEvent)¶
-
setColor(color, index=-1)¶ Sets the color value for the selected item if no index provided
Parameters:
-
values¶ Get all colors in the curve :returns: List of color values in range 0-1 :rtype: list([float,float,float])
-
class
PyFlow.UI.Widgets.QtSliders.pyf_RampSpline(raw_ramp, parent=None, bezier=False)¶ Bases:
PySide2.QtWidgets.QGraphicsViewUi Ramp/Curve Editor that encapsulates a
PyFlow.Core.structs.splineRampto edit it- Signals:
tickClicked: Signal emitted when a UiTick element clicked, emits UiTick valueClicked: Signal emitted when a UiTick element clicked, emits (u,v) tickAdded: Signal emitted when a UiTick element added tickChanged: Signal emitted when a UiTick element cahnges values tickMoved: Signal emitted when a UiTick element moved tickRemoved: Signal emitted when a UiTick element deleted
-
__init__(raw_ramp, parent=None, bezier=False)¶ Parameters: - raw_ramp (
PyFlow.Core.structs.splineRamp) – Core ramp that will perform the interpolation - parent (QtWidgets.QWidget, optional) – Parent QWidget
- bezier (bool, optional) – Initialize as linear or bezier, defaults to False
- raw_ramp (
-
addItem(u=0, v=0, raw_item=None)¶ Adds a new Item to the ramp
Parameters: - u (float, optional) – X postion for the item, defaults to 0
- v (float, optional) – Y postion for the item, defaults to 0
- raw_item (
PyFlow.Core.structs.Tick, optional) – ExistingPyFlow.Core.structs.Tickto link with, if none, one new created , defaults to None
-
clearSelection()¶ Deselect all items
-
drawBackground(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRectF)¶
-
evaluateAt(value)¶ Computes the result of the interpolation for the guiven U value
Parameters: value (float) – x postion to evaluate at Returns: modified value by the curve Return type: float
-
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent)¶
-
resizeEvent(self, event: PySide2.QtGui.QResizeEvent)¶
-
setBezier(isBezier)¶ Sets interpolation to bezier/linear
Parameters: isBezier (bool) – If true bezier interpolation used
-
setU(u, index=-1)¶ Sets the X postion for the selected item if no index provided
Parameters:
-
setV(v, index=-1)¶ Sets the Y postion for the selected item if no index provided
Parameters:
-
sortedItems()¶ Returns all the
UiTickin the ramp sorted by x positionReturns: all UiTickin the rampReturn type: list( UiTick)
-
uValues¶ Get all x positions in the curve :returns: List of U values :rtype: list(float)
-
updateFromRaw()¶ Updates Ui representation of the internal
PyFlow.Core.structs.splineRamp
-
yValues¶ Get all y positions in the curve :returns: List of V values :rtype: list(float)
-
class
PyFlow.UI.Widgets.QtSliders.pyf_Slider(parent, type='float', style=0, name=None, sliderRange=(-100.0, 100.0), defaultValue=0.0, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001], *args)¶ Bases:
PySide2.QtWidgets.QWidgetCustom Slider that encapsulates a
slideror aDoubleSliderand avalueBoxlinked together- Signals:
valueChanged: Signal emitted when slider or valueBox value changes, int/float
-
__init__(parent, type='float', style=0, name=None, sliderRange=(-100.0, 100.0), defaultValue=0.0, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001], *args)¶ Parameters: - parent (QtWidgets.QWidget) – Parent Widget
- type (str, optional) – Choose if create a float or int Slider, defaults to “float”
- style (number, optional) – Choose looking style, 0 is a full colored xsi style slider, and 1 is a normal colored slider, defaults to 0
- name ([type], optional) – Name to display in a label, if None no label created, defaults to None
- *args –
[description]
-
hideLabel()¶ Hides Name label
-
hideSlider()¶ Hides Slider
-
setDisplayMaximum(value)¶ Sets the Maximum value for display options, real max value don’t touched, if current value is bigger than this display value,Widget automatically recalculates maxDisplay
Parameters: value (float/int) – New Display MaxValue
-
setDisplayMinimun(value)¶ Sets the Minimum value for display options, real min value don’t touched, if current value is less than this display value,Widget automatically recalculates minDisplay
Parameters: value (float/int) – New Display MinValue
-
setRange(min, max)¶ Sets the range for the input value, real max and min range
Parameters: - min (float/int) – Minimum Value
- max (float/int) – Maximum Value
-
showLabel()¶ Shows Name label
-
showSlider()¶ Show Slider
-
update(self)¶ update(self, arg__1: PySide2.QtCore.QRect) update(self, arg__1: PySide2.QtGui.QRegion) update(self, x: int, y: int, w: int, h: int)
-
class
PyFlow.UI.Widgets.QtSliders.pyf_timeline(parent, *args)¶ Bases:
PySide2.QtWidgets.QSlider-
__init__(parent, *args)¶ Initialize self. See help(type(self)) for accurate signature.
-
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) → bool¶
-
mouseMoveEvent(self, ev: PySide2.QtGui.QMouseEvent)¶
-
mousePressEvent(self, ev: PySide2.QtGui.QMouseEvent)¶
-
paintEvent(self, ev: PySide2.QtGui.QPaintEvent)¶
-
setRange(self, min: int, max: int)¶
-
update(self)¶ update(self, arg__1: PySide2.QtCore.QRect) update(self, arg__1: PySide2.QtGui.QRegion) update(self, x: int, y: int, w: int, h: int)
-
wheelEvent(self, e: PySide2.QtGui.QWheelEvent)¶
-
-
class
PyFlow.UI.Widgets.QtSliders.slider(parent=None, draggerSteps=[100.0, 10.0, 1.0], sliderRange=[-100, 100], *args, **kwargs)¶ Bases:
PySide2.QtWidgets.QSliderCustomized Int QSlider
Re implements QSlider adding a few enhancements
- Modifiers:
Left/Mid: Click to move handle Ctrl: and drag to move handle half velocity Shift: and drag to move handle quarter velocity Ctrl+Shift: and drag to move handle eighth velocity - Extends:
- QtWidgets.QSlider
-
__init__(parent=None, draggerSteps=[100.0, 10.0, 1.0], sliderRange=[-100, 100], *args, **kwargs)¶ Initialize self. See help(type(self)) for accurate signature.
-
keyPressEvent(self, ev: PySide2.QtGui.QKeyEvent)¶
-
mouseMoveEvent(self, ev: PySide2.QtGui.QMouseEvent)¶
-
mousePressEvent(self, ev: PySide2.QtGui.QMouseEvent)¶
-
wheelEvent(self, e: PySide2.QtGui.QWheelEvent)¶
-
class
PyFlow.UI.Widgets.QtSliders.testWidg(parent=None)¶ Bases:
PySide2.QtWidgets.QWidget-
__init__(parent=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
class
PyFlow.UI.Widgets.QtSliders.uiTick(raw_tick, parent=None)¶ Bases:
PySide2.QtWidgets.QGraphicsWidgetUiElement For Ramp Widgets.
Holds a
PyFlow.Core.structs.Tickinside with U,V attributes and expand it to use colors in V instead of floats for use in gradient sliders-
__init__(raw_tick, parent=None)¶ Parameters: - raw_tick (
PyFlow.Core.structs.Tick) – Input Core Tick - parent (QtWidgets.QWidget, optional) – Parent QWidget
- raw_tick (
-
boundingRect(self) → PySide2.QtCore.QRectF¶
-
getColor()¶ Get Current Color value
-
getU()¶ Get Current U value
-
getV()¶ Get Current V value
-
hoverEnterEvent(self, event: PySide2.QtWidgets.QGraphicsSceneHoverEvent)¶
-
hoverLeaveEvent(self, event: PySide2.QtWidgets.QGraphicsSceneHoverEvent)¶
-
paint(self, painter: PySide2.QtGui.QPainter, option: PySide2.QtWidgets.QStyleOptionGraphicsItem, widget: typing.Union[PySide2.QtWidgets.QWidget, NoneType] = None)¶
-
setSelected(self, selected: bool)¶
-
-
class
PyFlow.UI.Widgets.QtSliders.valueBox(labelText='', type='float', buttons=False, decimals=3, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001], *args, **kwargs)¶ Bases:
PySide2.QtWidgets.QDoubleSpinBoxCustom QDoubleSpinBox
Custom SpinBox with Houdini Style draggers,
draggers. Middle Click to display a bunch of draggers to change value by adding different delta values- Extends:
- QtWidgets.QDoubleSpinBox
-
__init__(labelText='', type='float', buttons=False, decimals=3, draggerSteps=[100.0, 10.0, 1.0, 0.1, 0.01, 0.001], *args, **kwargs)¶ Parameters:
-
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) → bool¶
-
paintEvent(self, event: PySide2.QtGui.QPaintEvent)¶
-
update(self)¶ update(self, arg__1: PySide2.QtCore.QRect) update(self, arg__1: PySide2.QtGui.QRegion) update(self, x: int, y: int, w: int, h: int)
-
wheelEvent(self, event: PySide2.QtGui.QWheelEvent)¶
PyFlow.UI.Widgets.SelectPinDialog module¶
-
class
PyFlow.UI.Widgets.SelectPinDialog.SelectPinDialog(parent=None, validPins=None)¶ Bases:
PySide2.QtWidgets.QDialogdocstring for SelectPinDialog.
-
__init__(parent=None, validPins=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
showEvent(self, arg__1: PySide2.QtGui.QShowEvent)¶
-