1
$\begingroup$

I posted this to Blender Bug Report but they said it was in the wrong place so I thought I'd try here. https://developer.blender.org/T53998 I see now from their comment it's actually from Jacques Lucke's AN addon... https://github.com/JacquesLucke/animation_nodes

Animation Nodes ~ Loft Splines http://animation-nodes-manual.readthedocs.io/en/latest/user_guide/nodes/spline/loft_splines.html

I am able to change the vertex of the loft's source splines and see the generated mesh morph as expected.

I'm also able to use Hooks to move a point of that surface control curve like this demonstration. https://www.youtube.com/watch?v=6Hn3YY0Vgbo

Unfortunately the curve moves independently and even offsets after hooking when moving the vertex in edit mode. It actually jumps to a different location in edit mode after being moved by the hook control mesh.

My guess is the animation node should appear in the modifiers and then I can put the order of the hook before it.

Maybe there is really a bug there, or it's super unclear what to do so maybe a toggle is needed somewhere (either in Splines from Object or the Hook modifier) to enable this to be even more procedural by allowing vertex hooks changes/animation to be observed by the animation nodes Loft Spline node.

$\endgroup$
  • $\begingroup$ Unfortunately there is a limitation in Blender currently. There is not really a good way for addons to access curves objects with applied modifiers. $\endgroup$ – Jacques Lucke Feb 11 '18 at 15:44
  • $\begingroup$ Oh I just noticed your comment. I've attempted to reopen the issue (and added one on your end at github) and see if there is a way to collectively make the missing access possible? Links in the comments below. $\endgroup$ – Master James Feb 13 '18 at 14:20
2
$\begingroup$

Unfortunately, this is not possible in Animation Nodes. Jacques Luke (AN Developer) said the following about this particular issue:

Blender does not (to my knowledge) allow scripts to get the result of curve modifiers in a way that is suitable for AN. The only possible way to see atm is that AN makes a copy of the curve object, applies all modifiers, hopes that the result is only a single spline, loads that spline into AN and removes the copied spline. This would have to happen on every recalculation. While the performance might be good enough when the spline is small, there are other problems when using this approach. Specifically it requires AN to use certain operators that should not be used during rendering.

What you can do however, is implement the hook modifier inside animation Nodes instead. Below, I will explain a potential way to do this.

Animation Nodes Hooks

First, I will rename all the hooks, where the name is "Hook.n" where n is the index of the spline point it should control. Then I will loop over the spline points of the spline, check if an object exist by the name "Hook.n" where n is the index, If I find an object by that name, I append the hook location, otherwise, I append the spline point location. What we end up with is the new locations of the spline points:

New Locations

And now we can safely regenerate the spline with the new locations:

Result

Hooks are however defined as an offset from their initial location, the same can be done in Animation Nodes using ID Keys, but I will leave that to you.

Animation Nodes Issues

StackExchange is no place to report Animation Nodes bugs, Github issues in the AN repository is the place to share bugs in:

https://github.com/JacquesLucke/animation_nodes/issues/new

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.