def __init__(self, node, readOnly=False, **kw): column = GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Vertical, spacing=4) GafferUI.NodeUI.__init__(self, node, column, **kw) with column: with GafferUI.ListContainer( orientation=GafferUI.ListContainer.Orientation.Horizontal): GafferUI.Spacer(IECore.V2i(10), expand=True) toolButton = GafferUI.ToolParameterValueWidget( self.node().parameterHandler()) toolButton.plugValueWidget().setReadOnly(readOnly) infoIcon = GafferUI.Image("info.png") infoIcon.setToolTip( self.node().getParameterised()[0].description) with GafferUI.ScrolledContainer( horizontalMode=GafferUI.ScrolledContainer.ScrollMode.Never, borderWidth=4): self.__parameterValueWidget = GafferUI.CompoundParameterValueWidget( self.node().parameterHandler(), collapsible=False) self.setReadOnly(readOnly)
def _footerWidget( self ) : if self.__footerWidget is not None : return self.__footerWidget self.__footerWidget = GafferUI.CompoundParameterValueWidget( self.__parameterHandler, collapsible=False ) self.__footerWidget.setVisible( False ) return self.__footerWidget
def testLifetime(self): n = Gaffer.OpHolder() opSpec = GafferTest.ParameterisedHolderTest.classSpecification( "image/grade", "IECORE_OP_PATHS")[:-1] n.setOp(*opSpec) ui = GafferUI.CompoundParameterValueWidget(n.parameterHandler()) w = weakref.ref(ui) del ui self.assertEqual(w(), None)
def __init__( self, node, readOnly=False, **kw ) : column = GafferUI.ListContainer( GafferUI.ListContainer.Orientation.Vertical, spacing = 4 ) GafferUI.NodeUI.__init__( self, node, column, **kw ) with column : with GafferUI.ListContainer( orientation = GafferUI.ListContainer.Orientation.Horizontal ) : GafferUI.Spacer( IECore.V2i( 10 ), parenting = { "expand" : True } ) toolButton = GafferUI.ToolParameterValueWidget( self.node().parameterHandler() ) toolButton.plugValueWidget().setReadOnly( readOnly ) _InfoButton( node ) with GafferUI.ScrolledContainer( horizontalMode=GafferUI.ScrolledContainer.ScrollMode.Never, borderWidth=4 ) : self.__parameterValueWidget = GafferUI.CompoundParameterValueWidget( self.node().parameterHandler(), collapsible = False ) self.setReadOnly( readOnly )
def __createParameterWidget(plug): return GafferUI.CompoundParameterValueWidget( plug.node().parameterHandler(), collapsible=False)