Skip to content

Commit 3018afd

Browse files
committed
Merge branch 'develop' into fix_formatTools
2 parents a212ee8 + 92ebc31 commit 3018afd

File tree

17 files changed

+55
-24
lines changed

17 files changed

+55
-24
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ endif()
2323
# Diplay commands being ran by CMake
2424
set(CMAKE_VERBOSE_MAKEFILE OFF)
2525

26-
# Create an alias for all OFX plugins.
27-
add_custom_target(ofxplugins)
28-
2926
# Include subdirs
3027
set(SEQUENCEPARSER_PYTHON_VERSION ${TUTTLE_PYTHON_VERSION})
3128
add_subdirectory(libraries/sequenceParser)

INSTALL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ make
2020
make install
2121
```
2222

23+
Custom Makefile target:
24+
* ofxplugins: build all the OpenFX plugins.
25+
* ofxio: build readers and writers plugins.
26+
* ofxdisplay: build plugins to view images as a color cube, an histogram, or in a simple GL view port.
27+
* ofxgenerator: build plugins to generate basic inputs (checkerboard, bars, wheel...), images based on procedural geometry, or burn text on images.
28+
* ofxchannel: build plugins to process operations on channels of images.
29+
* ofxcolor: build plugins to process mathematics operations on color of images.
30+
* ofxfilter: build filter plugins.
31+
* ofxgeometry: build plugins to process mathematics operations on geometry of images.
32+
* ofxmath: build plugins to process mathematics operations on images.
33+
* ofxtime: build plugins to shift time.
34+
* ofxtransition: build plugins to process transitions.
35+
* ofxanalysis: build plugins to analyse (luminosity, channel values, Kurtosis, Skewness...) and compare images (psnr...).
36+
* ofxdebug: build plugins to display information about the host and all OpenFX plugins available.
2337

2438
## Additionnal dependencies for sam
2539

cmake/TuttleMacros.cmake

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ endfunction(tuttle_install_shared_libs)
5353

5454

5555
# Use this function to create a new plugin target
56+
# Each new plugin is added to 2 Makefile custom targets:
57+
# * 'ofxplugins'
58+
# * 'ofx<plugin_parent_dir>'
5659
# The first argument is the plugin name
5760
# the second argument is a list of files to compile
5861
function(tuttle_ofx_plugin_target PLUGIN_NAME)
@@ -111,20 +114,34 @@ function(tuttle_ofx_plugin_target PLUGIN_NAME)
111114
# Plugin target is a shared library
112115
add_library(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES})
113116

117+
# Get plugin parent directory
118+
get_filename_component(PLUGIN_PARENT_ABSOLUTE_PATH ${CMAKE_CURRENT_SOURCE_DIR} PATH)
119+
get_filename_component(PLUGIN_PARENT_DIR ${PLUGIN_PARENT_ABSOLUTE_PATH} NAME)
120+
set(PLUGIN_CUSTOM_TARGET "ofx${PLUGIN_PARENT_DIR}")
121+
set(PLUGIN_COMMON_TARGET "ofxplugins")
122+
123+
# Create custom target if it does not exist
124+
if(NOT TARGET ${PLUGIN_COMMON_TARGET})
125+
add_custom_target(${PLUGIN_COMMON_TARGET})
126+
endif()
127+
if(NOT TARGET ${PLUGIN_CUSTOM_TARGET})
128+
add_custom_target(${PLUGIN_CUSTOM_TARGET})
129+
endif()
130+
131+
# Add this new plugin to custom Makefile targets
132+
add_dependencies(${PLUGIN_COMMON_TARGET} ${PLUGIN_NAME})
133+
add_dependencies(${PLUGIN_CUSTOM_TARGET} ${PLUGIN_NAME})
134+
114135
# Static link with a common plugin library
115-
set(IS_IOPLUGIN ${ARGV2})
116-
if(IS_IOPLUGIN)
136+
if(${PLUGIN_PARENT_DIR} STREQUAL "io")
117137
target_link_libraries(${PLUGIN_NAME} tuttleIOPluginLib)
118-
else(IS_IOPLUGIN)
138+
else()
119139
target_link_libraries(${PLUGIN_NAME} tuttlePluginLib)
120-
endif(IS_IOPLUGIN)
140+
endif()
121141

122142
set_target_properties(${PLUGIN_NAME} PROPERTIES SUFFIX "${_plugin_version_suffix}.ofx")
123143
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
124144

125-
# Add this new plugin to the global alias ofxplugins
126-
add_dependencies(ofxplugins ${PLUGIN_NAME})
127-
128145
# FIXME: why tuttlePluginLib depends on OpenGL ? is it necessary ?
129146
if(APPLE)
130147
find_package(OpenGL)

plugins/image/io/AudioVideo/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
include(TuttleMacros)
33

44
# Create target AudioVideo
5-
tuttle_ofx_plugin_target(AudioVideo "" TRUE)
5+
tuttle_ofx_plugin_target(AudioVideo)
66

77
# Find ffmpeg libraries which are dependencies of avTranscoder
88
find_package(FFmpeg COMPONENTS avformat avcodec avutil swscale swresample)

plugins/image/io/AudioVideo/src/mainEntry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define OFXPLUGIN_VERSION_MAJOR 4
2-
#define OFXPLUGIN_VERSION_MINOR 7
2+
#define OFXPLUGIN_VERSION_MINOR 8
33

44
#include <tuttle/plugin/Plugin.hpp>
55
#include "reader/AVReaderPluginFactory.hpp"

plugins/image/io/Dpx/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Macros used to create an openfx plugin with tuttle
22
include(TuttleMacros)
33

4-
tuttle_ofx_plugin_target(Dpx "" True)
4+
tuttle_ofx_plugin_target(Dpx)
55

66
# Add include of dpx-google-code only to DPX plugin
77
target_include_directories(Dpx PUBLIC "src/dpx-google-code")

plugins/image/io/Exr/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Macros used to create an openfx plugin with tuttle
33
include(TuttleMacros)
44

5-
tuttle_ofx_plugin_target(Exr "" TRUE)
5+
tuttle_ofx_plugin_target(Exr)
66

77
# Add external libraries
88
set(Exr_LIBRARIES OpenEXR IlmBase sequenceParser)

plugins/image/io/Exr/src/reader/EXRReaderPlugin.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,10 @@ bool EXRReaderPlugin::getRegionOfDefinition(const OFX::RegionOfDefinitionArgumen
270270
{
271271
const std::string filepath(getAbsoluteFilenameAt(args.time));
272272
if(!bfs::exists(filepath))
273-
return false;
273+
{
274+
BOOST_THROW_EXCEPTION(exception::FileInSequenceNotExist() << exception::user("EXR: Unable to open file")
275+
<< exception::filename(filepath));
276+
}
274277

275278
try
276279
{

plugins/image/io/ImageMagick/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Macros used to create an openfx plugin with tuttle
33
include(TuttleMacros)
44

5-
tuttle_ofx_plugin_target(ImageMagick "" TRUE)
5+
tuttle_ofx_plugin_target(ImageMagick)
66

77
# Add external libraries with specific components
88
tuttle_ofx_plugin_add_library(ImageMagick ImageMagick COMPONENTS MagickCore)

0 commit comments

Comments
 (0)