To create a shape key of a curve we need to start with the curve's base geometry and then move the points in edit mode to have the new form, that's assigned to shape key. Is there a way I can directly assign a curve to another curve as shape key? I can then draw the two curves (or maybe import them from an external file) freely and assign one as the shape key of the other.
2 Answers
Found the answer here:
https://blenderartists.org/t/blender-add-on-to-import-shape-keys-from-youtube/1124990
Here's the add-on that does this:
https://youtu.be/XMimQfQR_ss
As per the suggestion in the comment, here's the brief description:
The add-on descried in the video above imports svg paths directly as shape keys. So if I have a rectangle and circle in the svg file and if I group them with rectangle at the top in the xml group, circle will be imported as shape key and rectangle as the target. Apparently, there are no limitations about the number of nodes, as texts can also be imported as a shape key. There can be many shape keys for one target.
Download link: https://github.com/Shriinivas/shapekeyimport
-
$\begingroup$ While reference links are useful, link only answers are discouraged here, if the links go down your answer becomes useless for future visitors. Please describe shortly how you solved the issue and how the links help and are related $\endgroup$ Sep 2, 2018 at 13:28
-
$\begingroup$ here's an old script also, not very smart but don't need the svg step blenderartists.org/t/join-curves-as-shapekeys $\endgroup$– alambreSep 3, 2018 at 16:25
I don't know a way to do this in native Blender, but with the addon Animation Nodes you can look at the control points of each spline and mix their coordinates. If the splines don't have the same number of control points, you can also evaluate an equal number of points of each spline and mix their coordinates.
You can start with a loop that takes two vector lists an mixes pairs of vectors according to the float factor.
A Spline Info node is used to extract the coordinates of the control points for each curve. The previous loop is invoked three times to mix control points and left and right handles. A Spline from Points node will create a new spline from these mixed coordinates. Finally, a Curve Object Output will create a object out of this spline.
-
$\begingroup$ This looks a little complicated though. Please see the answer above. $\endgroup$ Sep 2, 2018 at 13:56