<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Jari,<br>
<br>
in addition to my "glissando positioning error" mail from two
weeks ago (see below), I can add:<br>
1.) I haven't solved the problem yet: a Lua-added glissando
smartshape always appears at a completely wrong position in the
score when all offsets are set to defaut (=0). But I found a
workaround: if I use custom offsets, I can navigate the glissando
to where I want them.<br>
<br>
2.) I noticed another issue with a Lua-added glissando smartshape.<br>
If it is a glissando "over system break", the
FCSmartShapeSegment.BreakOffsets don't work:<br>
a.) After the JW Lua creation of the glissando it appears "going
up to the sky" at the end of the system (see screenshot 1).<br>
But: when I grab it manually (no shifting, just clicking the
middle control point and releasing it), it suddenly appears
correctly.<br>
Is there a visual update flag missing ? (see screenshot 2)<br>
<br>
b.) It seems to be not possible to correct this in JW Lua code. I
can change the FCSmartShapeSegment.BreakOffset, but nothing
changes visually. <br>
Again a visual update flag missing ?<br>
<br>
Best regards,<br>
Jan<br>
<br>
<br>
<br>
Am 16.01.2015 um 12:05 schrieb Jan Angermüller:<br>
</div>
<blockquote cite="mid:54B8F088.7040909@angermueller.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
Jari,<br>
<br>
I haven't succeeded yet in adding a glissando smartshape at the
correct position.<br>
Probably it's the following sentence from
FCSmartShape:SaveNewEverything()<br>
that I am missing or that I don't understand:<br>
"For note-attached smart shapes, the frame collection that <br>
contains the entries need to be saved after the successful return
from this method."<br>
<br>
The code snippet is below. It creates a glissando between two half
notes<br>
in measure 1 on staff 1. The glissando does appear in the score
after the execution,<br>
but at the wrong position (see screenshot: it's placed far above
the staff).<br>
<br>
I tried to set as many properties as possible (Endpoints,
CtrlPoints, etc. - not all of them are required here, I know).<br>
But the glissando always appears at the <i>same </i>wrong
position - <br>
no matter which endpoint offsets I enter.<br>
<br>
I also tried it with FCNoteEntryCell and FCNoteEntryLayer instead
of eachentrysaved(),<br>
but that shouldn't and didn't make a difference.<br>
What's the possibly required call for "saving the frame
collection" after SaveNewEverything() ?<br>
Or is there a problem with the endpoint assignment ?<br>
I used JW Lua 0.29 / Finale 2014c / Windows 7.<br>
<br>
And another question in this context:<br>
I don't understand the meaning of "preset/custom" here.<br>
I thought that a glissando would be a preset shape as it is one of
the <a moz-do-not-send="true" class="el"
href="http://www.finaletips.nu/frameworkref/group__lua__classes.html#ga29b94a28426154f61cb5bf57d14a8b42">SMARTSHAPE_TYPES</a>.<br>
But it only appears as a glissando in the score, if I also set the
correct LineID which<br>
is defined as "Returns the line style ID for <i>custom </i>smart
shapes."<br>
So what is a preset / custom in this context ? And does
SetPresetShape(true) have any meaning here ?<br>
<br>
Thanks a lot for your hints in advance !<br>
<br>
Best regards,<br>
Jan<br>
<br>
<br>
for e in eachentrysaved(finenv.Region()) do<br>
if (e.MeasurePos==0) and (e.Measure==1) then --first note on
measure pos 0 in measure 1<br>
for e2 in eachentrysaved(finenv.Region()) do<br>
if (e2.MeasurePos==2048) and (e2.Measure==1) then
--second note on measure pos 2048 in measure 1<br>
<br>
--create glissando smartshape and attach it to e
and e2<br>
local smartshape = finale.FCSmartShape()<br>
smartshape:SetShapeType(finale.SMARTSHAPE_GLISSANDO) <br>
smartshape:SetEntryBased(true)<br>
smartshape:SetPresetShape(true) <br>
smartshape:SetVisible(true)<br>
smartshape:SetLineID(1)<br>
smartshape:SetEntryAttachedFlags(true)<br>
<br>
local leftseg =
smartshape:GetTerminateSegmentLeft()<br>
leftseg:SetMeasure(e.Measure)<br>
leftseg:SetStaff(e.Staff)<br>
leftseg:SetEndpointOffsetX(0)<br>
leftseg:SetEndpointOffsetY(0)<br>
leftseg:SetControlPoint1OffsetX(0)<br>
leftseg:SetControlPoint1OffsetY(0)<br>
leftseg:SetControlPoint2OffsetX(0)<br>
leftseg:SetControlPoint2OffsetY(0)<br>
<br>
local rightseg =
smartshape:GetTerminateSegmentRight()<br>
rightseg:SetMeasure(e2.Measure)<br>
rightseg:SetStaff(e2.Staff)<br>
rightseg:SetEndpointOffsetX(0)<br>
rightseg:SetEndpointOffsetY(0)<br>
rightseg:SetControlPoint1OffsetX(0)<br>
rightseg:SetControlPoint1OffsetY(0)<br>
rightseg:SetControlPoint2OffsetX(0)<br>
rightseg:SetControlPoint2OffsetY(0)<br>
<br>
smartshape:SaveNewEverything(e,e2) <br>
end<br>
end<br>
end<br>
end<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
JWLua mailing list
<a class="moz-txt-link-abbreviated" href="mailto:JWLua@jwmusic.nu">JWLua@jwmusic.nu</a>
<a class="moz-txt-link-freetext" href="http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu">http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
<a class="moz-txt-link-abbreviated" href="http://www.angermueller.com">www.angermueller.com</a>
</pre>
</body>
</html>