def _run( self, args ) :
	
		self.root()["scripts"]["script1"] = Gaffer.ScriptNode()
		
		with GafferUI.Window( "Gaffer Browser" ) as self.__window :
			browser = GafferUI.BrowserEditor( self.root()["scripts"]["script1"] )
		
		if args["initialPath"].value :
			initialPath = os.path.abspath( args["initialPath"].value )
			browser.pathChooser().getPath().setFromString( initialPath )
		
		# centre the window on the primary screen at 3/4 size.
		## \todo Implement save/restore of geometry, and do all this without using Qt APIs
		# in the app itself.
		desktop = QtGui.QApplication.instance().desktop()
		geometry = desktop.availableGeometry()
		adjustment = geometry.size() / 8
		geometry.adjust( adjustment.width(), adjustment.height(), -adjustment.width(), -adjustment.height() )
		self.__window._qtWidget().setGeometry( geometry )
		
		self.__window.setVisible( True )
		
		GafferUI.EventLoop.mainEventLoop().start()		
				
		return 0
Beispiel #2
0
	def _run( self, args ) :
	
		self.root()["scripts"]["script1"] = Gaffer.ScriptNode()
		
		with GafferUI.Window( "Gaffer Browser" ) as window :
			browser = GafferUI.BrowserEditor( self.root()["scripts"]["script1"] )
		
		if args["initialPath"].value :
			initialPath = os.path.abspath( args["initialPath"].value )
			browser.pathChooser().getPath().setFromString( initialPath )
					
		window.setVisible( True )
		
		GafferUI.EventLoop.mainEventLoop().start()		
				
		return 0
Beispiel #3
0
    def _run(self, args):

        self.root()["scripts"]["script1"] = Gaffer.ScriptNode()

        with GafferUI.Window("Gaffer Browser") as window:
            browser = GafferUI.BrowserEditor(self.root()["scripts"]["script1"])

        if args["initialPath"].value:
            initialPath = os.path.abspath(args["initialPath"].value)
            browser.pathChooser().getPath().setFromString(initialPath)

        # s = window._qtWidget().size()
        # s.setHeight(768)
        # s.setWidth(1024)
        # window._qtWidget().resize( s )

        window._qtWidget().setMinimumSize(1024, 768)
        window.setVisible(True)

        GafferUI.EventLoop.mainEventLoop().start()

        return 0