From 597afa5f0778af6cbf72def1cf725d8735c50835 Mon Sep 17 00:00:00 2001 From: John Haddon Date: Fri, 15 Nov 2024 13:04:24 +0000 Subject: [PATCH] GafferML : Add library and module boilerplate --- SConstruct | 35 +++++++++++++- bin/gaffer | 13 +++++ bin/gaffer.cmd | 6 +++ include/GafferML/Export.h | 43 +++++++++++++++++ include/GafferML/TypeIds.h | 55 ++++++++++++++++++++++ python/GafferML/__init__.py | 49 +++++++++++++++++++ python/GafferMLTest/__init__.py | 39 +++++++++++++++ python/GafferMLUI/__init__.py | 37 +++++++++++++++ python/GafferMLUITest/DocumentationTest.py | 54 +++++++++++++++++++++ python/GafferMLUITest/NodeUITest.py | 52 ++++++++++++++++++++ python/GafferMLUITest/__init__.py | 41 ++++++++++++++++ src/GafferMLModule/GafferMLModule.cpp | 42 +++++++++++++++++ 12 files changed, 465 insertions(+), 1 deletion(-) create mode 100644 include/GafferML/Export.h create mode 100644 include/GafferML/TypeIds.h create mode 100644 python/GafferML/__init__.py create mode 100644 python/GafferMLTest/__init__.py create mode 100644 python/GafferMLUI/__init__.py create mode 100644 python/GafferMLUITest/DocumentationTest.py create mode 100644 python/GafferMLUITest/NodeUITest.py create mode 100644 python/GafferMLUITest/__init__.py create mode 100644 src/GafferMLModule/GafferMLModule.cpp diff --git a/SConstruct b/SConstruct index 246d37c3575..786e65cfc99 100644 --- a/SConstruct +++ b/SConstruct @@ -307,6 +307,12 @@ options.Add( ) ) +options.Add( + "ONNX_ROOT", + "The directory in which the ONNX runtime is installed. Used to build GafferML", + "", +) + # general variables options.Add( @@ -771,7 +777,7 @@ commandEnv["ENV"]["PYTHONPATH"] = commandEnv.subst( os.path.pathsep.join( [ "$BU # SIP on MacOS prevents DYLD_LIBRARY_PATH being passed down so we make sure # we also pass through to gaffer the other base vars it uses to populate paths # for third-party support. -for v in ( 'ARNOLD_ROOT', 'DELIGHT_ROOT' ) : +for v in ( 'ARNOLD_ROOT', 'DELIGHT_ROOT', 'ONNX_ROOT' ) : commandEnv["ENV"][ v ] = commandEnv[ v ] def runCommand( command ) : @@ -1109,6 +1115,33 @@ libraries = { }, }, + "GafferML" : { + "envAppends" : { + "CPPPATH" : [ "$ONNX_ROOT/include" ], + "LIBPATH" : [ "$ONNX_ROOT/lib" ], + "LIBS" : [ "Gaffer", "GafferImage", "onnxruntime" ], + }, + "pythonEnvAppends" : { + "CPPPATH" : [ "$ONNX_ROOT/include" ], + "LIBPATH" : [ "$ONNX_ROOT/lib" ], + "LIBS" : [ "GafferBindings", "GafferImage", "GafferML", "onnxruntime" ], + }, + "requiredOptions" : [ "ONNX_ROOT" ], + }, + + "GafferMLTest" : { + "requiredOptions" : [ "ONNX_ROOT" ], + "additionalFiles" : glob.glob( "python/GafferMLTest/models/*" ) + }, + + "GafferMLUI" : { + "requiredOptions" : [ "ONNX_ROOT" ], + }, + + "GafferMLUITest" : { + "requiredOptions" : [ "ONNX_ROOT" ], + }, + "IECoreArnold" : { "envAppends" : { "LIBPATH" : [ "$ARNOLD_ROOT/bin" ] if env["PLATFORM"] != "win32" else [ "$ARNOLD_ROOT/bin", "$ARNOLD_ROOT/lib" ], diff --git a/bin/gaffer b/bin/gaffer index 6eb2e2608a0..5bc5a6726db 100755 --- a/bin/gaffer +++ b/bin/gaffer @@ -305,6 +305,19 @@ if [[ -n $DELIGHT ]] ; then fi +# Set up ONNX +########################################################################## + +if [[ -n $ONNX_ROOT ]] ; then + + if [[ `uname` = "Linux" ]] ; then + appendToPath "$ONNX_ROOT/lib" LD_LIBRARY_PATH + else + appendToPath "$ONNX_ROOT/lib" DYLD_LIBRARY_PATH + fi + +fi + # Set up 3rd Party extensions ########################################################################## diff --git a/bin/gaffer.cmd b/bin/gaffer.cmd index 7de2be18fe2..635eb611ba3 100644 --- a/bin/gaffer.cmd +++ b/bin/gaffer.cmd @@ -140,6 +140,12 @@ if "%CYCLES_ROOT%" NEQ "" ( call :prependToPath "%CYCLES_ROOT%\bin" PATH ) +rem ONNX +rem ==== + +if "%ONNX_ROOT%" NEQ "" ( + call :appendToPath "%ONNX_ROOT%\lib" PATH +) rem Set up 3rd party extensions rem Batch files are awkward at `for` loops. The default `for`, without `/f` diff --git a/include/GafferML/Export.h b/include/GafferML/Export.h new file mode 100644 index 00000000000..4c1bfdd418e --- /dev/null +++ b/include/GafferML/Export.h @@ -0,0 +1,43 @@ +////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * Neither the name of Image Engine Design nor the names of any +// other contributors to this software may be used to endorse or +// promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////// + +#pragma once + +#include "IECore/Export.h" + +#ifdef GafferML_EXPORTS + #define GAFFERML_API IECORE_EXPORT +#else + #define GAFFERML_API IECORE_IMPORT +#endif diff --git a/include/GafferML/TypeIds.h b/include/GafferML/TypeIds.h new file mode 100644 index 00000000000..95125b0d2a0 --- /dev/null +++ b/include/GafferML/TypeIds.h @@ -0,0 +1,55 @@ +////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above +// copyright notice, this list of conditions and the following +// disclaimer. +// +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided with +// the distribution. +// +// * Neither the name of John Haddon nor the names of +// any other contributors to this software may be used to endorse or +// promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////// + +#pragma once + +namespace GafferML +{ + +enum TypeId +{ + TensorTypeId = 110451, + TensorPlugTypeId = 110452, + ImageToTensorTypeId = 110453, + TensorToImageTypeId = 110454, + InferenceTypeId = 110455, + TensorReaderTypeId = 110456, + DataToTensorTypeId = 110457, + + LastTypeId = 110500 +}; + +} // namespace GafferML diff --git a/python/GafferML/__init__.py b/python/GafferML/__init__.py new file mode 100644 index 00000000000..707fcbc0d8f --- /dev/null +++ b/python/GafferML/__init__.py @@ -0,0 +1,49 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +import os +import pathlib + +__import__( "Gaffer" ) +__import__( "GafferImage" ) + +if hasattr( os, "add_dll_directory" ) : + os.add_dll_directory( ( pathlib.Path( os.environ["ONNX_ROOT"] ) / "lib" ).resolve() ) +del os, pathlib # Don't pollute the namespace + +from ._GafferML import * + +__import__( "IECore" ).loadConfig( "GAFFER_STARTUP_PATHS", subdirectory = "GafferML" ) diff --git a/python/GafferMLTest/__init__.py b/python/GafferMLTest/__init__.py new file mode 100644 index 00000000000..00238c96ef5 --- /dev/null +++ b/python/GafferMLTest/__init__.py @@ -0,0 +1,39 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +if __name__ == "__main__": + import unittest + unittest.main() diff --git a/python/GafferMLUI/__init__.py b/python/GafferMLUI/__init__.py new file mode 100644 index 00000000000..573d1b5fbe2 --- /dev/null +++ b/python/GafferMLUI/__init__.py @@ -0,0 +1,37 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +__import__( "IECore" ).loadConfig( "GAFFER_STARTUP_PATHS", subdirectory = "GafferMLUI" ) diff --git a/python/GafferMLUITest/DocumentationTest.py b/python/GafferMLUITest/DocumentationTest.py new file mode 100644 index 00000000000..45b5fdff387 --- /dev/null +++ b/python/GafferMLUITest/DocumentationTest.py @@ -0,0 +1,54 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +import GafferUITest + +import GafferImage +import GafferML +import GafferMLUI + +class DocumentationTest( GafferUITest.TestCase ) : + + def test( self ) : + + self.maxDiff = None + self.assertNodesAreDocumented( + GafferML, + additionalTerminalPlugTypes = ( GafferImage.ImagePlug, ) + ) + +if __name__ == "__main__": + unittest.main() diff --git a/python/GafferMLUITest/NodeUITest.py b/python/GafferMLUITest/NodeUITest.py new file mode 100644 index 00000000000..a3ceecfd67f --- /dev/null +++ b/python/GafferMLUITest/NodeUITest.py @@ -0,0 +1,52 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +import unittest + +import Gaffer +import GafferUI +import GafferUITest +import GafferML +import GafferMLUI + +class NodeUITest( GafferUITest.TestCase ) : + + def testLifetimes( self ) : + + self.assertNodeUIsHaveExpectedLifetime( GafferML ) + +if __name__ == "__main__": + unittest.main() diff --git a/python/GafferMLUITest/__init__.py b/python/GafferMLUITest/__init__.py new file mode 100644 index 00000000000..ffd46580d91 --- /dev/null +++ b/python/GafferMLUITest/__init__.py @@ -0,0 +1,41 @@ +########################################################################## +# +# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above +# copyright notice, this list of conditions and the following +# disclaimer. +# +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided with +# the distribution. +# +# * Neither the name of John Haddon nor the names of +# any other contributors to this software may be used to endorse or +# promote products derived from this software without specific prior +# written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +########################################################################## + +from .DocumentationTest import DocumentationTest +from .NodeUITest import NodeUITest + +if __name__ == "__main__": + unittest.main() diff --git a/src/GafferMLModule/GafferMLModule.cpp b/src/GafferMLModule/GafferMLModule.cpp new file mode 100644 index 00000000000..b999c69b8f0 --- /dev/null +++ b/src/GafferMLModule/GafferMLModule.cpp @@ -0,0 +1,42 @@ +////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2012, John Haddon. All rights reserved. +// Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above +// copyright notice, this list of conditions and the following +// disclaimer. +// +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided with +// the distribution. +// +// * Neither the name of John Haddon nor the names of +// any other contributors to this software may be used to endorse or +// promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +////////////////////////////////////////////////////////////////////////// + +#include "boost/python.hpp" + +BOOST_PYTHON_MODULE( _GafferML ) +{ +}