musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.27k stars 2.65k forks source link

[note].accidentalType does not return integer #21674

Open ComposingPlanarian opened 8 months ago

ComposingPlanarian commented 8 months ago

Issue type

Other type of issue

Bug description

When making a plugin, using [note].accidentalType does not return the proper integer, meaning that I cant use it in my plugins. When I print it to console, all I get is: QVariant(mu::engraving::AccidentalType, )

This works in MuseScore 3 and I'm sure it worked in previous versions of MuseScore 4 too. Likely the recent update on quarter-tone accidentals messed up the ability to get their information with a plugin.

Steps to reproduce

  1. make/adopt a plugin where you use [note].accidentalType==25 (this should correpsond to a half-sharp)
  2. run the plugin - it doesn't work
  3. console.log(note.accidentalType) gives QVariant(mu::engraving::AccidentalType, )

Screenshots/Screen recordings

No response

MuseScore Version

4.2.1

Regression

Yes, this used to work in MuseScore 3.x and now is broken

Operating system

Windows 11

Additional context

No response

cbjeukendrup commented 8 months ago

It would be good to check whether only this enum and this property are affected, or others too, like chord.noteType and chord.playEventType. In the latter case, my guess would be that the problem is that the type of these properties is declared as the mu::engraving::… enum instead of the corresponding mu::plugins::api::enums::… enum.

cwasserman1 commented 7 months ago

I can take on this issue

cwasserman1 commented 6 months ago

Hi, very sorry, I am new here. I am trying to tackle this issue, but am a bit lost about making or adopting a plugin. Where can you create plugins?