[JW Lua] Glissando over system break ignores BreakOffsets
Jan Angermüller
jan at angermueller.com
Tue Feb 3 20:54:08 CET 2015
Jari,
in addition to my "glissando positioning error" mail from two weeks ago
(see below), I can add:
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.
2.) I noticed another issue with a Lua-added glissando smartshape.
If it is a glissando "over system break", the
FCSmartShapeSegment.BreakOffsets don't work:
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).
But: when I grab it manually (no shifting, just clicking the middle
control point and releasing it), it suddenly appears correctly.
Is there a visual update flag missing ? (see screenshot 2)
b.) It seems to be not possible to correct this in JW Lua code. I can
change the FCSmartShapeSegment.BreakOffset, but nothing changes visually.
Again a visual update flag missing ?
Best regards,
Jan
Am 16.01.2015 um 12:05 schrieb Jan Angermüller:
> Jari,
>
> I haven't succeeded yet in adding a glissando smartshape at the
> correct position.
> Probably it's the following sentence from FCSmartShape:SaveNewEverything()
> that I am missing or that I don't understand:
> "For note-attached smart shapes, the frame collection that
> contains the entries need to be saved after the successful return from
> this method."
>
> The code snippet is below. It creates a glissando between two half notes
> in measure 1 on staff 1. The glissando does appear in the score after
> the execution,
> but at the wrong position (see screenshot: it's placed far above the
> staff).
>
> I tried to set as many properties as possible (Endpoints, CtrlPoints,
> etc. - not all of them are required here, I know).
> But the glissando always appears at the /same /wrong position -
> no matter which endpoint offsets I enter.
>
> I also tried it with FCNoteEntryCell and FCNoteEntryLayer instead of
> eachentrysaved(),
> but that shouldn't and didn't make a difference.
> What's the possibly required call for "saving the frame collection"
> after SaveNewEverything() ?
> Or is there a problem with the endpoint assignment ?
> I used JW Lua 0.29 / Finale 2014c / Windows 7.
>
> And another question in this context:
> I don't understand the meaning of "preset/custom" here.
> I thought that a glissando would be a preset shape as it is one of the
> SMARTSHAPE_TYPES
> <http://www.finaletips.nu/frameworkref/group__lua__classes.html#ga29b94a28426154f61cb5bf57d14a8b42>.
> But it only appears as a glissando in the score, if I also set the
> correct LineID which
> is defined as "Returns the line style ID for /custom /smart shapes."
> So what is a preset / custom in this context ? And does
> SetPresetShape(true) have any meaning here ?
>
> Thanks a lot for your hints in advance !
>
> Best regards,
> Jan
>
>
> for e in eachentrysaved(finenv.Region()) do
> if (e.MeasurePos==0) and (e.Measure==1) then --first note on
> measure pos 0 in measure 1
> for e2 in eachentrysaved(finenv.Region()) do
> if (e2.MeasurePos==2048) and (e2.Measure==1) then --second
> note on measure pos 2048 in measure 1
>
> --create glissando smartshape and attach it to e and e2
> local smartshape = finale.FCSmartShape()
> smartshape:SetShapeType(finale.SMARTSHAPE_GLISSANDO)
> smartshape:SetEntryBased(true)
> smartshape:SetPresetShape(true)
> smartshape:SetVisible(true)
> smartshape:SetLineID(1)
> smartshape:SetEntryAttachedFlags(true)
>
> local leftseg = smartshape:GetTerminateSegmentLeft()
> leftseg:SetMeasure(e.Measure)
> leftseg:SetStaff(e.Staff)
> leftseg:SetEndpointOffsetX(0)
> leftseg:SetEndpointOffsetY(0)
> leftseg:SetControlPoint1OffsetX(0)
> leftseg:SetControlPoint1OffsetY(0)
> leftseg:SetControlPoint2OffsetX(0)
> leftseg:SetControlPoint2OffsetY(0)
>
> local rightseg = smartshape:GetTerminateSegmentRight()
> rightseg:SetMeasure(e2.Measure)
> rightseg:SetStaff(e2.Staff)
> rightseg:SetEndpointOffsetX(0)
> rightseg:SetEndpointOffsetY(0)
> rightseg:SetControlPoint1OffsetX(0)
> rightseg:SetControlPoint1OffsetY(0)
> rightseg:SetControlPoint2OffsetX(0)
> rightseg:SetControlPoint2OffsetY(0)
>
> smartshape:SaveNewEverything(e,e2)
> end
> end
> end
> end
>
>
>
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu
--
Jan Angermüller
Jevenstedter Str. 80
22547 Hamburg
Tel. 040 - 28 94 84 82
www.angermueller.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150203/a6efdb0b/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glissano over system break.jpg
Type: image/jpeg
Size: 24798 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20150203/a6efdb0b/attachment.jpg>
More information about the JWLua
mailing list