Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed windows script to deal with spaces #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AfterEffectsScripting.sublime-build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"shell": true,
"windows":
{
"cmd": ["cd ${packages}\\AfterEffects\\ && build.bat $file_name $file_path"],
"encoding": "cp850"
"cmd": ["build.bat", "$file_name", "$file_path"],
"encoding": "cp850",
"working_dir": "${packages}\\After-Effects-Scripting-Sublime-Text-Package\\"
}
}
18 changes: 12 additions & 6 deletions build.bat
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
@echo off
:: Renaming arguments
set file_name=%1%
set file_path=%2%
set file_path=%2%

:: Change this accordingly to your CS version
set version=CS6
:: Kludgy, but it works
if EXIST "c:\Program Files\Adobe\Adobe After Effects CS5" set version=CS5
if EXIST "c:\Program Files\Adobe\Adobe After Effects CS6" set version=CS6
if EXIST "c:\Program Files\Adobe\Adobe After Effects CC 2014" set version=CC 2014
if EXIST "c:\Program Files\Adobe\Adobe After Effects CC 2015" set version=CC 2015
::for future versions, as long as adobe don't change their naming system
if EXIST "c:\Program Files\Adobe\Adobe After Effects CC 2016" set version=CC 2016
if EXIST "c:\Program Files\Adobe\Adobe After Effects CC 2017" set version=CC 2017

:: Adobe After Effects folder location
set base_path=c:\Program Files\Adobe
set ae_folder_path=%base_path%\Adobe After Effects %version%
set ae_scripts_folder_path=%ae_folder_path%\Support Files\Scripts

::echo %ae_scripts_folder_path%

cd "%file_path%"

Expand All @@ -19,8 +25,8 @@ copy "%file_name%" "%ae_scripts_folder_path%\%file_name%"

cd "%ae_folder_path%\Support Files"

:: Running script in After Effect
:: Running script in After Effects
AfterFX -r "%ae_scripts_folder_path%\%file_name%"

:: Printing happy feedback in the console
echo "Successfully compiled %file_name% to %full_path%\%file_name%";
echo "Successfully compiled %file_name% to %full_path%\%file_name%";