Example #1
0
 def setupWindowTitle ( self ) :
   #
   self.setWindowTitle ( 'meShaderEd %s (%s) %s' % ( app_global_vars [ 'version' ], app_renderer.getCurrentPresetName(), app_global_vars [ 'ProjectPath' ]  ) )
   self.ui.dockNodes.setToolTip ( app_global_vars [ 'NodesPath' ] )
   self.ui.dockNodes.setStatusTip ( app_global_vars [ 'NodesPath' ] )
   self.ui.dockProject.setToolTip ( app_global_vars [ 'ProjectNetworks' ] )
   self.ui.dockProject.setStatusTip ( app_global_vars [ 'ProjectNetworks' ] )
Example #2
0
 def onRenderPresetChanged ( self ):
   #
   presetName = app_renderer.getCurrentPresetName()
   print ">> MainWindow: onRenderPresetChanged preset = %s" % presetName 
   self.setWindowTitle ( "meShaderEd (" + presetName + ")")
   app_settings.setValue ( 'defRenderer', presetName )
   
   app_global_vars[ 'Renderer' ] = app_renderer.getCurrentValue( 'renderer', 'name' )
   app_global_vars[ 'RendererFlags' ] = app_renderer.getCurrentValue( 'renderer', 'flags' ) 
   app_global_vars[ 'ShaderCompiler' ] = app_renderer.getCurrentValue( 'shader', 'compiler' ) 
   app_global_vars[ 'ShaderDefines' ] = app_renderer.getCurrentValue( 'shader', 'defines' ) 
   app_global_vars[ 'TEX' ] = app_renderer.getCurrentValue( 'texture', 'extension' )
   app_global_vars[ 'SLO' ] = app_renderer.getCurrentValue( 'shader', 'extension' )
Example #3
0
  def onRenderPresetChanged ( self ) :
    #
    presetName = app_renderer.getCurrentPresetName ()
    if DEBUG_MODE : print '>> MainWindow.onRenderPresetChanged preset = %s' % presetName
    #self.setWindowTitle ( 'meShaderEd %s (%s) %s' % ( app_global_vars [ 'version' ], presetName, app_global_vars [ 'ProjectNetworks' ] ) )
    app_settings.setValue ( 'defRenderer', presetName )

    app_global_vars [ 'RendererPreset' ] = presetName
    app_global_vars [ 'Renderer' ]       = app_renderer.getCurrentValue ( 'renderer', 'name' )
    app_global_vars [ 'RendererFlags' ]  = app_renderer.getCurrentValue ( 'renderer', 'flags' )
    app_global_vars [ 'ShaderCompiler' ] = app_renderer.getCurrentValue ( 'shader', 'compiler' )
    app_global_vars [ 'ShaderDefines' ]  = app_renderer.getCurrentValue ( 'shader', 'defines' )
    app_global_vars [ 'ShaderInfo' ]     = app_renderer.getCurrentValue ( 'shader', 'sloinfo' )
    app_global_vars [ 'TEX' ]            = app_renderer.getCurrentValue ( 'texture', 'extension' )
    app_global_vars [ 'SLO' ]            = app_renderer.getCurrentValue ( 'shader', 'extension' )
    app_global_vars [ 'TexMake' ]        = app_renderer.getCurrentValue ( 'texture', 'texmake' )
    self.setupWindowTitle ()
Example #4
0
 def __init__ ( self ) : 
   #
   QtGui.QMainWindow.__init__ ( self )
   
   # This is always the same
   self.ui = Ui_MainWindow ()
   self.ui.setupUi ( self )
   self.setupMenuBar ()
   self.setupPanels ()
   
   self.setWindowTitle ( "meShaderEd (" + app_renderer.getCurrentPresetName() + ")")
   
   self.activeNodeList = None
   self.workArea = None # current work area
   self.onNew () # create new document 
   
   grid_enabled = getDefaultValue( app_settings, 'WorkArea', 'grid_enabled' )
   grid_snap = getDefaultValue ( app_settings, 'WorkArea', 'grid_snap' )
   grid_size = int( getDefaultValue ( app_settings, 'WorkArea', 'grid_size' )  )
   reverse_flow = getDefaultValue ( app_settings, 'WorkArea', 'reverse_flow' )
   straight_links = getDefaultValue ( app_settings, 'WorkArea', 'straight_links' )
 
   #self.ui.workArea.gridSize = grid_size
   #self.ui.workArea.gridSnap = grid_snap
   self.workArea.drawGrid = grid_enabled
   #self.ui.workArea.reverseFlow = reverse_flow 
   #self.ui.workArea.straightLinks = straight_links
   
   self.ui.actionShowGrid.setChecked( grid_enabled )
   self.ui.actionSnapGrid.setChecked( grid_snap )
   self.ui.actionReverseFlow.setChecked( reverse_flow )
   self.ui.actionStraightLinks.setChecked( straight_links )
  
   self.ui.nodeList_ctl.setLibrary ( app_global_vars[ 'NodesPath' ] )
   self.ui.project_ctl.setLibrary ( app_global_vars[ 'ProjectNetworks' ] )
   
   QtCore.QObject.connect ( self.ui.nodeList_ctl.ui.nodeList, QtCore.SIGNAL( "setActiveNodeList" ), self.setActiveNodeList )
   QtCore.QObject.connect ( self.ui.project_ctl.ui.nodeList, QtCore.SIGNAL( "setActiveNodeList" ), self.setActiveNodeList )
   
   QtCore.QObject.connect ( self.ui.tabs, QtCore.SIGNAL( "currentChanged(int)" ), self.onTabSelected )
   QtCore.QObject.connect ( self.ui.tabs, QtCore.SIGNAL( "tabCloseRequested(int)" ), self.onTabCloseRequested )
   
   QtCore.QObject.connect ( self.ui.nodeParam_ctl, QtCore.SIGNAL( "nodeLabelChanged" ), self.onNodeLabelChanged  )
Example #5
0
 def onRenderSavePreset ( self ):
   #
   print ">> MainWindow: onRenderSavePreset  preset = %s" % app_renderer.getCurrentPresetName()
   app_renderer.saveSettings ()
Example #6
0
 def onRenderSavePreset ( self ) :
   #
   if DEBUG_MODE : print '>> MainWindow.onRenderSavePreset  preset = %s' % app_renderer.getCurrentPresetName()
   app_renderer.saveSettings ()