[Solved] Quick method to clone a layer or a group to an arbitrary position on Canvas

There’s the Duplicate layer, but it’s very complicated to place things exactly where you want them. It’s a method IMHO that can be used when duplicating many times.

I was wondering if it would be possible to clone a layer or a group and place it anywhere on canvas, like a shadow clone, that can be moved anywhere simply by dragging its green position handle.

My idea is to have an option like Duplicate Layer:

that keeps also animation in sync.

For example, there could be an option under Duplicate Layer called Clone Layer that allows the user to change arbitrarily position or time offset.

I know this stuff gets tricky because almost any parameter can be animated, but sometimes a simpler approach is needed for quick animations or motion graphics.

Let me know what you think about it or if something similar already exists!

I’m not sure if this video would be similar to what you are referring to, but I agree about a simplier approach:

1 Like

I looked now into Filter Group code. It was done in 2017 and it doesn’t have much written in there to hep to document it :stuck_out_tongue:
Reading the code further, that’s what it does: differently of Layer_Group, Layer_FilterGroup does render what it below it, and then renders its children.

This way, we have the contents below FilterGroup renderer twice, but the second pass we apply some layers above it. According to the name, I guess the intention is to have this second pass with some filters applied on it.

Therefore, I suppose that’s the reason for Blend Method be straight by default: maybe its original intent was to simplify the layer tree grouping a lot of filters into a single “folder”.
But, who knows… Maybe @KonstantinDmitriev

1 Like

Do you mean like a copy’n paste with an offset?
This offset would be fixed? If I move the source layer, its duplicate would shift by the same distance?

1 Like

Something like a Clone in Inkscape, where there’s a copy of an object that is always linked to the original.
When the original is changed, all clones are updated as well.

I use Synfig for motion graphics and sometimes it would be useful to reuse some groups without the need to duplicate again each time a small change is made or update parameters for each copy.

For animations that would mean having a layer that is like holding in a “mirror” of a referenced layer to which you could apply geometrical transforms (offset, angle, scale, etc.).
Similar to when an animation is imported from another animation file, but all self contained in the same file.

Maybe there’s a way to export a Layer somewhere but never found something IIRC.

Did you try the Layer Duplicate?

1 Like

Yes, but it’s very unpractical and difficult to get the position of layers right.

Tomorrow I’ll try again, but a quick way to clone stuff could be a great feature.
Duplicate Layer as of now is so unintuitive that every time I use it I have to check the documentation and hopefully get things right.

With this topic I want to stress on the ease of use which is missing (at least) for me and work on new proposals.

I took a look on this Inkscape feature: The cloned object can be changed without affect the “parent”/“source” object. Strange :stuck_out_tongue:

1 Like

If a clone is edited a local tranformation is applied (like scale or rotation, although not all parameters can be changed for the clone) without affecting the original.
When the original is changed and the clone has some local transformations, the clone is updated and the same local transformations are applied again.

A similar behavior happens in Synfig for the Group Layer if it contains an imported animation, right?
That is exactly what I would love to see in Synfig on a “cloned” layer.

If I read you correctly you can achieve what you want by exporting canvas: https://wiki.synfig.org/Canvas
After you’ve done it, you can connect it to different “Group” layers with custom transformations.

1 Like

It works!

I knew about it but couldn’t remember where I saw it.

Thanks everyone :+1:

For everyone reading this discussion in the future here is how to do it:

  1. Select the part of the animation that you want to clone.
    If it’s already contained in a Group Layer, leave it as it is.
    Otherwise encapsulate it into a Group Layer. That’s because a Group Layer is a “self contained” animation, like having a separate Canvas.

  2. In the Parameters Panel, select Canvas, then right-click > Export Value and give it a name
    Now in the Canvas Browser you can find the exported Group

  3. Create a Group Layer (Other > Group Layer)

  4. Select the Group Layer and in the Parameters Panel select Canvas and select the exported Canvas in step 2

Actually this feature is still under development and not yet complete.

Probably the best way to get around this is to separate the animation in more .sif files and import parts as needed.
It’s exactly as before, except that instead of exporting the Canvas you save it to a separate file and import it as needed.

The imported animations are always synchronised, but you have full control over the imported animations (delete, import in other animations, etc.).