-
Notifications
You must be signed in to change notification settings - Fork 344
How to compile and install base OpenFX plug ins [Unix only for now]
This tutorial will show you how to compile some OpenFX plug-ins and where to install them in order for Natron to load them.
After this tutorial you will be able to use these plug-ins:
- OpenFX-IO to read anything else than standard 8-bits images
- OpenFX-Misc
- OpenFX-Yadif deinterlacer
- OpenFX samples (in the Support and Examples directories)
Bear in mind a lot more OpenFX plug-ins exist and don't have to be compiled manually. Some of them are open-source, like the
- TuttleOFX suite.
Or you can find commercial plug-ins around the web:
They have been tested and work properly in Natron.
###This tutorial assumes that you already have all the development libraries required installed on your computer.
$ git clone https://github.com/NatronGitHub/openfx.git
$ git clone https://github.com/NatronGitHub/openfx-yadif.git
$ git clone https://github.com/NatronGitHub/openfx-opencv.git
$ git clone https://github.com/NatronGitHub/openfx-io.git
$ for i in openfx*; do (echo $i;cd $i; git submodule foreach git pull origin master); done
Create the following directories:
/Library/OFX/Plugins
and give your user account all the access rights to that directory so you don't need to enter your password whenever you copy/move a plug-in to that location.
Now in your shell, cd to the location where you cloned the sources and type the following commands:
bits=64
if [ `uname -s` = "Darwin" ]; then
macosx=`uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'`
case "$macosx" in
[1-8])
bits=32
;;
9|10)
bits=Universal
;;
esac;
echo "Building for architecture $bits"
fi
ofx=/Library/OFX
cd openfx
git pull
cd Examples
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
rm -rf $ofx/Plugins/Examples.debug
mkdir -p $ofx/Plugins/Examples.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Examples.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/Examples
mkdir -p $ofx/Plugins.disabled/Examples
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Examples
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../Support/Plugins
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
rm -rf $ofx/Plugins/Support.debug
mkdir -p $ofx/Plugins/Support.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Support.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/Support
mkdir -p $ofx/Plugins.disabled/Support
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Support
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../PropTester
rm -rf *-${bits}-release *-${bits}-debug
rm *.o
make BITS=$bits
rm -rf $ofx/Plugins/PropTester.debug
mkdir -p $ofx/Plugins/PropTester.debug
mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/PropTester.debug
rm *.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/PropTester
mkdir -p $ofx/Plugins.disabled/PropTester
mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/PropTester
rm -rf *-${bits}-release *-${bits}-debug
cd ../../..
cd openfx-yadif
git pull
git submodule update -i;git submodule foreach git pull origin master
rm -rf *-${bits}-release *-${bits}-debug
rm *.o
make BITS=$bits
rm -rf $ofx/Plugins/yadif.debug
mkdir -p $ofx/Plugins/yadif.debug
mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/yadif.debug
rm *.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/yadif
mkdir -p $ofx/Plugins.disabled/yadif
mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/yadif
rm -rf *-${bits}-release *-${bits}-debug
cd ..
cd openfx-opencv
git pull
git submodule update -i;git submodule foreach git pull origin master
cd opencv2fx
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
rm -rf $ofx/Plugins/opencv2fx.debug
mkdir -p $ofx/Plugins/opencv2fx.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/opencv2fx.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/opencv2fx
mkdir -p $ofx/Plugins.disabled/opencv2fx
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/opencv2fx
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../..
cd openfx-io
git pull
git submodule update -i;git submodule foreach git pull origin master
rm *.o */*.o
make BITS=$bits
rm -rf $ofx/Plugins/io.debug
mkdir -p $ofx/Plugins/io.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/io.debug
rm *.o */*.o
make BITS=$bits DEBUGFLAG=-O3
rm -rf $ofx/Plugins.disabled/io
mkdir -p $ofx/Plugins.disabled/io
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/io
rm -rf */*-${bits}-release */*-${bits}-debug
cd ..
Create the following directory:
/usr/OFX/Plugins
and give your user account all the access rights to that directory so you don't need to enter your password whenever you copy/move a plug-in to that location.
Now in your shell, cd to the location where you cloned the sources and type the following commands:
Replace bits=64 by bits=32 if you want to compile for 32 bits.
bits=64
ofx=/usr/OFX
cd openfx
git pull
cd Examples
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
mkdir -p $ofx/Plugins/Examples.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Examples.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/Examples
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Examples
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../Support/Plugins
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
mkdir -p $ofx/Plugins/Support.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Support.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/Support
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Support
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../PropTester
rm -rf *-${bits}-release *-${bits}-debug
rm *.o
make BITS=$bits
mkdir -p $ofx/Plugins/PropTester.debug
mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/PropTester.debug
rm *.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/PropTester
mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/PropTester
rm -rf *-${bits}-release *-${bits}-debug
cd ../../..
cd openfx-yadif
git pull
git submodule update -i;git submodule foreach git pull origin master
rm -rf *-${bits}-release *-${bits}-debug
rm *.o
make BITS=$bits
mkdir -p $ofx/Plugins/yadif.debug
mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/yadif.debug
rm *.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/yadif
mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/yadif
rm -rf *-${bits}-release *-${bits}-debug
cd ..
cd openfx-opencv
git pull
git submodule update -i;git submodule foreach git pull origin master
cd opencv2fx
rm -rf */*-${bits}-release */*-${bits}-debug
rm */*.o
make BITS=$bits
mkdir -p $ofx/Plugins/opencv2fx.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/opencv2fx.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/opencv2fx
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/opencv2fx
rm -rf */*-${bits}-release */*-${bits}-debug
cd ../..
cd openfx-io
git pull
git submodule update -i;git submodule foreach git pull origin master
make BITS=$bits
mkdir -p $ofx/Plugins/io.debug
mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/io.debug
rm */*.o
make BITS=$bits DEBUGFLAG=-O3
mkdir -p $ofx/Plugins.disabled/io
mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/io
rm -rf */*-${bits}-release */*-${bits}-debug
cd ..