[JW Lua] Last rest of measure disappearing after swapping the layer
Jan Angermüller
jan at angermueller.com
Tue Nov 14 13:01:57 CET 2017
Jari,
there seems to be a bug when swapping layers via FCNoteEntryLayer, if
one layer is empty and there is a "next" measure that has notes on both
swapped layers. Then the last rest in the swapped layer _disappears
_during the next eachentrysaved-call.
Attached is the test document for the script below which was created
directly from the default document (so no messed up files problem).
The last rest in measure 1 disappears when I run the script - only
when I remove the rest in m.3 it doesn't disappear:
https://youtu.be/SAg4ueohNaw
It wouldn't disappear either, if measure 1 had notes on layer 1.
No real workaround for this so far.
Any news on planned JW Lua updates?
Best,
Jan
local region=finale.FCMusicRegion()
region:SetFullDocument()
local noteentrylayer = finale.FCNoteEntryLayer(1,1,1,1)
noteentrylayer:Load()
noteentrylayer.LayerIndex=0
local noteentrylayer2 = finale.FCNoteEntryLayer(0,1,1,1)
noteentrylayer2:Load()
noteentrylayer2.LayerIndex=1
noteentrylayer:Save()
--noteentrylayer2:Save()
for e in eachentrysaved(region) do --should do nothing, but actually the
rest disappears after this call
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20171114/41fc0b6d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swap layer rest disappears.mus
Type: application/octet-stream
Size: 19001 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20171114/41fc0b6d/attachment.obj>
More information about the JWLua
mailing list