Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathexpression_reset_positioning.lua
More file actions
Latest commit
28 lines (25 loc) · 1.13 KB
/
Copy pathexpression_reset_positioning.lua
File metadata and controls
28 lines (25 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
functionplugindef()
finaleplugin.Author="Robert Patterson"
finaleplugin.Copyright="CC0 https://creativecommons.org/publicdomain/zero/1.0/"
finaleplugin.Version="1.1.1"
finaleplugin.Date="March 20, 2021"
finaleplugin.CategoryTags="Expression"
finaleplugin.RequireSelection=true
return"Reset Expression Positions", "Reset Expression Positions", "Resets the assignment position of all selected single-staff expressions."
end
locallibrary=require("library.general_library")
localexpression=require("library.expression")
functionexpression_reset_positioning()
localcurrent_part=library.get_current_part()
localexpressions=finale.FCExpressions()
expressions:LoadAllForRegion(finenv.Region())
forexp_assignineach(expressions) do
if0==exp_assign.StaffListIDthen-- note: IsSingleStaffAssigned() appears to be not 100% accurate for exps with staff lists
ifexpression.is_for_current_part(exp_assign, current_part) then
exp_assign:ResetPos()
exp_assign:Save()
end
end
end
end
expression_reset_positioning()