[JW Lua] Changing noteheads in FCPercussionLayoutNotes problem ... cont'd

Jari Williamsson jari.williamsson at mailbox.swipnet.se
Sun Nov 29 22:20:02 CET 2015


Jan,

It's very likely that the FCUI:RedrawDocument() method does something 
else than selecting the "Redraw Screen" item from the "View" menu. I'll 
add a
MENUCMD_REDRAWSCREEN command for the next beta.


Best regards,

Jari Williamsson


On 2015-11-26 15:40, Jan Angermüller wrote:
> Jari,
>
> I am still struggling with this problem (changing percussion noteheads,
> see description below in the mail from April). In a modified script
> dragging the screen (mouse+right button) or pressing Ctrl+D (Redraw
> Screen) after running the script now solves the problem. In the old
> script below dragging or Ctrl+D didn't solve the problem.
> But I found no solution that the script itself delivers the right output.
>
> Even if I put
> finenv.UI():RedrawDocument()
> at the end of the script, it doesn't change anything. The percussion
> noteheads still looked messed up.
> Is there a difference between finenv.UI():RedrawDocument()at the end of
> the script and pressing Ctrl+D after running the plug-in ?
> Would it be possible to add the menu command MENUCMD_REDRAWDOCUMENT to
> achieve the same behaviour ?
> Attached is another screenshot of how the percussion noteheads that were
> changed from asci coding to SMuFl look right after running the plug-in
> and then (correct) after pressing Ctrl-D.
>
> Jan
>
> Am 02.04.2015 um 19:28 schrieb Jan Angermüller:
>> Jari,
>>
>> when changing the notehead symbols in a percussion layout,
>> I have the problem that the noteheads are changed in the
>> percussion layout table, but not automatically updated in the score.
>>
>> Now the strange thing: when I press "Undo" and then "Re-do" after
>> running the script, the changed noteheads appear in the score.
>> It seems to me that there is an update function missing internally
>> in JW Lua that the Finale Re-do function seems to call.
>>
>> See script below and this youtube screencam video
>> which demonstrates the behaviour in realtime: http://youtu.be/_Oo4fLq7qiE
>> In the video I first show how the percussion layout looks before,
>> then I run the script, then I undo and re-do it. Then the changed x
>> noteheads appear.
>>
>> They also do appear when I open the percussion layout dialog after
>> running the script
>> and click on ok without changing anything. Clicking ok applies the
>> selected percussion layout once more.
>> Simply pressing on CTRL-U or CTRL-D doesn't help.
>>
>> Any clues what might be wrong here ?
>>
>> Best regards,
>> Jan
>>
>> To run the script, *f**irst select a percussion staff* *with a
>> percussion layout attached *(i.e. a staff that is set to "Notation
>> Style: Percussion"):
>>
>> local percstaff=finale.FCStaff()
>> percstaff:Load(finenv.Region().StartStaff) --load selected percussion
>> staff
>> if percstaff:IsPercussion() then
>>     local perclayoutID = percstaff:CalcPercussionLayoutID()
>>     local perclayout=finale.FCPercussionLayoutNotes()
>>     perclayout:LoadAllForItem(perclayoutID)
>>     if perclayout~=nil then
>>         for layoutnote in each(perclayout) do
>>             layoutnote:SetClosedNotehead(string.byte("x")) --set all
>> closed noteheads to "x"
>>             layoutnote:Save()
>>         end
>>     end
>> end
>>
>>
>> _______________________________________________
>> JWLua mailing list
>> JWLua at jwmusic.nu
>> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
>






More information about the JWLua mailing list