User Tools

Site Tools


jwlua:fullscripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
jwlua:fullscripts [2013/09/03 08:25]
jariw [Create Tacet]
jwlua:fullscripts [2013/09/24 18:08]
jariw
Line 98: Line 98:
    -- This function and the '​finaleplugin'​ namespace    -- This function and the '​finaleplugin'​ namespace
    -- are both reserved for the plug-in definition.    -- are both reserved for the plug-in definition.
-   ​finaleplugin.Author = "Jari Williamsson"​ 
    ​finaleplugin.RequireSelection = true    ​finaleplugin.RequireSelection = true
    ​finaleplugin.CategoryTags = "​Layout,​ Measure, Rest"    ​finaleplugin.CategoryTags = "​Layout,​ Measure, Rest"
Line 120: Line 119:
 end end
  
--- Delete all old mm rests from the part+local region = finenv.Region() 
 + 
 +-- Delete all old mm rests from the region
 -- (In this case, it's safe to delete from the start, since no relocation of data records takes place.) -- (In this case, it's safe to delete from the start, since no relocation of data records takes place.)
 local mmrests = finale.FCMultiMeasureRests() local mmrests = finale.FCMultiMeasureRests()
 mmrests:​LoadAll() mmrests:​LoadAll()
 for mm in each (mmrests) do for mm in each (mmrests) do
-    mm:​DeleteData()+    ​if region:​IsMeasureIncluded(mm.StartMeasure) or region:​IsMeasureIncluded(mm.EndMeasure) then         
 +        ​mm:​DeleteData() 
 +    end
 end end
-     + 
-local region = finenv.Region()+
 local mm = finale.FCMultiMeasureRest() local mm = finale.FCMultiMeasureRest()
 mm.StartMeasure = region.StartMeasure mm.StartMeasure = region.StartMeasure
Line 143: Line 145:
 mm.UseSymbolsLessThan = mmrestprefs.UseSymbolsLessThan mm.UseSymbolsLessThan = mmrestprefs.UseSymbolsLessThan
 mm.Width = mmrestprefs.Width mm.Width = mmrestprefs.Width
--- Create a new mm rest for the whole selected region +mm:​Save()</​code>​
--- (it will be saved at the start measure position) +
-mm:Save() +
-</​code>​+
jwlua/fullscripts.txt · Last modified: 2013/10/08 08:06 by jariw