ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Force script evaluation and update

COW Forums : Adobe After Effects Expressions

Respond to this post   •   Return to posts index   •   Read entire thread

Brecht Debackere
Re: Force script evaluation and update
on Apr 8, 2012 at 5:08:02 pm

OK. I've finally had time to set everything up and it seems to be working, though not efficiently due to the posted after effects script issue.

Here's what I wanted to do: use a midi controller for color correction or other effects tweaking.

1. I've set up a midi controller in Max/Msp. It registers the knob turns and writes the parameters to a file.
2. I've set up After Effects to read the contents of the file; adjusting the appropriate parameters of the effect.

Now, as I mentioned before, the problem is not that after effects is not reading the file, it's that it's not updating the viewer, unless you move to a next frame (or previous, generally one that has not been processed yet and is thus not cached)

As a work-around, I'm triggering an AppleScript from Max/Msp which sends after effects the following 'key presses': [ to place the layer in-point at the current time. This seems to re-evaluate the script, reading in the new values. Works wonderfully.

This of course is problematic, as it means it would only allow for an effect to be changed at the in-point of a layer, an not at another point in time, as the AppleScript would effectively move the layer...

To circumvent this, I've used the 'KeyEd Up' script to remap the keyboard shortcut for 'undo previous action' (applescript can't apparently not send the keycode for command-z or any command-combo shortcuts). This works aswell, as I see the layer jump back and forth when turning a knob on the midi controller.

The main issue now is speed... as the moving of the layer and the subsequent undo action takes up too much time it becomes much less intuitive. So the question remains, but might be clearer now, which other possible commands would force after effects to re-evaluate the expression and not show the cached image...???
Purge-all does not seem to have any effect whatsoever, as does disabling 'use disk cache' in the preferences...

Posts IndexRead Thread 

Current Message Thread:

© 2017 All Rights Reserved