[JW Lua] Metrics problem with SmartShapes that go past several measures
Jan Angermüller
jan at angermueller.com
Sat Jun 28 19:46:56 CEST 2014
Jari,
busy with some metrics beta testing today...
When reading metrics from hairpins that go past measure boundaries (e.g.
2 measures),
I can't read the right position from the hairpin. It always returns false.
Reading the values from hairpins within one measure, works fine,
also reading the left value works fine.
This is the test script that prints the left and right position
of cresc./dim. hairpins in the selected region:
local region = finenv.Region()
local marks = finale.FCSmartShapeMeasureMarks()
marks:LoadAllForRegion(region)
for mark in each(marks) do
local leftpoint=finale.FCPoint(1,1)
local rightpoint=finale.FCPoint(1,1)
local smartshape = mark:CreateSmartShape()
if (smartshape:GetShapeType() == finale.SMARTSHAPE_CRESCENDO)
or (smartshape:GetShapeType() == finale.SMARTSHAPE_DIMINUENDO) then
print(smartshape:CalcLeftCellMetricPos(leftpoint),
smartshape:CalcRightCellMetricPos(rightpoint),
"Left:",leftpoint.X,
"Right:",rightpoint.X)
end
end
For the attached screenshot, it prints:
true true Left: 2631 Right: 2786 -- first cresc.
true true Left: 3601 Right: 3703 -- second cresc.
true *false *Left: 4306 Right: 1 -- third cresc.
true *false *Left: 4306 Right: 1 -- duplicate entry of third
cresc. (will be omitted, when calling marks:LoadAllForRegion(region,true) )
I get the same result from the Finale default document
with no no entries, except a cresc. over two measures.
Any hints ? Looks like a bug for me.
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20140628/fbb39863/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smartshape metrics.jpg
Type: image/jpeg
Size: 19775 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20140628/fbb39863/attachment.jpg>
More information about the JWLua
mailing list