Beispiel #1
0
    def getMarkersFromShotEdit(self):
        """Returns a list of all the markers in the current shotEdit

        :return: list of markers' shotLabels
        """
        markerRecipes = []
        markers = []
        xml = self.getShotEdit()
        if xml == 0:
            log('TestInfo: cannot find panels in shot edit (xml not found).', 'error')
            return markers
        tree = ET.parse(xml)
        root = tree.getroot()

        for shot in root.findall('Shot'):
            recipe = shot.get('recipeLabelName').split('[')[0]
            # if '_marker_' in recipe:
            #     markerRecipes.append(recipe)
            if self.getPanelBeat(recipe) == 'marker':
                markerRecipes.append(recipe)

        # Read shotLabel from multitrack
        for markerRecipe in markerRecipes:
            multitrack = self.getPanelMultitrack(markerRecipe)
            shotLabel = pyUtils.parseMultitrack(multitrack, 'Pose', 'dialogue')
            markers.append(shotLabel)

        log('TestInfo: getMarkersFromShotEdit: %s' % markers, 'debug')
        return markers
Beispiel #2
0
    def getPanelDialogue(self, panel):
        """Gets dialogue from given panel's multitrack

        :param panel: Panel recipe name (e.g. "flix_p_0001_v1")
        :return: str: Dialogue found in the multitrack
        """
        dialogue = "Multitrack not found for panel %s" % panel
        multitrack = self.getPanelMultitrack(panel)
        if os.path.exists(multitrack):
            dialogue = pyUtils.parseMultitrack(multitrack, "Pose", "dialogue")
        return dialogue
Beispiel #3
0
    def getPanelPoseFromMultitrack(self, panel):
        """Gets the path to the given panel's pose file based on the information coming from its multitrack

        :param panel: Panel recipe name (e.g. 'flx_p_0001_v1')
        :return: str: Path to the panel's pose file
        """
        multitrack = self.getPanelMultitrack(panel)
        if os.path.exists(multitrack):
            poseLabel = pyUtils.parseMultitrack(multitrack, "Properties", "poseLabel")
            poseExtension = pyUtils.parseMultitrack(multitrack, "Properties", "poseFileExtension")
            poseFileName = "%s%s" % (poseLabel, poseExtension)
        else:
            return 0
        if self.isPanelAnimated(panel):
            poseFileName = poseFileName.replace("_0001", ".0001")
        poseFile = "%s/%s" % (self.getPoseDir(panel), poseFileName)
        if os.path.exists(poseFile):
            return poseFile
        else:
            log("Could not find pose file: %s" % poseFile, "error")
            return 0