-
writing a simple script to set null object anchor point in the center?
Hi everyone, I need some little help here, I’m very new to AE and scripting is unknown territory, however I’m learning by looking at other scripts and reading a lot. However I’m a little stuck here with the anchor point.
I’m trying to write a simple script that adds a null object to a scene and set its size and its anchor point right in the center, so far I got everything I need but the anchor point :\
here is what i got
—————–
var nw = 50;
var nh = 50;
var myNull = myComp.layers.addNull();
myNull.source.name = “My NUll”;
myNull.source.width = nw; // getting this right 🙂
myNull.source.height = nh;
myNull.source.anchorPoint = ???; //I know should be an array for [x,y,z] but I get errors if i try.
myNull.threeDLayer = true;
——————I might be doing this all wrong, I don’t know ahhaha but how do i set the anchor point to be in the center?.
Any help is very much appreciated, thanks