Copy link to clipboard
Copied
Hi, I'm wondering if it is possible somehow to have the nulls created from the new 'points follow nulls' expression appear right above the selected layer? For instance, if I want to create nulls for the points on a layer that is maybe 50 or 60 layers down, then the nulls show up at the very top of the comp. I'd like to have them right above the layer that they are controlling. Anyone know if this is possible via preferences or something?
Thanks.
Copy link to clipboard
Copied
Hi, I encountered this issue today, except the shape I'm trying to use the expression on only has 4 points.
The nulls that were created by 'Points Follow Nulls' also appeared in the wrong spot, they seem to be off by X: -35px and Y: -138px, which makes it tricky when trying to parent the nulls to other animated layers.
I'm not sure what causes it - and I've tried resetting the scale of the shape and unparenting it to no avail - but I was able to create a temporary fix.
Basically, on the shape layer, add two Slider Controls - name them OffsetX and OffsetY
Then on your shape layer's path property and change the last for loop in the expression from this:
for (var i = 0; i < getNullLayers.length; i++){
if (getNullLayers != null && getNullLayers.index != thisLayer.index){
origPoints = fromCompToSurface(getNullLayers.toComp(getNullLayers.anchorPoint))
}}
To this:
for (var i = 0; i < getNullLayers.length; i++){
if (getNullLayers != null && getNullLayers.index != thisLayer.index){
point = fromCompToSurface(getNullLayers.toComp(getNullLayers.anchorPoint));
origPoints = [ point[0]+effect("OffsetX")("Slider"), point[1]+effect("OffsetY")("Slider") ];
}}
Now you can adjust the OffsetX and OffsetY sliders until the nulls are actually over the shape.
Obviously not perfect, there's probably an easier solution - but don't have time to keep searching for one right now.
Hope this helps,
Copy link to clipboard
Copied
The issue is that the Position value for the shape inside the shape Transform properties - not the layer position - has to be 0,0. Else, it offsets the nulls.
Copy link to clipboard
Copied
Thanks. This seems to be the correct response.
Copy link to clipboard
Copied
thanks a lot you saved my life
Copy link to clipboard
Copied