Esempio n. 1
0
	def getClipID(self, clipLocation: DeckLocation, deckID: int = None):
		(layerNumber, clipNumber) = clipLocation
		if deckID is None:
			deckState = self.selectedDeckState
		else:
			deckState = self.decks[deckID]['state']

		return intIfSet(deckState[layerNumber, clipNumber])
Esempio n. 2
0
 def GetSaveState(self):
     return {
         layerID: {
             'Layername': layer.par.Layername.eval(),
             'Nextlayerid': intIfSet(layer.par.Nextlayerid.eval())
         }
         for layerID, layer in self.layers.items()
     }
Esempio n. 3
0
    def SetClip(self, layerNumber, clipID: int):
        layer = self.getLayerByOrder(layerNumber)

        previousClipID = intIfSet(layer.par.Clipid.val)
        layer.par.Clipid = clipID

        if clipID is not None:
            self.clipCtrl.ActivateClip(clipID)

        if previousClipID is not None and previousClipID != clipID:
            self.clipCtrl.DeactivateClip(previousClipID)
Esempio n. 4
0
def getSourceID(effectOp):
    return intIfSet(effectOp.par.Sourceeffectid.eval()) if effectOp else None
Esempio n. 5
0
 def headEffectID(self):
     return intIfSet(self.ownerComponent.par.Headeffectid.eval())
Esempio n. 6
0
def test_intIfSet():
    assert intIfSet('4') == 4
    assert intIfSet('') is None
    assert intIfSet(0) == 0