importing animation and modifying imported

hi, can you help?

I’m importing an animated .sifz file. Then I want to tweak the animations it contains, in the context of the parent animation. I can’t find any instructions in the wiki (maybe I’m just dim!), so I’m working it out by trial and error.

What is the suggested work flow?

I know I need to have the parent and the child (imported) document open. Do I need to set them both to “animate editing mode”, or is it enough to set only the parent?

It seems to me that depending on whether I look in the parent or the child, there is different animation (even for the same parameter), and that in some way these two animations are added together?

Secondly, what determines the scale at which the import occurs? It seems to be a bit random, so I can’t predict how big the import should be, and I have to add a zoom…

Or is it better not to import animations at all? I could just copy and paste the child layers into the parent. It seemed so nice to be modular…

it seems to be a bug in 0.62.02 that you can sometimes appear to edit a child document when it’s not open, and then the changes get lost (or at least it confused me).

thanks for any pointers

Hi Andrewkay,
I also get very confused when using exported canvases and imported sif(z) files. I’ve issued some bugs that has not been solved yet, all related to the same problem (I guess).

First of all I would like to settle down some concepts about how I think it works (or it should).
Each document has a Root Canvas. This root canvas defines all the needed parameters to work with it (frames rate, time start, time end, sizes, etc.). When you encapsulate some stuff you create an Inline Canvas which by default inherits the definitions of the root canvas. Recursively, when you encapsulate something inside an encapsulate it inherits the first ancestor definitions and subsequently the root definitions.
When you export a canvas in a document it takes the definitions from its ancestor canvas (i.e. root canvas) and takes it as own. This allows the user to later modify the definitions of the exported canvas and then deviate from them. This way when Synfig Studio loads a composition from a file and finds a canvas, if the canvas has a parent canvas it takes its definitions when they are not overrided specifically by the found canvas definition.
When you import a sifz file it has its own definitions and aren’t override by the importing document.

How is all this merged?

Definitions are not problematic when we are talking about dimensions or resolutions. Even about transformations. When a canvas request another canvas a frame in the global space, the requested canvas evaluates its content in its local space, converts it to global space and passes it to the requestor canvas. Then the result is clamped to match the requestor canvas dimensions and resolutions and a result is obtained.

Some similar thing should happen when the content is evaluated at a different time. Canvases has start time and end time, but you can evaluate it before or after those times. Also, all canvases except root canvas has a Time OffSet value that shifts the canvas result when the time value for evaluation is passed.

So, when you have a canvas in your document (exported or imported from file), it has its own time but can be evaluated from the calling canvas at any other time.

The problem comes when you edit something. Specially when some canvas is in animation mode.

Say we have a root canvas with an imported file in it. You need to have the imported file to be able to modify its content, as you already know. Say we have two windows for edition. Root window and imported window. We can think that the best thing is to keep the imported window’s time cursor sync with the root window’s time cursor, so when we move the time cursor in the root, the imported follows. The previous developer of Synfig told me that this would cause recursive loops when trying to set time cursor between crossed imported. It can be detected that kind of time cursor endless loop but seems it was difficult to solve.

Additionally there is the animation mode problem. When you have a root canvas and it has a child canvas (exported or file imported) the animation mode can be independent. So the question is: do we want to allow edit an imported canvas (exported one or file imported one) within the importer canvas (i.e. the root canvas)?
When I edit a child canvas, should I consider the keyframes and the lock keyframes status of the root canvas or of the child canvas?

What’s what the user would like?

I don’t have quick answer for those questions and we should put on the desk what should be the canvas (imported from file and exported ones) behavior.

Last reminder. A document can refer to a exported canvas inside an external file so it is very easy to create recursive referncing.

I hope I haven’t messed it up so much :blush:

I really like the independence nature of the imported canvas especially for cycled animation and the ability to move the entire canvas around without altering the existing animation is great.

I’m just beginning to learn Synfig and I put this feature to use in my latest test animation where each of my three characters was animated separately and then imported into the final work. Too make changes, I simply opened the character synfig file, made some adjustments and then re-opened the main project file and everything is updated straight away.

This is a great benefit as major changes can be made without worrying about key frames.

Also, imported canvased can be scaled, moved, rotated, time-offset, time-looped etc.

Thanks both of you, Genete and Morn.

I’ve used the imported file before (in my flying rhinoceros animation – the galloping rhino was in a separate file), but in that case everything was fairly simple (I just used scaling and time shifting I think).

The new project is more complicated, and I think I must have stumbled on some of the timing issues Genete mentioned without realising what was happening. (move object in one file, look later and find it hasn’t moved, move it again, repeat, aargh etc) – so that was very useful, Genete.

I’ve never exported a canvas (and judging by various comments I see in these forums, it’s quite a difficult thing to do properly!) except as a whole file.

As for Morn’s comments – that sounds an interesting way to work. But I wonder, if two characters are scaled and translated and you want them to (say) entwine tentacles, it’s probably not easy to keep them locked together by editing each one separately (I’d love to be corrected on this one!)

For example, can you export a value from one file to an imported canvas, modify (eg zoom and translate) and then use it in another imported canvas?

still learning…

I think I know what you mean and in that case I think I’d do that “scene” separately and draw the two character entwined.

Not sure about that but what I have done is import two separate canvases (i.e. characters) and then encapsulated them both and then applied the zoom/rotate/transform inside the encapsulation. The transform then applies to both the encapsulated characters and I can move the entire encapsulation as well.


[character group]
[character 1]
imported canvas 1
[character 2]
imported canvas 2

I used that in my last animation to put two characters next to each other in a roller-coaster car and move them forward whilst enlarging them.