Getting rid of exported canvases?

I know I can’t unexport canvases but is there any other way of getting rid of them?
I’ve got a few that is really messing up my workflow, keyframe-wise.

The easy way to ride the canvases is to copy all the content in a new fresh inside Synfig Studio. That wouldn’t copy the value nodes properly or the keyframes. It just would copy the layers and its waypoints. Instead of copy correctly the valuenodes, they still referring to the original file. That causes lot of problems (bugs in fact),

  1. Value nodes that referes to other file are not listed in the Children Panel.
  2. The modifications of the valuenodes in the new files are trashed when the file is saved because the value nodes sources are not changed if the original file is not modified.
  3. If the original file is erased or change its name the other file that uses the valuenodes cannot be opened…

Optionally those valuenodes that refers to the original file can be corrected by a search and replace operation in the file itself editing the xml in sif format.

Wouldn’t it be easier to disable this feature and add a layer that has the ability to display the exact same content (graphical speaking) as an other layer? (shallow copy)

Allowed relations:

root (invisible)            root
|- clonelayer --------+     |- clonelayer --------+
|- xyz                |     |- xyz                |
+- grouplayer         |     +- grouplayer <-------+
   |- fill            |        |- fill
   |- outline         |        |- outline
   |- grouplayer <----+           |- grouplayer
      |- ...                         |- ...

root                        root
|- xyz                      |- xyz                
|- grouplayer               |- grouplayer <-------+
|  |- fill                  |  |- fill            |
|  |- outline               |  |- outline         |
|  |- grouplayer <----+     |     |- grouplayer   |
|     |- ...          |     |        |- ...       |
+- clonelayer --------+     +- clonelayer --------+

Not allowed would be cyclic dependencies, which can be easily checked. This can only happen if a clonelayer would reference itself (or its parent). Or if you have two or more clone layers which reference each other in cyclic manner. A breadth-first search for selfreference would do the job fast enough, since u usually have not thousands of layers.

Or simply have a feature like “right click on canvas > Unexport”? Unless it already has that LOL

I don’t mean right clicking on the layers menu, rather where you select the exported canvases.

I manged to get rid of the exported canvases and the animation back into root of document by editing the xml-file.
I never got the copy-paste to work wihin Synfig so I went for text-editing instead.
It worked great!
No longer have issues with nested keyframes messing up the scene and the canvas does update when animating again. (I had huge issues with canvas not updating when animating within exported canvases, had to move point blindly, then step forward/back again to get an updated view…)

I’m staying away from exported canvases from here on…
:slight_smile:

There should be an unexport feature though!

Congratulations Rylleman!. Any small recipe for anyone who is interested on it?
One more thing to study and store in the endless TODO list. I really want to have more free time because I start to get a better understanding of the core of Synfig.

Time will say.
-G

Thank you.

It was actually quite easy.

The xml is roughly like this:

*canvas properties -name, size etc. canvas <meta>data <keyframe>data <defs> - within this the paste canvases resides. <canvas id> <meta>data <keyframe>data etc... </canvas> </defs> </canvas>

Now I just deleted , the paste canvas properties and metadata up to keyframe data so these followed on the root metadata-tags.
Then deleted the for the paste canvas and , leaving just the last finishing

Now the animation is moved from the paste layer into the root and paste layer is removed.
I also had to rename a few colours which I’ve created inside a paste layer so these also were moved.
These are referred to as :paste-canvas-name:colour-name.
I removed :paste-canvas-name leaving :colour-name and all was good.

Now that was all about it. Everything is layed out quite plainly in the xml. Paste layers are neatly placed within .