FORUMS: list search recent posts

CS4 AE Null Layer Script Error

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andreas Sizynski
CS4 AE Null Layer Script Error
on Nov 23, 2012 at 5:56:47 am

I watched this video on VideoCopilot: http://www.videocopilot.net/tutorial/3d_stroke_effect/

At 7:30, the narrator implements adobe script into after effects to parent a null layer's position to that of a CCParticle effect layer.

Here are the statements:

x=thisComp.layer("Null 1").transform.position[0]-thisComp.width/2;
x/thisComp.width

y=thisComp.layer("Null 1").transform.position[1]-thisComp.height/2;
y/thisComp.width

z=thisComp.layer("Null 1").transform.position[2];
z/thisComp.width


However, when I enter in the Position Z statement, I get an AE Error Message: "After Effects warning: Bad argument: index 2 out of range for stream of dimension 2
Expression disabled.

Error occurred at line 1.
Comp: "compName
Layer:2 ('particle2')
Property:'Position Z'"

The other statements do not garner any error messages, nor indeed are they disabled. Why is this Position Z acting up?

An Artist interested in the past, stuck in the present.


Return to posts index

Tudor "Ted" Jelescu
Re: CS4 AE Null Layer Script Error
on Nov 23, 2012 at 7:45:17 am

Post a screen shot with your Null layer position open and the expressions open as well.

Tudor "Ted" Jelescu
Senior VFX Artist


Return to posts index

Vishesh Arora
Re: CS4 AE Null Layer Script Error
on Nov 23, 2012 at 8:11:41 am

Andreas

Download the project file from the website and check whether the same error occurs there or not.

If not, then carefully check the expression that you have used.

Vishesh Arora
3D and Motion Graphics Artist
Films Rajendra

Blog:
http://digieffects.wordpress.com

Demo Reel(3D):







Return to posts index



Matthew Keane
Re: CS4 AE Null Layer Script Error
on Nov 23, 2012 at 9:05:30 am

Have you made sure that the 'Null 1' is set to be 3D? If AE is complaining that the position is a 'stream of dimension 2' then it sounds like it only has x,y coordinates, but no z, so the third dimension is out of bounds. Arrays in expressions start at zero so, position[0] is x, position[1] is y and position[2] is z.


Matthew Keane

Freelancer based in Paris, France
- Motion Graphics, Video Editing & Effects, Watchout Programming & Live Operation.


Return to posts index

Andreas Sizynski
Re: CS4 AE Null Layer Script Error
on Nov 23, 2012 at 7:44:00 pm

thanks for the headsup! rather silly mistake to overlook on my end.


However, the particle color is grey and the options to change the birth and death color swatches are greyed out. Any idea why this might be?

An Artist interested in the past, stuck in the present.


Return to posts index


Ridley Walker
Re: CS4 AE Null Layer Script Error
on Nov 23, 2012 at 2:03:09 pm

[Andreas Sizynski] ""After Effects warning: Bad argument: index 2 out of range for stream of dimension 2
Expression disabled.

Error occurred at line 1.
Comp: "compName
Layer:2 ('particle2')
Property:'Position Z'""



My suspicion is that you have not made the Null a 3D layer, so it has no position[2].

Arrays (x,y,z) are counted from 0 as the first position in the array, 1 is the second position in the array and 2 is the third position.

A 2D layer has 2 dimensions, position[0] and position[1].

A 3D layer has 3 dimensions, position[0], position[1], and position[2].


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]