data=next(blforblinchord.parentBlocks).data#just take any block. data is shared between all of them. Content linked data was removed from the selection
iffirstBlock.dataissecondBlock.data:#content link of itself in succession. Very common usecase, but not compatible with merging.
iffirstBlock.dataissecondBlock.data:#content link of itself in succession. Very common usecase, but not compatible with merging.
#print ("content link follows itself")
logging.info("CC Block merge aborted: content link follows itself")
returnFalse
returnFalse
elifnotself.blocks.index(firstBlock)+1==self.blocks.index(secondBlock):#all first blocks must be followed directly by a content link of the second block. linkedContentBlocksInScore() returns a blocklist in order so we can compare.
elifnotself.blocks.index(firstBlock)+1==self.blocks.index(secondBlock):#all first blocks must be followed directly by a content link of the second block. linkedContentBlocksInScore() returns a blocklist in order so we can compare.
#print ("not all blocks-pairs are next to each other")
logging.info("CC Block merge aborted: not all content link blocks-pairs are next to each other")
returnFalse
returnFalse
#Test complete without exit. All blocks can be paired up.
#Test complete without exit. All blocks can be paired up.
firstBlock._duration=[newFirstBlockDuration,]#Duration is content linked. if we use the setter it will create the wrong sum. Force the new duration instead.
self.deleteBlock(secondBlock)
returnstartDurationToReturnForUndo
defdeleteBlock(self,graphBlock):
defdeleteBlock(self,graphBlock):
"""at least one block. If you want to delete the track
"""at least one block. If you want to delete the track