Great new scripting resource

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

I just found a really interesting new scripting site, held by someone who also codes for Useful Assistants :

http://www.redefinery.com/ae/

A lot of cool scripts and good scripting theory
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Ah, someone found me out. :-) Thanks for the kind words.

Yeah, I hope to post more AE scripts and helpful tips in the future. I've been ramping up on AE's JavaScript interface, and it's been interesting to see how it compares to the UA Python interface. Definitely a little rough at the start, mainly because of my familiarity with UA (I wrote most of the assistants bundled in the package) and fleeting knowledge of JavaScript from my web development days.

Anyway, I hope you find my site useful. I'm trying to document my research/work as much as possible to help others learn about AE scripting.

Jeff
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Hey Jeff,
Took a squiz at your site - some fun stuff in there!
One of the assistants was to do with changing auto-orientation... I couldn't find anything to do with this in the object model or scripting guide.

If this is a directly relating link to the AE UI via JS, would you care to share how this is done?

Thanks,
Dave
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Hi Dave,

I couldn't find it in the AE Scripting Guide either.

UA doesn't wrap AE's JavaScript interface with a Python interface -- it actually wraps AE's AEGP interface (available to plug-in developers) with a Python interface. The JavaScript and AEGP interfaces are not mirrors of each other (sadly), so there are some features available via JavaScript that aren't available via AEGP/UA, and vice versa. Neither is a superset of the other.

In UA, you can set various flags (switches) for a layer, such as Layer.Flag_LookAtCamera, Layer.Flag_AutoOrientRotation, and Layer.Flag_LookAtPOI. I don't see any equivalents in AE's JavaScript interface.
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Fair enough then - no access to auto-orientation vis JS.
Does that mean I'll start having to write "proper" plug-ins? How easy is that by the way? I have a pretty wide range of programming experience...

Thanks for the reply, anyway,
Cheers,
Dave
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

If you need access to that functionality today, you can either write a Python script for UA (if you have that plug-in) or develop your own AEGP plug-in. The AE SDK is publicly available here, but I don't have any personal experience using it. I didn't write the core UA plug-in.

I've submitted a feature request to the AE team to add the auto-orientation functionality to the JavaScript interface.

Cheers.
davestewart
Posts: 114
Joined: March 10th, 2005, 5:50 am
Location: London, UK
Contact:

Thanks Jeff,
I've taken a look at the SDK. What a funny and well-written document! Looks like the core plugins are written in C and C++, which I don't know yet. A few years down the line, I'll be learning these, but not right now, so that calls time on that one then.

Thanks for your help,
Cheers,
Dave
vidpat
Posts: 86
Joined: October 21st, 2004, 12:36 am
Location: Phoenix, AZ
Contact:

The SDK takes a bit of getting used to. There are some areas that are well document and others that are hardly documented at all. Some of the APIs that are in C++ are being deprecated in favor of C while other suites in C are being newly wrapped in C++. You can write everything in C using the C++ and C APIs and everything will be fine.

The bulk of the functionality of AEGPs doesn't differ all that much from the scripting API. Nothing in the AEGP API refers explicitly to Auto Orientation of layers or the like. So, if it is possible to set the property from an AEGP (as does UA), I imagine that it is a stream property which may actually be similarly set through the scripting API.

Peter
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Peter,

If you're looking for the AEGP function for setting the auto-orientation values, I believe it's the AEGP_SetLayerFlag() function (and AEGP_LayerFlag_AUTO_ORIENT_ROTATION, AEGP_LayerFlag_LOOK_AT_CAMERA, and AEGP_LayerFlag_LOOK_AT_POI flags) on page 180 of the SDK Guide for AE 6.5.
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

redefinery, welcome to the forum! It's great to have someone of your experience on board.
User avatar
redefinery
Posts: 112
Joined: April 1st, 2005, 8:16 pm
Location: CA
Contact:

Hey folks,

I just posted a new utility script called "rd: utilities" to my site at:
http://www.redefinery.com/ae/view.php?item=rd_utilities

It's a script containing helpful functions for accessing various AE objects. There's a link on the page that describes how to install and use it, and includes a quick reference of the included functions.

I hope you find them useful. Let me know if you encounter any problems with them or if you have suggestions for new utility functions.

Thanks,
Jeff
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

That looks really helpful, thanks!
Post Reply