filePath is empty

• Oct 1, 2019 - 17:22

Hi, I've hit a problem, is this a known issue?

Mac OS 10.14.6
MuseScore 3.2.3.22971

The plugin locates its own source directory correctly by inspecting filePath when running under the plugin creator, but filePath is empty when the plugin is run directly from the plugins menu.

The attached file filePath.qml demonstrates the issue.


Comments

In reply to by Jojo-Schmitz

That didn't seem to work, I get

16:-1: TypeError: Property '42' of scope object is not a function
Warning: :16: TypeError: Property '42' of scope object is not a function

From the Plugin Creator, and running from the menu doesn't work either.

Maybe it's fixed in the next release and you're running that?

In reply to by billhails

I hadn't even tested ;-)

But indeed it doesn't work, not even in latest development build.
It does wortk in a non-dialog plugin though:

import QtQuick 2.0
import MuseScore 3.0
 
MuseScore {
      menuPath: "Plugins.pluginName"
      description: "Description goes here"
      version: "1.0"
      onRun: {
            console.log("filePath:" + filePath)
            Qt.quit()
            }
      }

Console output:
Läuft…
Plug-In Details:
Menü Pfad: Plugins.pluginName
Version: 1.0
Beschreibung: Description goes here
Benötigt Partitur
Debug: filePath:C:/Users/Jojo/Documents/MuseScore3Development/Plug-Ins

Do you still have an unanswered question? Please log in first to post your question.