AE ENHANCERS

Expressions/Scripts/Presets
It is currently Fri Oct 24, 2014 3:18 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to implement fill-color transition in script ?
PostPosted: Thu Nov 17, 2011 7:41 pm 
Offline

Joined: Thu Nov 17, 2011 6:55 pm
Posts: 2
Hi Everyone!

The following code(setValueAtTime) doesn't support for fill-color transition, but this feature is supported by After Effects CS5.5 UI. So could you please give a hint about how to implement fill-color transition in script ?
Code:
...
var layer1 = app.project.item(1).layers.addText("Example Text");
var animator1 = layer1.Text.Animators.addProperty("ADBE Text Animator");
var selector1 = animator1.Selectors.addProperty("ADBE Text Selector");
animator1 = animator1.Properties;
animator1.addProperty("ADBE Text Fill Color").setValueAtTime(0,[0xff,0xe0,0x0,1]);
animator1.fillColor.setValueAtTime(1,[0xff,0x00,0xe0,1]);
animator1.fillColor.setValueAtTime(2,[0x00,0xe0,0xff,1]);
animator1.fillColor.setValueAtTime(3,[0xff,0xff,0xff,1]);
animator1.addProperty("ADBE Text Rotation X").setValue(ratationX);
animator1.addProperty("ADBE Text Rotation Y").setValue(rotationY);
animator1.addProperty("ADBE Text Rotation").setValue(rotation);
animator1.addProperty("ADBE Text Scale 3D").setValue([100,300,100]);
animator1.addProperty("ADBE Text Position 3D").setValueAtTime(0,[-500,-300,-300]);
animator1.position.setValueAtTime(5,[0,0,0]);
selector1.start.setValue(0);
selector1.end.setValue(100);
selector1.offset.setValueAtTime(0,-100);
selector1.offset.setValueAtTime(3,100);
selector1.advanced.shape.setValue(2);
selector1.advanced.easeLow.setValue(100);
...

Thanks In Advance!


Top
 Profile  
 
 Post subject: Re: How to implement fill-color transition in script ?
PostPosted: Fri Nov 18, 2011 7:38 pm 
Offline

Joined: Thu Nov 17, 2011 6:55 pm
Posts: 2
I've gotten an answer from Adobe After Effects Scripting Forum, it now works excellently.

"Your color channels need to be between 0 and 1, like this:
Code:
animator1.fillColor.setValueAtTime(1,[1,0,.878,1]);

animator1.fillColor.setValueAtTime(2,[0,.878,1,1]);

animator1.fillColor.setValueAtTime(3,[1,1,1,1]);

" -- Answered by Dan Ebberts


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group