problem copying layers between synfig files

I’m using version 0.63.04 (64 bit linux .deb on Mint Linux Kde 12), and I’m having some issues copying between synfig files.

I’m trying to copy a set of layers between two files, so they are similar, but make changes in the copied layers, however, it seems that the copy is linked to the original still.

When I try to modify the copy, it says:
“The value you are trying to edit is in a composition which doesn’t seem to be open. Open that composition and you
should be able to edit this value as normal.”

Is there anything special I need to do to get the copy unlinked from the original file?


Never mind, I copied the original layer, then cut it from the source file, and pasted it into the destination file. It would be nice if there was a more explicit way to link and import files. :frowning:

Nope, I spoke too soon. Copying and then cutting from the original file still leaves links somewhere.
I’ve also tried creating an intermediate file and copying it there, then deleting the intermediate file and it still has links somehow. Grr, this is really annoying me.

Yes, it has been discussed here:
To effectively copy and paste layers freely they shouldn’t have any exported value node or canvas. You can keep original layers functionality if you unexport the exported value nodes (the parameters that used it will remain linked). Once done you can copy the layers without any external file dependency.
Index of Duplicate layers cannot be unexported without loose linking.
Exported paste canvas layer cannot be unexported but you can replace the paste canvas that uses a exported canvas parameter by a copy of the layers of the exported canvas. Open the exported canvas on its own window, select all the layers, copy and paste on the main document. Then encapsulate the layers again if needed and you’ll have an inline canvas again. Delete the Paste canvas layer that references the exported canvas and you’re done.

I know, it is annoying.
Only way I found to get clean copies is by copying the objects directly in the xml-documents.

Save your scenes with a sif extension (sifz is compressed, sif is not). Open both in a text editor (I like to use Scite)
Now in the original scene find the object. It’s within a tag starting with <layer type= and then at the end your layer name. Select form this line and all lines to the ending .
Now paste this in your new scene xml. just after an existing . Or below >name> if no layers exists.
Now you’ve copied the object, but it still links to an exported value that we also need to copy. It resides in the tag at the beginning of the document.
For an exported origin in my test file it looks like this:

<defs> <vector id="test-origin"> <x>-2.2050070763</x> <y>0.6055117846</y> </vector> </defs>
If you already have a tag copy the vector id tag, else copy the defs also.

Done, now you have an independent copy that links to an exported value in its own scene.

1 Like

Thanks to you both. I have exported values which I can unexport, as they are no longer doing anything. I thought about hacking the source file, but decided not to bother. I’ve tried similar thingsd before and had trouble finding exacty what to copy.

In this instance, I can just copy and paste another layer, as there is a layer already in there which is the same (its for shadow).

I’ll be copying layers between other files later on though, and keep in mind not to export things.

Thank you both for your help! I should have searched for threads already posted, but it was late and I was grumpy :slight_smile: