1.0.1 • Published 6 years ago
aftereffect-script-launcher v1.0.1
AfterEffect-Script-Launcher
Run your jsx code in Adobe After effect. Adobe After effect must be installed.
Os supported
- Windows
Installation
$ npm i aftereffect-script-launcherUsage
Generate JSX
Sometimes you need to insert data generated by your program into jsx code. It helps to combine the reference code with your code.
const AfterEffectScriptLauncher = require('aftereffect-script-launcher')()
let prefixCode = 'var data = [1,2,3,4]'
AfterEffectScriptLauncher.generate(
	prefixCode,
	'/path/to/input/script.jsx',
	'/path/to/output/script.jsx',
)
	.then(path => {
		console.log('jsx generate success')
	})
	.catch(err => {
		console.log('jsx generate fail')
		console.log(err)
	})Run JSX
Run the jsx file in Adobe After Effect. If the After Effect is not running, run the script with the After Effect turned on and then exit.
AfterEffectScriptLauncher.run('/path/to/script.jsx')
	.then(code => {
		console.log('jsx run success')
	})
	.catch(err => {
		console.log('jsx run fail')
		console.log(err)
	})