Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Name attribute now showing in layer

$
0
0

Hi,

 

I am very new to After Effects scripting, but have been programming in C++ for about 25 years, so I have a programming background.  I am creating a camera rig script.  In the script I create a null and want to name it "Camera Control".  I am using this code snippet to create the null:

 

var myNull = ThisComp.layers.addNull();

myNull.threeDLayer = true;

myNull.position.setValue([w,h,0]);

myNull.name="Camera Control";

 

After running the script, the camera control null is created, and it works exactly like I want it to.  The problem is that the null's name ("Camera Control") works sometimes, and other times the name is just "Null #" (where # = some number).  When this happens everything still works as designed, but the layer name is wrong.

 

Am I missing something?


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>