Skip to main content
Inspiring
October 29, 2017
Answered

How to link Point to Null

  • October 29, 2017
  • 5 replies
  • 40168 views

Hello all ,

Please i want to know if there is any way to link a point to null for example : I create a square and it has 4 points and I want to link one of his points to Null and With the possibility of controlling the path of other points in normal

Thank you

test file .ae

https://1drv.ms/u/s!AsWsbi63c96Kt1EKjadl-CsKC4LQ

This topic has been closed for replies.
Correct answer asadss


Create Nulls From Paths Extended - YouTube

Here we can control the point and add handles to control the curves ,That so good but it make a lot of layers , not easy for animating, it's hard to do the work .Your tool (Create Nulls From Paths )very nice and Light , But there is a one problem your tool locked all the points ,Please I need your help , I want to use your tool on the shape path without need to disable the code , because i want the animation as it without the need to disable the expression to allow me to select and control the point curve as general .

I will wait to update this feature eagerly as it will be changing a lot in my work tasks

Thank you Adobe team

5 replies

Inspiring
April 24, 2018

Hi!

I have the same problem.

For me the solution could be that:

When you use the script "Nulls from Paths" into the layer mask path (or shape layer path) you have this expression:

var nullLayerNames = ["LAYERNAME: Mask 1 [1.0]","LAYERNAME: Mask 1 [1.1]","LAYERNAME: Mask 1 [1.2]"];

var origPath = thisProperty;

var origPoints = origPath.points();

var origInTang = origPath.inTangents();

var origOutTang = origPath.outTangents();

var getNullLayers = [];

for (var i = 0; i < nullLayerNames.length; i++){

    try{ 

        getNullLayers.push(effect(nullLayerNames)("ADBE Layer Control-0001"));

    } catch(err) {

        getNullLayers.push(null);

    }}

for (var i = 0; i < getNullLayers.length; i++){

    if (getNullLayers != null && getNullLayers.index != thisLayer.index){

        origPoints = fromCompToSurface(getNullLayers.toComp(getNullLayers.anchorPoint)); 

    }}

createPath(origPoints,origInTang,origOutTang,origPath.isClosed());

Now, for animate the path without disable the code I found this solution, linking the "var originPath" to a copy of the layer mask path and than animate this path, that don't have any code.

I mean, we can not animate the path directly but we can animate the copy and have the changes in the path with the code really fast with this trick.


Sorry for my english, I hope it's understandable!

asadssAuthor
Inspiring
October 30, 2017

here is the animation i did and i like it , but i want to connect one point to null on the character shoulder ,I don't want to disable the expression .

because it will brake the animation.

and there is problem with the create null form path script : the null get away from the shape when i use it  >>>> it should remain in the same place , and it doesn't... especially if the shape comes from adobe illustrator , or if i create any shape by simple drag in the work space


test file

Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.

pconigs
Participating Frequently
October 30, 2017

If you want to add one more controller, you can duplicate one of the nulls (and probably rename for clarity), then go to your main shape layer and duplicate one of the layer controls, then renaming to  "bodey: Path 1 [1.5.1.X]" where "X" is the number of the point you want to attach. The expression is built to be flexible in that way.

The nulls being away from the shape layer is due to the Transform: Position on the shape group (s). There's definitely a limitation in that the script doesn't take into account transform properties within groups, partly because it can be a rabbit hole of nested groups and complicated matrix transforms with skew, rotation, etc. I've definitely found the script works best with all zeroed-out transforms in shape groups and trying to stick to simple hierarchies when applying it.

I do know there's lots of other people working on similar/better scripts and extensions to help with linking points to nulls.

asadssAuthorCorrect answer
Inspiring
October 31, 2017


Create Nulls From Paths Extended - YouTube

Here we can control the point and add handles to control the curves ,That so good but it make a lot of layers , not easy for animating, it's hard to do the work .Your tool (Create Nulls From Paths )very nice and Light , But there is a one problem your tool locked all the points ,Please I need your help , I want to use your tool on the shape path without need to disable the code , because i want the animation as it without the need to disable the expression to allow me to select and control the point curve as general .

I will wait to update this feature eagerly as it will be changing a lot in my work tasks

Thank you Adobe team

pconigs
Participating Frequently
October 30, 2017

asadss The setup you have actually should work, but there's two issues to work around…

1.) You need to disable the expression in order to set keyframes on the path itself. Annoying, but possible.

2.) In the AEP you provided, the rectangle converted to a bezier path runs into the First Vertex bug where if you keyframe the path, it interpolates very oddly. The fix is to explicitly set a first vertex before keyframing (or in the case attaching points to the nulls).

Here's what I did to get it working…

1.) Disable the path expression

2.) Right-Clicked on the upper-right vertex and selected Mask and Shape Path> Set First Vertex.

3.) Keyframes the path.

4.) Re-enabled the expression.

P.M.B
Brainiac
October 30, 2017

If you have the latest version of AE you can use the Create Nulls From Paths tool What's NEW in Adobe After Effects CC 2018! (October 2017 Update) - Create Nulls From Paths Feature - YouTube

~Gutterfish
Roei Tzoref
Brainiac
October 30, 2017

Op is aware since he supplied a CC2018 project that already uses this script. He is asking for a way to attach one point to a null while leaving others free to manipulate as paths and not have them locked by the expression which seems to be the case.

since the expression language refrences for this new feature are complex and more importantly- new in Ae, it will take some time for us to get the hang of it. Expression wizards might be more useful to him.

asadssAuthor
Inspiring
October 30, 2017

Thank you for understanding what I want

I motion the characters and I need to manipulate the path and move the keyframe animation in frame by frame

This feature is excellent for connecting in but I want to solve the remaining points and manipulate them freely

Please Solution We have waited for this feature a lot

Thank

Matthew McConaughey updated After Effects on Vimeo

Roei Tzoref
Brainiac
October 29, 2017

I recommend you ask here: After Effects Expressions