synfig / synfig

This is the Official source code repository of the Synfig project
https://synfig.org
GNU General Public License v3.0
1.85k stars 324 forks source link

Cannot copy a skeleton [$60] #453

Open zozorg opened 7 years ago

zozorg commented 7 years ago

Synfig version & platform: linux 1.3.4

Issue description: When copying a skeleton and its linked splines, by copy/pasting or embedding an imported canvas, the resulting skeleton isn't linked to the splines.

--- There is a **[$60 open bounty](https://www.bountysource.com/issues/51184738-cannot-copy-a-skeleton?utm_campaign=plugin&utm_content=tracker%2F321991&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F321991&utm_medium=issues&utm_source=github).
morevnaproject commented 7 years ago

Just create a skeleton with 3 bones, duplicate it, and move the bones around.

Yes, I see what you mean. When I duplicate skeleton layer (within the same document) it creates copy of each bone. But those copies still reference parents from old skeleton.

morevnaproject commented 7 years ago

In general any copy operations related with bones are dangerous at the moment. For example this one - #455.

zozorg commented 7 years ago

Posted a $50 bounty

zozorg commented 6 years ago

+$10 bounty, total $60

src-r-r commented 4 years ago

I'm taking a look at this issue now.

Update 2020/1/13 I think I figured out what the issue might be. I'll be trying something.

src-r-r commented 4 years ago

I've been looking through the source. I think part of the problem is that the design of the bone/skeleton relationship is not very structured. Bones are just there: they don't belong to anything. Is this by intention?

I did a little sleuthing with Python to investigate how bones & skeletons are structured. I'm very visual so I wanted to see how they were networked and I attached my findings below.

Taking a cue from Blender, I propose skeletons take on a more active role, so that a user can select a skeleton, double click, and enter the skeleton group to modify the bones.

Does this work for the design?

Synfig Investigation.pdf

rodolforg commented 4 years ago

@src-r-r The possible cause of this problem is a wrong duplication of the ValueNode that build the relationships among bones themselves. Maybe LayerSkeleton should override Layer::clone() method to fix the bones' parenting after duplication.