MuseScore 3 Plugin Creator line number bug and breaking changes in qml code for v3 plugins. v3 plugin qml is not backwards compatible.
Downloaded MuseScore 3 this morning and started looking at writing plugins. I'm new to qml but found the plugin source files at https://github.com/musescore/MuseScore/tree/v3.0/share/plugins. In attempting to run https://github.com/musescore/MuseScore/blob/v3.0/share/plugins/colornot… in the Plugin Creator for a score, I encountered errors in the code. So to validate that older versions worked and this code was not experimental, I repeated steps using v2.3.2 of MuseScore. Here are repro steps and my findings. It looks like plugins in v3.0 are currently not backwards compatible and there are still some bugs to fix.
Repro steps MuseScore v3.0.0.4785
- MuseScore v3.0.0.4785 on Windows 10
- Open a score
- Open Plugin Creator and paste in qml code from this source code version:
https://github.com/musescore/MuseScore/blob/v3.0/share/plugins/colornot… - CTRL + A in the score to select all measures
- Run the plugin code using Plugin Creator
- See the following errors:
Warning: QMetaProperty::read: Unable to handle unregistered datatype 'Ms::Segment*' for property 'Ms::MasterScore::lastSegment'
61:-1: TypeError: Cannot read property 'tick' of undefined
- Also note the Plugin Creator line numbers are not incremented correctly after line 99. They start back at 00.
- Repeat steps above but select all measure except the last measure.
- Find that the v3 code does not check for undefined on length property access for graceNotes or notes.
- Find that the v3 code plugin is not working, cannot find any notes.
Repro steps MuseScore v2.3.2
- MuseScore v2.3.2 on Windows 10
- Open a score
- Open Plugin Creator and paste in qml code from this older source code version:
https://github.com/musescore/MuseScore/blob/v2.3.2/share/plugins/colorn… - Run the code
- Note that notes are colored and no errors occurred
Comments
MuseScore 3 has plugins not working right now. It's being worked on for one of the next couple of releases.
In reply to MuseScore 3 has plugins not… by mike320
Thanks. I went back to the last release of MuseScore 2 and made some progress on my plugin attempt. Here is a thread I commented on and got some great info from about what I am trying to do in my plugin. https://musescore.org/en/node/64031 Hope to port over whatever I write in v2 to v3 when it is ready!
In reply to Thanks. I went back to the… by allenn
Many people will no doubt appreciate your work. I will remember it when someone asks for this in the future.