Exemplo n.º 1
0
 def __init__(self):
     self._menu =  QMenu("Clean Project")
     self._removeUnusedAction = createMenuAction("Remove Unused Clips", self.removeUnusedClips)
     self._removeOfflineMediaAction = createMenuAction("Remove Offline Media", self.removeOfflineClips)
     self._removeEmptyBinsAction = createMenuAction("Remove Empty Bins", self.removeEmptyBinsAction)
     self._menu.addAction(self._removeUnusedAction)
     self._menu.addAction(self._removeOfflineMediaAction)
     self._menu.addAction(self._removeEmptyBinsAction)
     hiero.core.events.registerInterest("kShowContextMenu/kBin", self.eventHandler)
 def __init__(self):
     self._menu = QMenu("Clean Project")
     self._removeUnusedAction = createMenuAction("Remove Unused Clips",
                                                 self.removeUnusedClips)
     self._removeOfflineMediaAction = createMenuAction(
         "Remove Offline Media", self.removeOfflineClips)
     self._removeEmptyBinsAction = createMenuAction(
         "Remove Empty Bins", self.removeEmptyBinsAction)
     self._menu.addAction(self._removeUnusedAction)
     self._menu.addAction(self._removeOfflineMediaAction)
     self._menu.addAction(self._removeEmptyBinsAction)
     hiero.core.events.registerInterest("kShowContextMenu/kBin",
                                        self.eventHandler)
Exemplo n.º 3
0
    def __init__(self):
        """
        A right-click menu that is added to the Hiero/Studio right-click menu
        """
        QtGui.QMenu.__init__(self, "Frame.io", None)
        hiero.core.events.registerInterest("kShowContextMenu/kBin", self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kSpreadsheet", self.eventHandler)

        self._actionUploadSelection = createMenuAction("Login...", self.showFrameIODialog, icon=os.path.join(gIconPath, "logo-unconnected.png"))
        self._showSelectionInFrameIOAction = createMenuAction("Open in Frame.io", self.openSelectedInFrameIO, os.path.join(gIconPath, "frameio.png"))
                                                                
        self.addAction(self._showSelectionInFrameIOAction)
        self.addAction(self._actionUploadSelection)
Exemplo n.º 4
0
 def __init__(self):
     QtGui.QMenu.__init__(self, "Frame.io", None)
     hiero.core.events.registerInterest("kShowContextMenu/kBin", self.eventHandler)
     self._actionUploadSelection = createMenuAction("Share to Frame.io...", 
                                                             self.FrameioUploadSelectionAction, 
                                                             icon=os.path.join(gIconPath + "logo-gray.png"))
     self.addAction(self._actionUploadSelection)
Exemplo n.º 5
0
  def __init__(self):
    self._addMarkerAction = createMenuAction("Add Marker", self.addMarkerToCurrentFrame)
    self._addMarkerAction.setShortcut( "M" )
    self._addMarkerAction.setObjectName("foundry.timeline.addMarker")
    registerAction(self._addMarkerAction)

    self._clearAllMarkersAction = createMenuAction("Clear All Markers", self.clearAllMarkers)
    self._clearAllMarkersAction.setObjectName("foundry.timeline.clearAllMarkers")
    registerAction(self._clearAllMarkersAction)

    self._clearMarkersInOutAction = createMenuAction("Clear Markers In/Out Range", self.clearMarkersInActiveRange)
    self._clearMarkersInOutAction.setObjectName("foundry.timeline.clearMarkersInOut")
    registerAction(self._clearMarkersInOutAction)

    hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
    hiero.core.events.registerInterest("kShowContextMenu/kViewer", self.eventHandler)
Exemplo n.º 6
0
    def __init__(self):
        self._menu = QMenu("Freeze Frame")
        self._menu.setIcon(QIcon("icons:TagSnow.png"))

        # This viewer action is a special case. It drills down to what shot is currently visible, regardless of shot selection
        self._currentFrameAction = createMenuAction(
            self.kCurrentFrame, self.addStillFromCurrentViewerFrame)
        self._currentFrameAction.setShortcut('Ctrl+0')

        # These are actions which you can access by selecting shots on the Timeline
        self._firstFrameAction = titleStringTriggeredAction(
            self.kFirstFrame, self.addStillForPosition, shortcut='Ctrl+1')
        self._middleFrameAction = titleStringTriggeredAction(
            self.kMiddleFrame, self.addStillForPosition, shortcut='Ctrl+2')
        self._lastFrameAction = titleStringTriggeredAction(
            self.kLastFrame, self.addStillForPosition, shortcut='Ctrl+3')

        # Add actions to the QMenu
        self._menu.addAction(self._currentFrameAction)
        self._menu.addAction(self._firstFrameAction)
        self._menu.addAction(self._middleFrameAction)
        self._menu.addAction(self._lastFrameAction)

        # Register for Timeline View and Viewer right-click menus
        hiero.core.events.registerInterest("kShowContextMenu/kTimeline",
                                           self.timelineEventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kViewer",
                                           self.viewerEventHandler)
Exemplo n.º 7
0
  def __init__(self):
      self._timecodeMenu = QtGui.QMenu("Timecode")

      # These actions in the viewer are a special case, because they drill down in to what is currrenly being
      self._copyTCAction = createMenuAction("Copy TC", self.copyTC)
      self._pasteTCAction = createMenuAction("Paste TC", self.pasteTC)
      self._pasteTCSpecialAction = createMenuAction("Paste TC Special...", self.pasteTCSpecial)
      self._setSrcInToFirstFrameOfClipAction = createMenuAction("Set srcIn to 1st frame of Clip", self.setSrcInToFirstFrameOfClip)
      self._resetOriginalTCAction = createMenuAction("Set srcIn to Original EDL TC", self.resetTC)

      self._timecodeMenu.addAction(self._copyTCAction)
      self._timecodeMenu.addAction(self._pasteTCAction)
      self._timecodeMenu.addAction(self._pasteTCSpecialAction)
      self._timecodeMenu.addAction(self._setSrcInToFirstFrameOfClipAction)
      self._timecodeMenu.addAction(self._resetOriginalTCAction)      

      hiero.core.events.registerInterest("kShowContextMenu/kSpreadsheet", self.eventHandler)
      hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
Exemplo n.º 8
0
  def __init__(self):
    registerInterest("kShowContextMenu/kBin", self.binViewEventHandler)
    registerInterest("kShowContextMenu/kSpreadsheet", self.eventHandler)
    registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
    self._tagReportMenu = QMenu('CSV Tag Report')
    self.exportAllReportAction = createMenuAction("Export All", self.writeCSVReportForAllShotsInActiveSequence)
    self.exportTaggedReportAction = createMenuAction("Export All Tagged", self.writeCSVReportForTaggedShotsInActiveSequence)
    self.exportSelectedReportAction = createMenuAction("Export Selection", self.writeCSVReportForShotSelection)
    self.exportSelectedTaggedReportAction = createMenuAction("Export Selection Tagged", self.writeCSVReportForTaggedSelection)

    # By default, the Reporter will exclude the Nuke Tags (e.g. "Nuke Project File") added on export for instance.
    # To include these False, set includeNukeTags to True
    self.includeNukeTags = False   

    # Insert the actions to the Export CSV menu
    self._tagReportMenu.addAction(self.exportAllReportAction)
    self._tagReportMenu.addAction(self.exportTaggedReportAction)
    self._tagReportMenu.addAction(self.exportSelectedReportAction)
    self._tagReportMenu.addAction(self.exportSelectedTaggedReportAction)
Exemplo n.º 9
0
    def __init__(self):
        """
        A right-click menu that is added to the Hiero/Studio right-click menu
        """
        QtGui.QMenu.__init__(self, "Frame.io", None)
        hiero.core.events.registerInterest("kShowContextMenu/kBin",
                                           self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kTimeline",
                                           self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kSpreadsheet",
                                           self.eventHandler)

        self._actionUploadSelection = createMenuAction(
            "Login...",
            self.showFrameIODialog,
            icon=os.path.join(gIconPath, "logo-unconnected.png"))
        self._showSelectionInFrameIOAction = createMenuAction(
            "Open in Frame.io", self.openSelectedInFrameIO,
            os.path.join(gIconPath, "frameio.png"))

        self.addAction(self._showSelectionInFrameIOAction)
        self.addAction(self._actionUploadSelection)
    def __init__(self):
        self._timecodeMenu = QtGui.QMenu("Timecode")

        # These actions in the viewer are a special case, because they drill down in to what is currrenly being
        self._copyTCAction = createMenuAction("Copy TC", self.copyTC)
        self._pasteTCAction = createMenuAction("Paste TC", self.pasteTC)
        self._pasteTCSpecialAction = createMenuAction("Paste TC Special...",
                                                      self.pasteTCSpecial)
        self._setSrcInToFirstFrameOfClipAction = createMenuAction(
            "Set srcIn to 1st frame of Clip", self.setSrcInToFirstFrameOfClip)
        self._resetOriginalTCAction = createMenuAction(
            "Set srcIn to Original EDL TC", self.resetTC)

        self._timecodeMenu.addAction(self._copyTCAction)
        self._timecodeMenu.addAction(self._pasteTCAction)
        self._timecodeMenu.addAction(self._pasteTCSpecialAction)
        self._timecodeMenu.addAction(self._setSrcInToFirstFrameOfClipAction)
        self._timecodeMenu.addAction(self._resetOriginalTCAction)

        hiero.core.events.registerInterest("kShowContextMenu/kSpreadsheet",
                                           self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kTimeline",
                                           self.eventHandler)
Exemplo n.º 11
0
    def __init__(self):
        self._addMarkerAction = createMenuAction("Add Marker",
                                                 self.addMarkerToCurrentFrame)
        self._addMarkerAction.setShortcut("Alt+Shift+M")
        self._addMarkerAction.setObjectName("foundry.timeline.addMarker")
        registerAction(self._addMarkerAction)

        self._clearAllMarkersAction = createMenuAction("Clear All Markers",
                                                       self.clearAllMarkers)
        self._clearAllMarkersAction.setObjectName(
            "foundry.timeline.clearAllMarkers")
        registerAction(self._clearAllMarkersAction)

        self._clearMarkersInOutAction = createMenuAction(
            "Clear Markers In/Out Range", self.clearMarkersInActiveRange)
        self._clearMarkersInOutAction.setObjectName(
            "foundry.timeline.clearMarkersInOut")
        registerAction(self._clearMarkersInOutAction)

        hiero.core.events.registerInterest("kShowContextMenu/kTimeline",
                                           self.eventHandler)
        hiero.core.events.registerInterest("kShowContextMenu/kViewer",
                                           self.eventHandler)
    def __init__(self):
        registerInterest("kShowContextMenu/kBin", self.binViewEventHandler)
        registerInterest("kShowContextMenu/kSpreadsheet", self.eventHandler)
        registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
        self._tagReportMenu = QMenu('CSV Tag Report')
        self.exportAllReportAction = createMenuAction(
            "Export All", self.writeCSVReportForAllShotsInActiveSequence)
        self.exportTaggedReportAction = createMenuAction(
            "Export All Tagged",
            self.writeCSVReportForTaggedShotsInActiveSequence)
        self.exportSelectedReportAction = createMenuAction(
            "Export Selection", self.writeCSVReportForShotSelection)
        self.exportSelectedTaggedReportAction = createMenuAction(
            "Export Selection Tagged", self.writeCSVReportForTaggedSelection)

        # By default, the Reporter will exclude the Nuke Tags (e.g. "Nuke Project File") added on export for instance.
        # To include these False, set includeNukeTags to True
        self.includeNukeTags = False

        # Insert the actions to the Export CSV menu
        self._tagReportMenu.addAction(self.exportAllReportAction)
        self._tagReportMenu.addAction(self.exportTaggedReportAction)
        self._tagReportMenu.addAction(self.exportSelectedReportAction)
        self._tagReportMenu.addAction(self.exportSelectedTaggedReportAction)
Exemplo n.º 13
0
  def __init__(self):
      self._menu = QMenu("Freeze Frame")
      self._menu.setIcon(QIcon("icons:TagSnow.png"))

      # This viewer action is a special case. It drills down to what shot is currently visible, regardless of shot selection
      self._currentFrameAction  = createMenuAction(self.kCurrentFrame, self.addStillFromCurrentViewerFrame)
      self._currentFrameAction.setShortcut('Ctrl+0')

      # These are actions which you can access by selecting shots on the Timeline
      self._firstFrameAction = titleStringTriggeredAction(self.kFirstFrame, self.addStillForPosition,shortcut='Ctrl+1')
      self._middleFrameAction = titleStringTriggeredAction(self.kMiddleFrame, self.addStillForPosition,shortcut='Ctrl+2')
      self._lastFrameAction = titleStringTriggeredAction(self.kLastFrame, self.addStillForPosition,shortcut='Ctrl+3')
      
      # Add actions to the QMenu
      self._menu.addAction(self._currentFrameAction)    
      self._menu.addAction(self._firstFrameAction)
      self._menu.addAction(self._middleFrameAction)
      self._menu.addAction(self._lastFrameAction)

      # Register for Timeline View and Viewer right-click menus
      hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.timelineEventHandler)
      hiero.core.events.registerInterest("kShowContextMenu/kViewer", self.viewerEventHandler)
Exemplo n.º 14
0
 def __init__(self):
     self._PowerEditToolShowAction = createMenuAction("Power Edit", self.doit)
     hiero.core.events.registerInterest("kShowContextMenu/kTimeline", self.eventHandler)
Exemplo n.º 15
0
        if s is None:
            s = ()  # We disable on empty selection.
            enabled = False
        else:
            # Ignore transitions from the selection
            self.selectedTrackItems = [
                item for item in s
                if isinstance(item, (hiero.core.TrackItem,
                                     hiero.core.SubTrackItem))
            ]

        self._PowerEditToolShowAction.setEnabled(enabled)
        event.menu.addAction(self._PowerEditToolShowAction)


# Add the Action
a = PowerEditToolAction()

# Grab Hiero's MenuBar
M = menuBar()

# Add a Menu to the MenuBar
ToolsMenu = M.addMenu('Tools')
# Create a new QAction
showPowerEditToolDialogAction = createMenuAction('Power Edit',
                                                 a.doitGetSelection)
showPowerEditToolDialogAction.setShortcut(QKeySequence('Ctrl+Shift+X'))

# Add the Action to your Nuke Menu
ToolsMenu.addAction(showPowerEditToolDialogAction)
Exemplo n.º 16
0
 def __init__(self):
     self._PowerEditToolShowAction = createMenuAction(
         "Power Edit", self.doit)
     hiero.core.events.registerInterest("kShowContextMenu/kTimeline",
                                        self.eventHandler)
Exemplo n.º 17
0
  def eventHandler(self, event):
    self.selectedTrackItems = []
    s = event.sender.selection()
    if len(s)>1:
      enabled = False
    enabled = True
    if s is None:
      s = () # We disable on empty selection.
      enabled = False
    else:
      # Ignore transitions from the selection
      self.selectedTrackItems = [item for item in s if isinstance(item, (hiero.core.TrackItem, hiero.core.SubTrackItem))]

    self._PowerEditToolShowAction.setEnabled(enabled)
    event.menu.addAction(self._PowerEditToolShowAction)

# Add the Action
a = PowerEditToolAction()

# Grab Hiero's MenuBar
M = menuBar()

# Add a Menu to the MenuBar
ToolsMenu = M.addMenu('Tools')
# Create a new QAction
showPowerEditToolDialogAction = createMenuAction('Power Edit', a.doitGetSelection)
showPowerEditToolDialogAction.setShortcut(QKeySequence('Ctrl+Shift+X'))

# Add the Action to your Nuke Menu
ToolsMenu.addAction(showPowerEditToolDialogAction)