[JW Lua] Antw.: How to mark objects to be excepted from automatic processing?

Bart Visser bartvisser at me.com
Sun Nov 15 12:08:55 CET 2015


Hi Thomas,

I can think of three options, which you've probably thought about yourself as well (but I write it down anyway :-)).

1. Add an Expression-category, and move those expressions that you want to be left alone (not a very good solution, but it should work)

2. Add something to the comment-field of the Expression. This isn't displayed anywhere but can be read (and altered) by JW Lua.

3. A more troublesome way could be to create a hidden page-text where you add the ID's of the expressions you want to be left alone. You could even delete the page-text, it keeps it's value as a FCTextBlock, but is not visible in the score. I've experimented with something like this when I a script to read certain PageText-properties, uniq to the file. I've made a script write a json-string to a hidden PageText and could read the json-string back into another script that needed the values.

Maybe this helps. I'm interested to hear what you come up with in the end.

Cheers,


Bart Visser




> Op 14 nov. 2015, om 21:27 heeft Thomas Weber <thomas.weber at notengrafik.com> het volgende geschreven:
> 
> Thanks Harald,
> 
> 
> Am 14.11.2015 um 21:00 schrieb Harald Schollmeyer:
>> 
>> you can get the default positioning via FCTextExpressionDef and you can get the actual position via FCExpression. If you calc the difference, you can find our whether it has been moved.
>> 
>> Is it that what you are looking for?
>> 
> 
> 
> Well, this doesn't cover the following cases:
> 
> * If one doesn't want the script to touch an element at its default position
> * An element has been moved away from its default by a script, not by a human (e.g. when re-running the script after some edits)
> 
> 
> Maybe one could misuse some playback specific info for flagging purposes - if playback data isn't of interest.  For expressions this could be the PlaybackLayerAssignment property, VelocityDelta for notes and the like.  Not very nice, but unless there's a better way, it might do.
> 
> _______________________________________________
> JWLua mailing list
> JWLua at jwmusic.nu
> http://jwmusic.nu/mailman/listinfo/jwlua_jwmusic.nu





More information about the JWLua mailing list