Пример #1
0
def _explodeClicked():
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral import coralApp
    
    sel = NodeEditor.selectedNodes()
    if sel:
        coralApp.executeCommand("ExplodeCollapsedNode", collapsedNode = sel[0].fullName())
Пример #2
0
def _explodeClicked():
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral import coralApp
    
    sel = NodeEditor.selectedNodes()
    if sel:
        coralApp.executeCommand("ExplodeCollapsedNode", collapsedNode = sel[0].fullName())
Пример #3
0
def _saveCollapsedNodeClicked():
    from coral import coralApp
    from coral.coralUi.mainWindow import MainWindow
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    
    filename = MainWindow.saveFileDialog("save collapsed node", "Coral CollapsedNode (*.py)")
    sel = NodeEditor.selectedNodes()
    if filename and sel:
        coralApp.saveCollapsedNodeFile(sel[0], filename)
Пример #4
0
def _saveCollapsedNodeClicked():
    from coral import coralApp
    from coral.coralUi.mainWindow import MainWindow
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    
    filename = MainWindow.saveFileDialog("save collapsed node", "Coral CollapsedNode (*.py)")
    sel = NodeEditor.selectedNodes()
    if filename and sel:
        coralApp.saveCollapsedNodeFile(sel[0], filename)
Пример #5
0
def _collapseClicked():
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral import coralApp
    
    nodesName = []
    for node in NodeEditor.selectedNodes():
        nodesName.append(node.fullName())
    
    if nodesName:
        coralApp.executeCommand("CollapseNodes", nodes = nodesName)
Пример #6
0
def _collapseClicked():
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral import coralApp

    nodesName = []
    for node in NodeEditor.selectedNodes():
        nodesName.append(node.fullName())

    if nodesName:
        coralApp.executeCommand("CollapseNodes", nodes=nodesName)
Пример #7
0
def apply():
    #imports here to avoid cycles
    from coral.coralUi import coralUi
    from coral.coralUi.mainWindow import MainWindow
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral.coralUi.nodeBox import NodeBox
    from coral.coralUi.nodeInspector.nodeInspector import NodeInspector
    from coral.coralUi.scriptEditor import ScriptEditor
    from coral.coralUi.viewport import ViewportWidget
    from coral.coralUi.visualDebugger import VisualDebugger
    
    coralUi.application().setApplicationName("coralMaya")
    
    mainWin = MainWindow.globalInstance()
    mainWin.setWindowTitle("coralMaya")
    
    nodeBox = NodeBox(mainWin)
    nodeBoxDock = mainWin.dockWidget(nodeBox, QtCore.Qt.LeftDockWidgetArea)
    
    nodeEditor = NodeEditor(mainWin)
    mainWin.setCentralWidget(nodeEditor)
    nodeEditor.nodeView().centerOn(0.0, 0.0)
    
    nodeInspector = NodeInspector(mainWin)
    mainWin.dockWidget(nodeInspector, QtCore.Qt.RightDockWidgetArea)
    
    mainWin.registerWidget("node editor", NodeEditor)
    mainWin.registerWidget("node box", NodeBox)
    mainWin.registerWidget("node inspector", NodeInspector)
    mainWin.registerWidget("viewport", ViewportWidget)
    mainWin.registerWidget("script editor", ScriptEditor)
    mainWin.registerWidget("visual debugger", VisualDebugger)
    
    # menu config
    fileMenu = mainWin.menuBar().addMenu("File")
    fileMenu.addAction("Clear All...", _clearAllClicked)
    fileMenu.addAction("Save Netwok...", _saveNetworkClicked)
    fileMenu.addAction("Open Network...", _openNetworkClicked)
    fileMenu.addSeparator()
    fileMenu.addAction("Save CollapsedNode...", _saveCollapsedNodeClicked)
    
    editMenu = mainWin.menuBar().addMenu("Edit")
    editMenu.addAction("Collpase Nodes", _collapseClicked)
    editMenu.addAction("Explode Collapsed Node", _explodeClicked)
    editMenu.addSeparator()
    
    windowMenu = mainWin.menuBar().addMenu("Window")
    windowMenu.addAction("About", _aboutClicked)
    windowMenu.addAction("Open Node Editor", _openNodeEditorClicked)
    windowMenu.addAction("Open Node Box", _openNodeBoxClicked)
    windowMenu.addAction("Open Node Inspector", _openNodeInspectorClicked)
    windowMenu.addAction("Open Script Editor", _openScriptEditorClicked)
    windowMenu.addAction("Open Viewport", _openViewportClicked)
    windowMenu.addAction("Open Visual Debugger", _openVisualDebuggerClicked)
    
    # shortcuts
    shprtcutsMap = {
        "Shift+G": _explodeClicked,
        "G": _collapseClicked,
        "Ctrl+S": _saveNetworkClicked,
        "Ctrl+O": _openNetworkClicked,
        "Ctrl+X": _clearAllClicked,
        "Tab": _nodeBoxSearch}
    
    mainWin.setShortcutsMap(shprtcutsMap)
    
    mainWin.restoreSettings()
    
    from coral import coralApp
    coralApp.logInfo("running " + mainWin.windowTitle())
Пример #8
0
def apply():
    #imports here to avoid cycles
    from coral.coralUi import coralUi
    from coral.coralUi.mainWindow import MainWindow
    from coral.coralUi.nodeEditor.nodeEditor import NodeEditor
    from coral.coralUi.nodeBox import NodeBox
    from coral.coralUi.nodeInspector.nodeInspector import NodeInspector
    from coral.coralUi.scriptEditor import ScriptEditor
    from coral.coralUi.viewport import ViewportWidget
    from coral.coralUi.visualDebugger import VisualDebugger

    mainWin = MainWindow.globalInstance()
    mainWin.setWindowTitle("coral standalone")

    settingsStored = mainWin.settings().value("settingsStored").toBool()
    if not settingsStored:
        nodeBox = NodeBox(mainWin)
        nodeBoxDock = mainWin.dockWidget(nodeBox, QtCore.Qt.LeftDockWidgetArea)

        nodeInspector = NodeInspector(mainWin)
        mainWin.dockWidget(nodeInspector, QtCore.Qt.RightDockWidgetArea)

    nodeEditor = NodeEditor(mainWin)
    mainWin.setCentralWidget(nodeEditor)
    nodeEditor.nodeView().centerOn(0.0, 0.0)

    mainWin.registerWidget("node editor", NodeEditor)
    mainWin.registerWidget("node box", NodeBox)
    mainWin.registerWidget("node inspector", NodeInspector)
    mainWin.registerWidget("viewport", ViewportWidget)
    mainWin.registerWidget("script editor", ScriptEditor)
    mainWin.registerWidget("visual debugger", VisualDebugger)

    # menu config
    fileMenu = mainWin.menuBar().addMenu("File")
    fileMenu.addAction("Clear All...", _clearAllClicked)
    fileMenu.addAction("Save Netwok...", _saveNetworkClicked)
    fileMenu.addAction("Open Network...", _openNetworkClicked)
    fileMenu.addSeparator()
    fileMenu.addAction("Save CollapsedNode...", _saveCollapsedNodeClicked)

    editMenu = mainWin.menuBar().addMenu("Edit")
    editMenu.addAction("Collpase Nodes", _collapseClicked)
    editMenu.addAction("Explode Collapsed Node", _explodeClicked)
    editMenu.addSeparator()

    windowMenu = mainWin.menuBar().addMenu("Window")
    windowMenu.addAction("About", _aboutClicked)
    windowMenu.addAction("Open Node Editor", _openNodeEditorClicked)
    windowMenu.addAction("Open Node Box", _openNodeBoxClicked)
    windowMenu.addAction("Open Node Inspector", _openNodeInspectorClicked)
    windowMenu.addAction("Open Script Editor", _openScriptEditorClicked)
    windowMenu.addAction("Open Viewport", _openViewportClicked)
    windowMenu.addAction("Open Visual Debugger", _openVisualDebuggerClicked)

    # shortcuts
    shprtcutsMap = {
        "Shift+G": _explodeClicked,
        "Ctrl+S": _saveNetworkClicked,
        "Ctrl+O": _openNetworkClicked,
        "Shift+Tab": _nodeBoxSearch,
        "H": _toggleGrid
    }

    mainWin.setShortcutsMap(shprtcutsMap)

    mainWin.restoreSettings()

    mainWin.show()

    from coral import coralApp
    coralApp.logInfo("coral v" + coralApp.version())