@ -917,6 +917,8 @@ class Data(template.engine.sequencer.Score):
return False
for block in startBlock . linkedContentBlocks : #all linked blocks in all tracks, including currentBlock. All blocks are unique. The content is not.
if not block . parentTrack :
continue #hotfix 2022-08-05. It was "None" . #TODO maybe from deleting a link previously that was in multiple tracks?
blockIndex = block . parentTrack . blocks . index ( block )
try :
followUpBlock = block . parentTrack . blocks [ blockIndex + 1 ]
@ -1006,7 +1008,7 @@ class Data(template.engine.sequencer.Score):
newLeft . name = block . name
newLeft . minimumInTicks = block . minimumInTicks / 2
assert newLeftId in Block . allBlocks
assert newLeft . parentTrack is block . parentTrack
#assert newLeft.parentTrack is block.parentTrack #that is just not true. We have linked blocks in other tracks as well.
assert newLeft in protoBlockLeft . linkedContentBlocks
newRight = protoBlockRight . contentLink ( )
@ -1014,7 +1016,7 @@ class Data(template.engine.sequencer.Score):
newRight . name = block . name
newRight . minimumInTicks = newLeft . minimumInTicks
assert newRightId in Block . allBlocks
assert newRight . parentTrack is block . parentTrack
#assert newRight.parentTrack is block. parentTrack
assert newRight in protoBlockRight . linkedContentBlocks
positionToInsert = blockOrder . index ( id ( block ) )
@ -1088,9 +1090,9 @@ class Data(template.engine.sequencer.Score):
Each object controls what it exports . Overrides are possible at every level .
"""
tempoStaff = self . tempoTrack . lilypond ( ) if " metronome " in self . metaData and self . metaData [ " metronome " ] else " "
data = { track : track . lilypond ( ) for track in self . tracks } #processed in the lilypond module
data = { track : track . lilypond ( ) for track in self . tracks if not track . zeroLogicalDuration ( ) } #processed in the lilypond module
#the template file name is in metadata, but it can be empty or not existient
#From Template has direct access to the score metadata and WILL destructively modify it's own parameters, like the lilypond template entry.
#From Template has direct access to the score metadata and WILL destructively modify it's own parameters, like the " lilypond template" entry itself .
return fromTemplate ( session = self . parentSession , data = data , meta = self . metaData , tempoStaff = tempoStaff )