Copying SVG between scores not working
The manual says, "Copying imported images:
Once an image has been imported into the score it can be copied/cut and pasted to another location, such as a frame, note or rest, using the standard commands and procedure (see Copy and paste)."
This works perfectly within one score, however I lose the images when I copy and paste between scores. There are place holders (see attached) in the proper positions, but images aren't there.
Is this expected behavior?
Attachment | Size |
---|---|
SVG placeholders.png | 32.1 KB |
Comments
What is the image? Depending on what it is, there may be other methods.
In reply to What is the image? Depending… by bobjp
The images are symbols I created in Inkspace for notating ochestral voicings. They're rougly the size of a note head (maybe a little larger).
In reply to The images are symbols I… by Postman
Create a palette for your images. Then hit ctrl+shift and drag them to the palette. One at a time. Then apply them as you would other symbols. You'll need to position them.
In reply to Create a palette for your… by bobjp
I've tried adding the symbols to a palette in the past, but I've never gotten that to work (though I have read through the forum topics on that problem). So, I just keep Inkspace open and cut and paste. The workflow is really ok, but it's fiddly work nonetheless. I don't want to do it again if I don't have to.
I'm creating a score reduction from full score. Since I knew this problem existed before this, I saved the full score under another name and then went about creating the reduction by using the implode tool on that copy. Unfortunately, I didn't include the celli and the basses in the selection when imploding and then deleted those staves without realizing my mistake until the next day. I'd love to copy over those two lines from the full score, but that's not happening.
I suspect the copy handler needs attention. When I copy from Musescore and paste into Inkscape, Inkscape tells me there's nothing on the clipboard.
In reply to I've tried adding the… by Postman
I've had successes and unexplained failures when using SVG graphics in MuseScore 3 and MuseScore 4. And I'm on MacOS.
I've created some of my SVGs in Illustrator, but currently I make them mostly in Affinity Designer.
You may want to alter your workflow, because I don't think there's a solid, native, inter-app clipboard for copy/pasting between a vector editing app and MuseScore (in either direction). When I view the MacOS clipboard after copying an SVG from MuseScore it's empty; when I view the clipboard after copying from Affinity Designer I see the SVG code:
• As expected, I can't copy an SVG from MuseScore to paste it into Affinity Designer.
• When I copy an SVG from Affinity and paste into MuseScore the deposited graphic is pixelated.
Various apps, like museScore, may ignore some of the formats that may simultaneously be on the clipboard.
There are alternative clipboard apps that my help. But I've never used one.
My workflow is to:
• export the vector image from my vector editor to an SVG file.
• then I can drag the SVG from my desktop to a MuseScore 4 frame, or note, or rest ...
Once I have an SVG in MuseScore 4 I'm able to copy/paste it to other MuseScore 4 documents—sometimes—but first must select a destination frame, note rest. Other times, on paste, I get an empty placeholder as you've reported.
I've also noticed empty placeholders when opening SVG-bearing MS3 scores in older versions of MS4. And sometimes SVG are all there, but on reopening a MS4 score I only see a placeholder.
scorster
In reply to I've had successes and… by scorster
> When I copy an SVG from Affinity and paste into MuseScore the deposited graphic is pixelated.
It seems that the image is always interpreted as a raster.
https://github.com/musescore/MuseScore/blob/master/src/engraving/dom/pa…
But there should be enough information in the clipboard to detect it as an svg. This can be fixed. Please create an issue on github.
In reply to > When I copy an SVG from… by mercuree
I was under the impression that the recommended method of getting an image into a score from an outside source was to drag it. The image can be a png or svg. Though svg seems to be a better choice. It tends to show in a palette cell when it is dragged there.
In reply to > When I copy an SVG from… by mercuree
@mercuree wrote >
> It seems that the image is always interpreted as a raster.
Correct. And thanks for providing a link to the Github paste.cpp code.
When I copy a down bow vector image from Affinity Designer (exported and attached below) the MacOS clipboard indeed shows XML for the SVG:
... but MuseScore forces its type to RASTER.
scorster
In reply to I've had successes and… by scorster
I'm generally very happy with how Musescore deals with external graphics. I'm not aware of any other notation package that does it at all let alone as well.
BTW, I'm using Windows 11.
Admittedly, it has been a decade at least (if not two) since I worked with the clipboard in code, but I seem to remember you can put any data on the clipboard and then tag it as you please. It's that tag that is checked in code to see whether your application can use it. Yes, some are very well established (like text and bitmaps) and have library support to match, but that shouldn't be a limiting factor. Personally, I would love to see a MIDI type supported by Musescore for instance.
Clearly, Musescore developers have put in the work to support the SVG type (because pasting works). I just think the developer working the ticket stopped too soon (so I guess this could be considered an enhancement request rather than a bug). Not be able to copy an object that can be imported via the clipboard between documents of the same application falls short of accepted user interface practice.
I suggest the team look into it. I do not believe it's a high priority issue, though.
In reply to I'm generally very happy… by Postman
By the way, I can't reproduce your problem. Could you attach the file where the svg's don't load?
In reply to By the way, I can't… by mercuree
Don't load? They load from a saved file just fine. The issue is if you paste an SVG graphic into a Musescore doc, then copy from there and try to paste it into another Musescore doc, the graphic doesn't show up (just the place holder).
Please do let me know if you can't reproduce this. That could help in figuring out a workaround.
In reply to Don't load? They load from a… by Postman
@Postman wrote:
> *The issue is if you paste an SVG graphic into a Musescore doc, then copy from there and try to paste it into another Musescore doc, the graphic doesn't show up (just the place holder).
Not sure if you saw near the bottom of this post I mentioned having multiple successes pasting SVGs among MS4 documents, and yet I partially confirmed the issue with multiple failures. And still today I'm unable to determine what triggers the success or failure.
scorster perviously wrote >
> Once I have an SVG in MuseScore 4 I'm able to copy/paste it to other MuseScore 4 documents—sometimes—but of course I must first select a destination frame, note rest. Other times, on paste, I get an empty placeholder as you've reported.
In reply to @Postman wrote: > *The issue… by scorster
I was replying to mercuree. I should have quoted the post, sorry.
In reply to I was replying to mercuree… by Postman
No worries ...
But I should add, perhaps MuseScore 4.4.3 employs some sort in internal clipboard.
When I copy an SVG from MuseScore, and even when I successfully paste it to another MuseScore 4 score, I see nothing on the MacOS clipboard.
In reply to Don't load? They load from a… by Postman
@Postman Ok, now I get it. But then this problem is not only with svg, but with any other images added via copy/paste. In any case, please create a new issue on github.
I can confirm this. And it does work in Mu3. But in Mu3 it is one instance with multiple scores, in Mu3 is it multiple instances with one score, so it is a bit questionable whether we can call it a regression.
However: report in GitGub, https://github.com/musescore/MuseScore/issues/new/choose
In reply to I can confirm this. And it… by Jojo-Schmitz
Cool, thanks.
In reply to I can confirm this. And it… by Jojo-Schmitz
Jojo... you wrote:
But in Mu3 it is one instance with multiple scores, in Mu3 is it multiple instances with one score...
Do you mean the Mu3 one instance vs the Mu4 multiple instances dichotomy?
That is, the Mu3 single widow with tabbed scores vs the Mu4 multiple instances with each window displaying a single score?
In reply to Jojo... you wrote: But in… by Jm6stringer
Yes
In reply to I can confirm this. And it… by Jojo-Schmitz
This morning I started thinking that I was going to have to do this by hand (really not that big a deal). So, I copied the two staves in question from the full score then tried to paste them into the reduction score (forgetting that you need to create the staves in the target first) which failed as expected*, then created the staves and tried again, and I'll be damned if the images didn't come over! What?!
Other than what I just described, I have no idea why it worked this time. Which is to say, congratulations, this is an intermittent bug. You might want to let the developers know.
Thanks, again.
*OT: Why isn't this possible?
In reply to This morning I started… by Postman
Postman, Again I have created plenty of png and svg images in third party software and saved them to a palette. Much more reliable than C+P. But you do have to follow the proper procedure. Not difficult.
In reply to Postman, Again I have… by bobjp
I can't drag and drop onto the pallette. I must be doing something wrong, but I can't figure out what it is.
However, even if I could get that to work, it wouldn't solve the problem. The use case is described in my second post in this topic.
In reply to I can't drag and drop onto… by Postman
Update: At your prompting I tried it again, and it works now. Or maybe it always did. I don't know.
Cool feature.
In reply to Update: At your prompting I… by Postman
Hamlet had a soliloquy. Why can't I? ;)
The fact that you have to create a workspace if you want the palette to surive a reboot without any warning that you'll lose the palette if you add to the default isn't the best. Maybe the code that deals with adding a custom palette could check? Just a thought.
In reply to Hamlet had a soliloquy. Why… by Postman
Lately there does seem to be a saving issue. If I save the score I created the palette in, it is still there if I open that same score. If I open a different score not all of the palette is there. If I don't save the original score, the new palette is totally gone on re-open.
I'll continue to experiment.
In reply to I can't drag and drop onto… by Postman
I know some have had issues dragging to the palette. But this procedure works for me
Once the image is in MU4, hold ctrl+shift. Then select and drag the image to a palette. Let go when you see the + sign.
This can also be done with png images. But they don"t show in the palette cell. They are there, however.
W11 photo viewer can remove the background from a png. As I say they don't show in the cell. But you can lable the cell and the lable shows if you scroll over it.
It seems to me that Copy+Paste in Musescore isn't always dependable. Or at least doesn't always yield the expected result. In the case of svg images, why is C+P important.