Return-Path: Received: from mail-vb0-f48.google.com ([209.85.212.48] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 4946789 for AE-List@media-motion.tv; Fri, 11 Jan 2013 02:16:52 +0100 Received: by mail-vb0-f48.google.com with SMTP id fc21so958062vbb.7 for ; Thu, 10 Jan 2013 17:21:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:mime-version:content-type:subject:date:in-reply-to :to:references:message-id:x-mailer:x-gm-message-state; bh=2ugilijP7Co4m/SxaMf//3Nvb1IFdg4iIKUzyXZyfCo=; b=c2tKZH5VLcHREf4p6l2YD3lmFB5+vhCuNQuvISs1uFP5SZ1Tt4sYQNSx6t+dtDVBEv IhXWJ/wNW5/p3bVAxQZr0dJDVRsRsmMvCTR+WZ2OKfIl2XLG8oTJq0/JNx6R6T1Sogb5 Tajez2A3IiGZNNHoXaZ2LVdBCGkelPRlP6ddhf7tYSQGzgLm0hEOjBwLZ9LJ93jUUitY +MaHKk56/vTGYLpypp37GNe1KHxJsf9SlbsgepyvpS0xZhzjCQzfz8+Qdcq6skZNGGy2 NDbhuLRHKL26pAWJo1VRZVNBYwfIqW26AiO+IwAnboHKt6tyL6SnE9ci5IC9ao0cJvXc ZTbg== X-Received: by 10.52.66.51 with SMTP id c19mr56933664vdt.123.1357867315553; Thu, 10 Jan 2013 17:21:55 -0800 (PST) Return-Path: Received: from [10.0.0.135] ([65.223.58.66]) by mx.google.com with ESMTPS id g5sm1337741vez.6.2013.01.10.17.21.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jan 2013 17:21:34 -0800 (PST) From: Phil Spitler Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_E992B4F7-F62F-4774-BCCD-AD569E316179" Subject: Re: [AE] Script Question Date: Thu, 10 Jan 2013 17:21:36 -0800 In-Reply-To: To: "After Effects Mail List" References: Message-Id: <6AFE9191-9E95-4569-BA81-5EAEFF5E4F9D@bonfirelabs.com> X-Mailer: Apple Mail (2.1283) X-Gm-Message-State: ALoCoQk8b7bKluDnhxE41ZuAWj2sV+z6DikgEYacm5uwJQBzZ8gLcfAxXJchxAuUeNerJYzMNpyQ --Apple-Mail=_E992B4F7-F62F-4774-BCCD-AD569E316179 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Thanks David and Paul, gad there is a reason and a solution !! Phil Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 m : 415.571.3139 Website | Facebook | LinkedIn On Jan 10, 2013, at 12:16 PM, David Torno wrote: > I got this to work properly. A little different setup. First adding = all sliders at once and naming them, which I think may have been causing = your code confusion since it saw the exact same slider names. >=20 >=20 >=20 > //START????????????????? > var myLayer =3D app.project.item(1).layer("Black Solid 1"); > var sliderNames =3D new Array("RED", "GREEN"); > var sliderControls; >=20 > for(var i=3D0; i<2; i++){ > sliderControls =3D myLayer.Effects.addProperty("Slider Control"); > sliderControls.name =3D sliderNames[i]; > } >=20 > var RED_Slider =3D myLayer.property("ADBE Effect = Parade").property("RED").property("ADBE Slider Control-0001"); > var GREEN_Slider =3D myLayer.property("ADBE Effect = Parade").property("GREEN").property("ADBE Slider Control-0001"); >=20 > RED_Slider.setValue([10]); > GREEN_Slider.setValue([20]); >=20 > var red =3D RED_Slider.value; > var green =3D GREEN_Slider.value; >=20 > alert(green); > //END????????????????? >=20 >=20 > -- > David Torno > Visual Effects Artist and Supervisor > http://www.ghosttownmedia.com > david@ghosttownmedia.com > O: 213.739.2290 > C: 818.391.6060 > ------------------------------------------------ > http://www.sydefxink.com (main portfolio) > http://aeioweyou.blogspot.com (vfx tutorials and AE scripts blog) > http://mactex.blogspot.com (free textures blog) >=20 > -----Original Message----- > From: Phil Spitler [mailto:phil@bonfirelabs.com] > Sent: Thursday, January 10, 2013 08:14 AM > To: 'After Effects Mail List' > Subject: Re: [AE] Script Question >=20 > Yup 2 sliders to the same layer. >=20 >=20 > Phil >=20 >=20 >=20 > Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 | c : 415.571.3139 | Bonfirelabs.com >=20 > "Get Social" - http://www.facebook.com/bonfirelabs >=20 > On Jan 9, 2013, at 11:33 PM, David Torno wrote: >=20 >> Wait I just realized something, are you adding two sliders to the = same layer? >>=20 >> David Torno >> Visual Effects Artist & Supervisor >> http://www.ghosttownmedia.com >> O: 213.739.2290 >> C: 818.391.6060 >> --------------------- >> http://www.sydefxink.com >> http://aeioweyou.blogspot.com >> http://mactex.blogspot.com >>=20 >> "The most useless day is that in which we do not laugh" >> -Charles Field >>=20 >> On Jan 9, 2013, at 11:02 PM, Phil Spitler = wrote: >>=20 >>> I'm having a fun time figuring out a scripting problem and thought I = would ask the advice of the script gurus on the list. >>>=20 >>> Basically I want to add 2 sliders then get the value of those = sliders. >>>=20 >>> var RED_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); >>> var red =3D RED_Slider(1).value; >>>=20 >>> var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); >>> var green =3D GREEN_Slider(1).value; >>>=20 >>> If I run the code above, it works great however if I change the = order and assign the sliders first then try to get the value, AE gives = me an "invalid object" error. >>>=20 >>> So the code below will not work. >>>=20 >>> var RED_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); >>> var GREEN_Slider =3D selectedLayer.Effects.addProperty("Slider = Control"); >>>=20 >>> var red =3D RED_Slider(1).value; >>> var green =3D GREEN_Slider(1).value; >>>=20 >>>=20 >>> It's almost as if when I add the Green Slider, it forgets the Red = Slider. >>>=20 >>> Any ideas? >>>=20 >>> Cheers. >>>=20 >>> Phil >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>> Phil Spitler | Creative Technologist | Bonfire Labs | t : = 415.394.8200 m : 415.571.3139 >>>=20 >>> Website | Facebook | LinkedIn >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >=20 >=20 >=20 > +---End of message---+ > To unsubscribe send any message to --Apple-Mail=_E992B4F7-F62F-4774-BCCD-AD569E316179 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii signature1 Phil = Spitler  |  Creative Technologist   |  Bonfire Labs  |  t : 415.394.8200  m : = 415.571.3139

Website | Facebook | LinkedIn

On Jan 10, 2013, at 12:16 PM, David Torno wrote:

I got = this to work properly. A little different setup. First adding all = sliders at once and naming them, which I think may have been causing = your code confusion since it saw the exact same slider = names.



//START?????????????????
var myLayer =3D = app.project.item(1).layer("Black Solid 1");
var sliderNames =3D new = Array("RED", "GREEN");
var sliderControls;

for(var i=3D0; = i<2; i++){
sliderControls =3D myLayer.Effects.addProperty("Slider = Control");
sliderControls.name =3D sliderNames[i];
}

var = RED_Slider =3D myLayer.property("ADBE Effect = Parade").property("RED").property("ADBE Slider Control-0001");
var = GREEN_Slider =3D myLayer.property("ADBE Effect = Parade").property("GREEN").property("ADBE Slider = Control-0001");

RED_Slider.setValue([10]);
GREEN_Slider.setValue= ([20]);

var red =3D RED_Slider.value;
var green =3D = GREEN_Slider.value;

alert(green);
//END?????????????????

=
--
David Torno
Visual Effects Artist and Supervisor
http://www.ghosttownmedia.comdavid@ghosttownmedia.com
O: 213.739.2290
C: = 818.391.6060
------------------------------------------------
http:/= /www.sydefxink.com  (main = portfolio)
http://aeioweyou.blogspot.com (vfx tutorials and AE = scripts blog)
http://mactex.blogspot.com  (free textures = blog)

-----Original Message-----
From: Phil Spitler = [mailto:phil@bonfirelabs.com]
Sent: Thursday, January 10, 2013 08:14 = AM
To: 'After Effects Mail List'
Subject: Re: [AE] Script = Question

Yup 2 sliders to the same = layer.


Phil



Phil Spitler |  Creative = Technologist  |  Bonfire  Labs  |  t : = 415.394.8200  |  c : 415.571.3139  | =  Bonfirelabs.com

"Get Social" - = http://www.facebook.com/bonfirelabs

On Jan 9, 2013, at 11:33 PM, = David Torno <torno@sydefxink.com> wrote:

Wait I just realized something, are you adding two sliders = to the same layer?

David = Torno
Visual Effects Artist = & Supervisor
http://www.ghosttownmedia.com
O: 213.739.2290
C:= 818.391.6060
---------------------
http://www.sydefxink.com
http://aeioweyou.blogspot.com
http://mactex.blogspot.com

"The most = useless day is that in which we do not = laugh"
-Charles = Field

On Jan 9, 2013, = at 11:02 PM, Phil Spitler <phil@bonfirelabs.com> = wrote:

I'm having a fun time figuring out a scripting problem and = thought I would ask the advice of the script gurus on the = list.

Basically I want to add 2 = sliders then get the value of those = sliders.

var RED_Slider =3D = selectedLayer.Effects.addProperty("Slider = Control");
var red =3D = RED_Slider(1).value;

var GREEN_Slider =3D = selectedLayer.Effects.addProperty("Slider = Control");
var green =3D = GREEN_Slider(1).value;

If I run the code above, it = works great however if I change the order and assign the sliders first = then try to get the value, AE gives me an "invalid object" = error.

So the code below will not = work.

var RED_Slider =3D = selectedLayer.Effects.addProperty("Slider = Control");
var GREEN_Slider =3D = selectedLayer.Effects.addProperty("Slider = Control");

var red =3D = RED_Slider(1).value;
var green =3D = GREEN_Slider(1).value;


It's almost as if when I add the = Green Slider, it forgets the Red = Slider.

Any = ideas?

Cheers.

Phil





Phil Spitler  | =  Creative Technologist   |  Bonfire Labs  | =  t : 415.394.8200  m : = 415.571.3139

Website | Facebook | = LinkedIn













+---End of = message---+
To unsubscribe send any message to = <ae-list-off@media-motion.tv>

= = --Apple-Mail=_E992B4F7-F62F-4774-BCCD-AD569E316179--