-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin API: partially restore readScore, closeScore and writeScore #20822
base: master
Are you sure you want to change the base?
Conversation
Batch Convert does seem to work fine with this! |
d2de635
to
f8d7b1e
Compare
src/plugins/CMakeLists.txt
Outdated
notation | ||
project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if these are really necessary. When only using "interfaces", like INotationWritersRegister
, INotationWriterPtr
, INotation
, linking is usually not necessary because all methods of these interfaces are pure virtual methods, so #including already gives all available information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, these are indeed not necessary. I have added this linking because the plugins module now depends on those other modules, but I didn't notice that this dependency does not really require linking. I have removed it now.
f8d7b1e
to
144ed22
Compare
return false; | ||
} | ||
|
||
project::INotationWriter::UnitType unitType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, for better readability, we can move the resolving of unitType into a separate method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I moved this code to a separate method.
144ed22
to
b440cc5
Compare
Tested on Win11. @dmitrio95 @Jojo-Schmitz To what extent Batch Convert and ABC Import plugins should work better than in master?
|
Concerning Batch Convert:
Concerning the ABC Import plugin, it will need to be corrected to re-enable this line which has been disabled exactly because the |
fa1f8d3
to
525a11a
Compare
rebase needed |
b440cc5
to
2840e2b
Compare
Rebased |
@dmitrio95 Sorry for the delay..
Can you correct that line so I can check it on my side? |
It is in a different repository, @jeetee's |
Here is the modified plugin: abc_import-4.0.0.zip. I enabled back the |
@dmitrio95 Thanks! But when I wanted to check you PR, I found a bug in master branch #21659 which blocking me now.. |
I guess for now you'd better rebase it to 4.3.0? |
@dmitrio95 please rebase |
Hello, can your Batch Convert work normally in import mode? Why do I display error open score in versions 4.2.1 and 4.3.0 |
Because this PR hasn't been merged yet (and needs another rebase) |
Resolves (partially): #13593
The changes in this pull request partially restores the functionality of the plugins'
readScore()
,closeScore()
andwriteScore()
functions to the extent that doesn't require changing the current multi-instance logic. With these changes it will be possible to:readScore()
to open a score in the current window, if it is empty, or in a new window if the current window already has an opened project;writeScore()
to write the currently opened score;closeScore()
to close the notation project opened in the current window.In addition to the limitations of the multi-instance model, there are two more limitations in the proposed implementation of these functions which may be addressed in future (this will probably require changes in the code not related to plugins):
noninteractive
flag ofreadScore()
is not currently implemented, addressing this will require changes in the code related to notation projects loading and import;writeScore()
can only write the currently selected notation and not other (part and master) scores within the current project, as the export logic seems to rely onNotation
andNotationProject
objects, while plugins have access only toScore
objects.The proposed implementation, of course, is far from a full functionality of this API but this will still allow the most basic import/export plugins to function.