diff --git a/App/App.pro b/App/App.pro index f2e3461a11..2329a04feb 100644 --- a/App/App.pro +++ b/App/App.pro @@ -40,8 +40,7 @@ CONFIG += moc CONFIG += boost boost-serialization-lib opengl qt cairo python shiboken pyside CONFIG += static-gui static-engine static-host-support static-breakpadclient static-libmv static-openmvg static-ceres static-qhttpserver static-libtess -QT += gui core opengl network -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent +QT += gui core opengl network widgets concurrent !noexpat: CONFIG += expat diff --git a/CrashReporter/CrashReporter.pro b/CrashReporter/CrashReporter.pro index b39d59447e..7e030534d6 100755 --- a/CrashReporter/CrashReporter.pro +++ b/CrashReporter/CrashReporter.pro @@ -43,8 +43,7 @@ win32 { CONFIG += moc CONFIG += qt -QT += core network gui opengl -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +QT += core network gui opengl widgets CONFIG += static-breakpadclient include(../global.pri) diff --git a/Engine/AppManager.cpp b/Engine/AppManager.cpp index cba7a4658c..134d7d4859 100644 --- a/Engine/AppManager.cpp +++ b/Engine/AppManager.cpp @@ -143,10 +143,6 @@ #include "AppManagerPrivate.h" // include breakpad after Engine, because it includes /usr/include/AssertMacros.h on OS X which defines a check(x) macro, which conflicts with boost -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -Q_DECLARE_METATYPE(QAbstractSocket::SocketState) -#endif - NATRON_NAMESPACE_ENTER AppManager* AppManager::_instance = 0; @@ -326,14 +322,6 @@ AppManager::loadFromArgs(const CLArgs& cl) #endif #endif - // Ensure Qt knows C-strings are UTF-8 before creating the QApplication for argv -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - // be forward compatible: source code is UTF-8, and Qt5 assumes UTF-8 by default - QTextCodec::setCodecForCStrings( QTextCodec::codecForName("UTF-8") ); - QTextCodec::setCodecForTr( QTextCodec::codecForName("UTF-8") ); -#endif - - // This needs to be done BEFORE creating qApp because // on Linux, X11 will create a context that would corrupt // the XUniqueContext created by Qt @@ -2036,18 +2024,10 @@ AppManager::registerPlugin(const QString& resourcesPath, int minor, bool isDeprecated) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* pluginMutex = nullptr; -#else - QMutex* pluginMutex = 0; -#endif if (mustCreateMutex) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) pluginMutex = new QRecursiveMutex(); -#else - pluginMutex = new QMutex(QMutex::Recursive); -#endif } Plugin* plugin = new Plugin(binary, resourcesPath, pluginID, pluginLabel, pluginIconPath, groupIconPath, groups, pluginMutex, major, minor, isReader, isWriter, isDeprecated); @@ -2529,9 +2509,6 @@ AppManager::registerEngineMetaTypes() const qRegisterMetaType("ViewSpec"); qRegisterMetaType("NodePtr"); qRegisterMetaType >("std::list"); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - qRegisterMetaType("SocketState"); -#endif } void @@ -3035,11 +3012,7 @@ AppManager::initPython() } // Set QT_API for QtPy // https://github.com/spyder-ide/qtpy -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - qputenv("QT_API", "pyside"); -#else qputenv("QT_API", "pyside2"); -#endif } // AppManager::initPython void diff --git a/Engine/AppManagerPrivate.cpp b/Engine/AppManagerPrivate.cpp index 82f18cd11b..cf64681422 100644 --- a/Engine/AppManagerPrivate.cpp +++ b/Engine/AppManagerPrivate.cpp @@ -282,10 +282,8 @@ AppManagerPrivate::AppManagerPrivate() runningThreadsCount = 0; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) && defined(__NATRON_LINUX__) +#if defined(__NATRON_LINUX__) onWayland = qEnvironmentVariableIsSet("WAYLAND_DISPLAY") && !qEnvironmentVariableIsSet("NATRON_DISABLE_WAYLAND"); -#else - onWayland = false; #endif } @@ -607,13 +605,10 @@ AppManagerPrivate::cleanUpCacheDiskStructure(const QString & cachePath, bool isT QDir cacheFolder(cachePath); -# if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QtCompat::removeRecursively(cachePath); -# else if ( cacheFolder.exists() ) { cacheFolder.removeRecursively(); } -#endif + if ( !cacheFolder.exists() ) { bool success = cacheFolder.mkpath( QChar::fromLatin1('.') ); if (!success) { diff --git a/Engine/CMakeLists.txt b/Engine/CMakeLists.txt index 9cf20b076a..2e023b7631 100644 --- a/Engine/CMakeLists.txt +++ b/Engine/CMakeLists.txt @@ -59,9 +59,6 @@ if(UNIX AND NOT APPLE) endif() endif() -if(APPLE) - list(APPEND NatronEngine_SOURCES QUrlFix.mm) -endif() list(APPEND NatronEngine_SOURCES ${NatronEngine_SOURCES} diff --git a/Engine/CurvePrivate.h b/Engine/CurvePrivate.h index 85a38462b9..65101f32f3 100644 --- a/Engine/CurvePrivate.h +++ b/Engine/CurvePrivate.h @@ -29,9 +29,7 @@ #include "Global/Macros.h" #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #include -#endif #include "Engine/Variant.h" #include "Engine/Knob.h" @@ -66,11 +64,8 @@ struct CurvePrivate CurveTypeEnum type; double xMin, xMax; double yMin, yMax; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex _lock; -#else - mutable QMutex _lock; //< the plug-ins can call getValueAt at any moment and we must make sure the user is not playing around -#endif + bool isParametric; bool isPeriodic; @@ -86,22 +81,14 @@ struct CurvePrivate , xMax(std::numeric_limits::infinity()) , yMin(-std::numeric_limits::infinity()) , yMax(std::numeric_limits::infinity()) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , _lock() -#else - , _lock(QMutex::Recursive) -#endif , isParametric(false) , isPeriodic(false) { } CurvePrivate(const CurvePrivate & other) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) : _lock() -#else - : _lock(QMutex::Recursive) -#endif { *this = other; } diff --git a/Engine/EffectInstancePrivate.cpp b/Engine/EffectInstancePrivate.cpp index 06c5bdf2ec..0dc8405935 100644 --- a/Engine/EffectInstancePrivate.cpp +++ b/Engine/EffectInstancePrivate.cpp @@ -423,11 +423,7 @@ EffectInstance::Implementation::Implementation(EffectInstance* publicInterface) , metadata() , runningClipPreferences(false) , overlaysViewport(0) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , attachedContextsMutex() -#else - , attachedContextsMutex(QMutex::Recursive) -#endif , attachedContexts() , mainInstance(0) , isDoingInstanceSafeRender(false) @@ -457,11 +453,7 @@ EffectInstance::Implementation::Implementation(const Implementation& other) , metadata(other.metadata) , runningClipPreferences(other.runningClipPreferences) , overlaysViewport(other.overlaysViewport) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , attachedContextsMutex() -#else -, attachedContextsMutex(QMutex::Recursive) -#endif , attachedContexts() , mainInstance(other._publicInterface) , isDoingInstanceSafeRender(false) diff --git a/Engine/EffectInstancePrivate.h b/Engine/EffectInstancePrivate.h index 5f767ff6a1..2ed88cafbd 100644 --- a/Engine/EffectInstancePrivate.h +++ b/Engine/EffectInstancePrivate.h @@ -37,9 +37,7 @@ #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #include -#endif #include "Global/GlobalDefines.h" @@ -227,11 +225,8 @@ class EffectInstance::Implementation // set during interact actions on main-thread OverlaySupport* overlaysViewport; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex attachedContextsMutex; -#else - mutable QMutex attachedContextsMutex; -#endif + // A list of context that are currently attached (i.e attachOpenGLContext() has been called on them but not yet dettachOpenGLContext). // If a plug-in returns false to supportsConcurrentOpenGLRenders() then whenever trying to attach a context, we take a lock in attachOpenGLContext // that is released in dettachOpenGLContext so that there can only be a single attached OpenGL context at any time. diff --git a/Engine/Engine.pro b/Engine/Engine.pro index 748d7be8e9..3906c2e69f 100644 --- a/Engine/Engine.pro +++ b/Engine/Engine.pro @@ -22,15 +22,12 @@ TEMPLATE = lib CONFIG += staticlib CONFIG += moc CONFIG += boost boost-serialization-lib qt cairo python shiboken pyside -QT += core network -greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent +QT += core network concurrent ENGINE_WRAPPER_DIR = Qt$${QT_MAJOR_VERSION}/NatronEngine !noexpat: CONFIG += expat -# Do not uncomment the following: pyside requires QtGui, because PySide/QtCore/pyside_qtcore_python.h includes qtextdocument.h -#QT -= gui CONFIG += libmv-flags openmvg-flags glad-flags libtess-flags @@ -168,7 +165,6 @@ SOURCES += \ PyNodeGroup.cpp \ PyParameter.cpp \ PyRoto.cpp \ - PySideCompat.cpp \ PyTracker.cpp \ ReadNode.cpp \ RectD.cpp \ @@ -490,62 +486,3 @@ for(name, ENGINE_GENERATED_SOURCES) { OTHER_FILES += \ typesystem_engine.xml - -# GENERATED_SOURCES = \ -# NatronEngine/animatedparam_wrapper.cpp \ -# NatronEngine/app_wrapper.cpp \ -# NatronEngine/beziercurve_wrapper.cpp \ -# NatronEngine/booleanparam_wrapper.cpp \ -# NatronEngine/buttonparam_wrapper.cpp \ -# NatronEngine/choiceparam_wrapper.cpp \ -# NatronEngine/colorparam_wrapper.cpp \ -# NatronEngine/colortuple_wrapper.cpp \ -# NatronEngine/double2dparam_wrapper.cpp \ -# NatronEngine/double2dtuple_wrapper.cpp \ -# NatronEngine/double3dparam_wrapper.cpp \ -# NatronEngine/double3dtuple_wrapper.cpp \ -# NatronEngine/doubleparam_wrapper.cpp \ -# NatronEngine/effect_wrapper.cpp \ -# NatronEngine/fileparam_wrapper.cpp \ -# NatronEngine/group_wrapper.cpp \ -# NatronEngine/groupparam_wrapper.cpp \ -# NatronEngine/int2dparam_wrapper.cpp \ -# NatronEngine/int2dtuple_wrapper.cpp \ -# NatronEngine/int3dparam_wrapper.cpp \ -# NatronEngine/int3dtuple_wrapper.cpp \ -# NatronEngine/intparam_wrapper.cpp \ -# NatronEngine/itembase_wrapper.cpp \ -# NatronEngine/layer_wrapper.cpp \ -# NatronEngine/natron_wrapper.cpp \ -# NatronEngine/natronengine_module_wrapper.cpp \ -# NatronEngine/outputfileparam_wrapper.cpp \ -# NatronEngine/pageparam_wrapper.cpp \ -# NatronEngine/param_wrapper.cpp \ -# NatronEngine/parametricparam_wrapper.cpp \ -# NatronEngine/pathparam_wrapper.cpp \ -# NatronEngine/roto_wrapper.cpp \ -# NatronEngine/stringparam_wrapper.cpp \ -# NatronEngine/stringparambase_wrapper.cpp - -# defineReplace(shibokenWorkaround) { -# SOURCES += $$GENERATED_SOURCES -# return("%_wrapper.cpp") -# } - -# isEmpty(SHIBOKEN) { -# SHIBOKEN = shiboken -# } - -# SHIBOKEN_FILE = . # Need to give some bogus input -# SHIBOKEN.input = SHIBOKEN_FILE -# SHIBOKEN.output_function = shibokenWorkaround -# SHIBOKEN.commands = $$SHIBOKEN --include-paths=..:$$system(pkg-config --variable=includedir pyside) --typesystem-paths=$$system(pkg-config --variable=typesystemdir pyside) Pyside_Engine_Python.h typesystem_engine.xml -# SHIBOKEN.CONFIG = no_link # don't add the .cpp target file to OBJECTS -# SHIBOKEN.clean = dummy # don't remove the %_wrapper.cpp file by "make clean" - -# QMAKE_EXTRA_COMPILERS += SHIBOKEN -macx { - -OBJECTIVE_SOURCES += \ - QUrlFix.mm -} diff --git a/Engine/FileSystemModel.cpp b/Engine/FileSystemModel.cpp index 7442c67282..63841176ac 100644 --- a/Engine/FileSystemModel.cpp +++ b/Engine/FileSystemModel.cpp @@ -769,11 +769,7 @@ Qt::ItemFlags FileSystemModel::flags(const QModelIndex &index) const { if ( !index.isValid() ) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return Qt::ItemFlags(); -#else - return 0; -#endif } // Our model is read only. diff --git a/Engine/Knob.cpp b/Engine/Knob.cpp index 2c0cd87abb..acc4437770 100644 --- a/Engine/Knob.cpp +++ b/Engine/Knob.cpp @@ -4902,11 +4902,7 @@ struct KnobHolder::KnobHolderPrivate , isDequeingValuesSet(false) , paramsEditLevel(eMultipleParamsEditOff) , paramsEditRecursionLevel(0) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , evaluationBlockedMutex() -#else - , evaluationBlockedMutex(QMutex::Recursive) -#endif , evaluationBlocked(0) , canCurrentlySetValue(true) , knobChanged() @@ -4934,11 +4930,7 @@ struct KnobHolder::KnobHolderPrivate , isDequeingValuesSet(other.isDequeingValuesSet) , paramsEditLevel(other.paramsEditLevel) , paramsEditRecursionLevel(other.paramsEditRecursionLevel) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , evaluationBlockedMutex() -#else - , evaluationBlockedMutex(QMutex::Recursive) -#endif , evaluationBlocked(0) , canCurrentlySetValue(other.canCurrentlySetValue) , knobChanged() diff --git a/Engine/Knob.h b/Engine/Knob.h index 0c1e57dafd..b272688407 100644 --- a/Engine/Knob.h +++ b/Engine/Knob.h @@ -37,9 +37,7 @@ #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #include -#endif #include "Engine/Variant.h" #include "Engine/AppManager.h" // for AppManager::createKnob @@ -2245,11 +2243,8 @@ class Knob typedef std::shared_ptr QueuedSetValueAtTimePtr; ///Here is all the stuff we couldn't get rid of the template parameter -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex _valueMutex; -#else - mutable QMutex _valueMutex; //< protects _values & _guiValues & _defaultValues & ExprResults -#endif + std::vector _values, _guiValues; struct DefaultValue @@ -2263,19 +2258,13 @@ class Knob //Only for double and int mutable QReadWriteLock _minMaxMutex; std::vector _minimums, _maximums, _displayMins, _displayMaxs; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex _setValuesQueueMutex; -#else - mutable QMutex _setValuesQueueMutex; -#endif + std::list > _setValuesQueue; ///this flag is to avoid recursive setValue calls -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex _setValueRecursionLevelMutex; -#else - mutable QMutex _setValueRecursionLevelMutex; -#endif + int _setValueRecursionLevel; }; diff --git a/Engine/KnobImpl.h b/Engine/KnobImpl.h index bd82aa9c26..6db230e508 100644 --- a/Engine/KnobImpl.h +++ b/Engine/KnobImpl.h @@ -101,31 +101,19 @@ Knob::Knob(KnobHolder* holder, int dimension, bool declaredByPlugin ) : KnobHelper(holder, description, dimension, declaredByPlugin) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , _valueMutex() -#else - , _valueMutex(QMutex::Recursive) -#endif , _values(dimension) , _guiValues(dimension) , _defaultValues(dimension) , _exprRes(dimension) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , _minMaxMutex() -#else - , _minMaxMutex(QReadWriteLock::Recursive) -#endif , _minimums(dimension) , _maximums(dimension) , _displayMins(dimension) , _displayMaxs(dimension) , _setValuesQueueMutex() , _setValuesQueue() -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , _setValueRecursionLevelMutex() -#else - , _setValueRecursionLevelMutex(QMutex::Recursive) -#endif , _setValueRecursionLevel(0) { initMinMax(); diff --git a/Engine/NodeGroup.cpp b/Engine/NodeGroup.cpp index 06b805a630..ab0cfd5ef9 100644 --- a/Engine/NodeGroup.cpp +++ b/Engine/NodeGroup.cpp @@ -1055,11 +1055,8 @@ NodeCollection::getParallelRenderArgs(std::map& struct NodeGroupPrivate { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex nodesLock; -#else - mutable QMutex nodesLock; // protects inputs & outputs -#endif + std::vector inputs, guiInputs; NodesWList outputs, guiOutputs; bool isDeactivatingGroup; @@ -1068,11 +1065,7 @@ struct NodeGroupPrivate KnobButtonPtr exportAsTemplate, convertToGroup; NodeGroupPrivate() -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) : nodesLock() -#else - : nodesLock(QMutex::Recursive) -#endif , inputs() , guiInputs() , outputs() diff --git a/Engine/NodePrivate.h b/Engine/NodePrivate.h index 088d72f13e..06c8528b56 100644 --- a/Engine/NodePrivate.h +++ b/Engine/NodePrivate.h @@ -173,11 +173,7 @@ struct Node::Implementation , mustQuitPreview(0) , mustQuitPreviewMutex() , mustQuitPreviewCond() -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , renderInstancesSharedMutex() -#else - , renderInstancesSharedMutex(QMutex::Recursive) -#endif , knobsAge(0) , knobsAgeMutex() , masterNodeMutex() diff --git a/Engine/OfxHost.cpp b/Engine/OfxHost.cpp index 76766be237..6d1e0e8c15 100644 --- a/Engine/OfxHost.cpp +++ b/Engine/OfxHost.cpp @@ -1122,12 +1122,9 @@ OfxHost::clearPluginsLoadedCache() if ( QFile::exists(oldOfxCache) ) { QFile::remove(oldOfxCache); } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QtCompat::removeRecursively( getOFXCacheDirPath() ); -#else + QDir OFXCacheDir( getOFXCacheDirPath() ); OFXCacheDir.removeRecursively(); -#endif } void @@ -1535,11 +1532,8 @@ OfxHost::mutexCreate(OfxMutexHandle *mutex, // suite functions should not throw try { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* m = new QRecursiveMutex(); -#else - QMutex* m = new QMutex(QMutex::Recursive); -#endif + for (int i = 0; i < lockCount; ++i) { m->lock(); } diff --git a/Engine/Plugin.cpp b/Engine/Plugin.cpp index 8e6d9a76fb..1478a5e362 100644 --- a/Engine/Plugin.cpp +++ b/Engine/Plugin.cpp @@ -178,11 +178,7 @@ Plugin::getGrouping() const return _grouping; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* -#else -QMutex* -#endif Plugin::getPluginLock() const { return _lock; diff --git a/Engine/Plugin.h b/Engine/Plugin.h index 28b3df3697..3f1b743348 100644 --- a/Engine/Plugin.h +++ b/Engine/Plugin.h @@ -34,9 +34,7 @@ #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) #include -#endif #include "Global/Enums.h" #include "Engine/EngineFwd.h" @@ -171,11 +169,8 @@ class Plugin QString _pythonModule; OFX::Host::ImageEffect::ImageEffectPlugin* _ofxPlugin; OFX::Host::ImageEffect::Descriptor* _ofxDescriptor; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* _lock; -#else - QMutex* _lock; -#endif + int _majorVersion; int _minorVersion; NATRON_ENUM::ContextEnum _ofxContext; @@ -241,11 +236,8 @@ class Plugin const QString & iconFilePath, const QStringList & groupIconFilePath, const QStringList & grouping, -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* lock, -#else - QMutex* lock, -#endif + int majorVersion, int minorVersion, bool isReader, @@ -344,11 +336,8 @@ class Plugin bool getToolsetScript() const; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QRecursiveMutex* getPluginLock() const; -#else - QMutex* getPluginLock() const; -#endif + LibraryBinary* getLibraryBinary() const; int getMajorVersion() const; diff --git a/Engine/ProjectPrivate.cpp b/Engine/ProjectPrivate.cpp index 03932084a7..7a298e4c2f 100644 --- a/Engine/ProjectPrivate.cpp +++ b/Engine/ProjectPrivate.cpp @@ -64,11 +64,7 @@ ProjectPrivate::ProjectPrivate(Project* project) , projectCreationTime(ageSinceLastSave) , builtinFormats() , additionalFormats() -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , formatMutex() -#else - , formatMutex(QMutex::Recursive) -#endif , envVars() , projectName() , projectPath() diff --git a/Engine/ProjectPrivate.h b/Engine/ProjectPrivate.h index fbca0b3263..0935016cdd 100644 --- a/Engine/ProjectPrivate.h +++ b/Engine/ProjectPrivate.h @@ -68,12 +68,7 @@ struct ProjectPrivate QDateTime projectCreationTime; //< the project creation time std::list builtinFormats; std::list additionalFormats; //< added by the user -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex formatMutex; -#else - mutable QMutex formatMutex; //< protects builtinFormats & additionalFormats -#endif - ///Project parameters (settings) KnobPathPtr envVars; diff --git a/Engine/PyGlobalFunctions.h b/Engine/PyGlobalFunctions.h index abadcf53c4..505e3eac1e 100644 --- a/Engine/PyGlobalFunctions.h +++ b/Engine/PyGlobalFunctions.h @@ -231,11 +231,4 @@ class PyCoreApplication NATRON_PYTHON_NAMESPACE_EXIT; NATRON_NAMESPACE_EXIT; -#if defined(PYSIDE_H) && defined(PYSIDE_OLD) -namespace PySide { -PYSIDE_API PyObject* getWrapperForQObject(QObject* cppSelf, SbkObjectType* sbk_type); -} -#endif - - #endif // GLOBALFUNCTIONSWRAPPER_H diff --git a/Engine/PySideCompat.cpp b/Engine/PySideCompat.cpp deleted file mode 100644 index bca789e3dc..0000000000 --- a/Engine/PySideCompat.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * This file is part of Natron , - * (C) 2018-2023 The Natron developers - * (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat - * - * Natron is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Natron is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Natron. If not, see - * ***** END LICENSE BLOCK ***** */ - -// ***** BEGIN PYTHON BLOCK ***** -// from : -// "Since Python may define some pre-processor definitions which affect the standard headers on some systems, you must include Python.h before any standard headers are included." -#include -// ***** END PYTHON BLOCK ***** - -#ifdef PYSIDE_OLD - -#include -#include - -// Compatibility function for pyside versions before this commit: -// https://qt.gitorious.org/pyside/pyside/commit/b3669dca4e4321b204d10b06018d35900b1847ee - -#include - -#include "Global/Macros.h" - -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -#ifdef SBK2_RUN -#include -#include -#include -#else -#include -#include -#include -#include -#include -#endif -#include -CLANG_DIAG_ON(mismatched-tags) -GCC_DIAG_ON(unused-parameter) -GCC_DIAG_ON(missing-field-initializers) -// clang-format on - -#include -#include -#include - -CLANG_DIAG_OFF(deprecated) -CLANG_DIAG_OFF(uninitialized) -#include -#include -#include -#include -CLANG_DIAG_ON(deprecated) -CLANG_DIAG_ON(uninitialized) - -#include "Engine/PyGlobalFunctions.h" - -// A QSharedPointer is used with a deletion function to invalidate a pointer -// when the property value is cleared. This should be a QSharedPointer with -// a void* pointer, but that isn't allowed -typedef char any_t; -Q_DECLARE_METATYPE(QSharedPointer); - -namespace PySide { -static void -invalidatePtr(any_t* object) -{ - Shiboken::GilState state; - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(object); - - if (wrapper != NULL) { - Shiboken::BindingManager::instance().releaseWrapper(wrapper); - } -} - -static const char invalidatePropertyName[] = "_PySideInvalidatePtr"; -PyObject* -getWrapperForQObject(QObject* cppSelf, - SbkObjectType* sbk_type) -{ - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppSelf); - - if (pyOut) { - Py_INCREF(pyOut); - - return pyOut; - } - - // Setting the property will trigger an QEvent notification, which may call into - // code that creates the wrapper so only set the property if it isn't already - // set and check if it's created after the set call - QVariant existing = cppSelf->property(invalidatePropertyName); - if ( !existing.isValid() ) { - QSharedPointer shared_with_del( (any_t*)cppSelf, invalidatePtr ); - cppSelf->setProperty( invalidatePropertyName, QVariant::fromValue(shared_with_del) ); - pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppSelf); - if (pyOut) { - Py_INCREF(pyOut); - - return pyOut; - } - } - - const char* typeName = typeid(*cppSelf).name(); - pyOut = Shiboken::Object::newObject(sbk_type, cppSelf, false, false, typeName); - - return pyOut; -} -} //namespace PySide - -#endif // ifdef PYSIDE_OLD diff --git a/Engine/QUrlFix.mm b/Engine/QUrlFix.mm deleted file mode 100644 index 43732be91e..0000000000 --- a/Engine/QUrlFix.mm +++ /dev/null @@ -1,73 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * This file is part of Natron , - * (C) 2018-2023 The Natron developers - * (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat - * - * Natron is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Natron is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Natron. If not, see - * ***** END LICENSE BLOCK ***** */ - -#include "Global/QtCompat.h" - -#include // for Q_OS_* -#if defined(Q_OS_DARWIN) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - -// in Qt 4.8 QUrl is broken on mac, it returns /.file/id= for local files -// See https://bugreports.qt.io/browse/QTBUG-40449 - -#include -#include -#include - - -static -QString fromNSString(const NSString *string) -{ - if (!string) - return QString(); - QString qstring; - qstring.resize([string length]); - [string getCharacters: reinterpret_cast(qstring.data()) range: NSMakeRange(0, [string length])]; - return qstring; -} - -static -NSString *toNSString(const QString &str) -{ - return [NSString stringWithCharacters: reinterpret_cast(str.unicode()) length: str.length()]; -} - -static -QUrl fromNSURL(const NSURL *url) -{ - return QUrl(fromNSString([url absoluteString])); -} - -static -NSURL *toNSURL(const QUrl &url) -{ - return [NSURL URLWithString:toNSString(QString::fromUtf8(url.toEncoded()))]; -} - -QUrl NATRON_NAMESPACE::QtCompat::toLocalFileUrlFixed(const QUrl& url) -{ - QUrl ret = url; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSURL *nsurl = toNSURL(url); - if ([nsurl isFileReferenceURL]) - ret = fromNSURL([nsurl filePathURL]); - [pool release]; - return ret; -} - -#endif // #if defined(Q_OS_DARWIN) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) diff --git a/Engine/Qt4/NatronEngine/animatedparam_wrapper.cpp b/Engine/Qt4/NatronEngine/animatedparam_wrapper.cpp deleted file mode 100644 index eb840a6be4..0000000000 --- a/Engine/Qt4/NatronEngine/animatedparam_wrapper.cpp +++ /dev/null @@ -1,1023 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "animatedparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void AnimatedParamWrapper::pysideInitQtMetaTypes() -{ -} - -AnimatedParamWrapper::~AnimatedParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_AnimatedParamFunc_deleteValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.deleteValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.deleteValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:deleteValueAtTime", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: deleteValueAtTime(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // deleteValueAtTime(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // deleteValueAtTime(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_deleteValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.deleteValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_AnimatedParamFunc_deleteValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // deleteValueAtTime(double,int) - cppSelf->deleteValueAtTime(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AnimatedParamFunc_deleteValueAtTime_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.deleteValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getCurrentTime(PyObject* self) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCurrentTime()const - int cppResult = const_cast(cppSelf)->getCurrentTime(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AnimatedParamFunc_getDerivativeAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getDerivativeAtTime(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getDerivativeAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getDerivativeAtTime", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getDerivativeAtTime(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getDerivativeAtTime(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getDerivativeAtTime(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getDerivativeAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getDerivativeAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_AnimatedParamFunc_getDerivativeAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getDerivativeAtTime(double,int)const - double cppResult = const_cast(cppSelf)->getDerivativeAtTime(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getDerivativeAtTime_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getDerivativeAtTime", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getExpression(PyObject* self, PyObject* pyArg) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getExpression(int,bool*)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getExpression(int,bool*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getExpression_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getExpression(int,bool*)const - // Begin code injection - - bool hasRetVar; - QString cppResult = cppSelf->getExpression(cppArg0,&hasRetVar); - pyResult = PyTuple_New(2); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &hasRetVar)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getExpression_TypeError: - const char* overloads[] = {"int, PySide.QtCore.bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.AnimatedParam.getExpression", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getIntegrateFromTimeToTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getIntegrateFromTimeToTime(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getIntegrateFromTimeToTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:getIntegrateFromTimeToTime", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: getIntegrateFromTimeToTime(double,double,int)const - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // getIntegrateFromTimeToTime(double,double,int)const - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // getIntegrateFromTimeToTime(double,double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getIntegrateFromTimeToTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getIntegrateFromTimeToTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_AnimatedParamFunc_getIntegrateFromTimeToTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // getIntegrateFromTimeToTime(double,double,int)const - double cppResult = const_cast(cppSelf)->getIntegrateFromTimeToTime(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getIntegrateFromTimeToTime_TypeError: - const char* overloads[] = {"float, float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getIntegrateFromTimeToTime", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getIsAnimated(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getIsAnimated(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getIsAnimated", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getIsAnimated(int)const - if (numArgs == 0) { - overloadId = 0; // getIsAnimated(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getIsAnimated(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getIsAnimated_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getIsAnimated(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_AnimatedParamFunc_getIsAnimated_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getIsAnimated(int)const - bool cppResult = const_cast(cppSelf)->getIsAnimated(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getIsAnimated_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getIsAnimated", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getKeyIndex(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getKeyIndex(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getKeyIndex(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getKeyIndex", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getKeyIndex(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getKeyIndex(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getKeyIndex(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getKeyIndex_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getKeyIndex(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_AnimatedParamFunc_getKeyIndex_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getKeyIndex(double,int)const - int cppResult = const_cast(cppSelf)->getKeyIndex(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getKeyIndex_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getKeyIndex", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getKeyTime(PyObject* self, PyObject* args) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getKeyTime", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getKeyTime(int,int,double*)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getKeyTime(int,int,double*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getKeyTime_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getKeyTime(int,int,double*)const - // Begin code injection - - double time; - bool cppResult = cppSelf->getKeyTime(cppArg0, cppArg1,&time); - pyResult = PyTuple_New(2); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &time)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getKeyTime_TypeError: - const char* overloads[] = {"int, int, PySide.QtCore.double", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getKeyTime", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_getNumKeys(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getNumKeys(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getNumKeys", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getNumKeys(int)const - if (numArgs == 0) { - overloadId = 0; // getNumKeys(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getNumKeys(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_getNumKeys_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.getNumKeys(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_AnimatedParamFunc_getNumKeys_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getNumKeys(int)const - int cppResult = const_cast(cppSelf)->getNumKeys(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_getNumKeys_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.getNumKeys", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_removeAnimation(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.removeAnimation(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:removeAnimation", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: removeAnimation(int) - if (numArgs == 0) { - overloadId = 0; // removeAnimation(int) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // removeAnimation(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_removeAnimation_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.removeAnimation(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_AnimatedParamFunc_removeAnimation_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // removeAnimation(int) - cppSelf->removeAnimation(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AnimatedParamFunc_removeAnimation_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.removeAnimation", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_setExpression(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setExpression(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setExpression(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:setExpression", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setExpression(QString,bool,int) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // setExpression(QString,bool,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setExpression(QString,bool,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_setExpression_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setExpression(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_AnimatedParamFunc_setExpression_TypeError; - } - } - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - bool cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setExpression(QString,bool,int) - // Begin code injection - - bool cppResult = cppSelf->setExpression(cppArg0,cppArg1,cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_setExpression_TypeError: - const char* overloads[] = {"unicode, bool, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.setExpression", overloads); - return 0; -} - -static PyObject* Sbk_AnimatedParamFunc_setInterpolationAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - AnimatedParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AnimatedParamWrapper*)((::AnimatedParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setInterpolationAtTime(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setInterpolationAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:setInterpolationAtTime", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setInterpolationAtTime(double,NATRON_NAMESPACE::KeyframeTypeEnum,int) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // setInterpolationAtTime(double,NATRON_NAMESPACE::KeyframeTypeEnum,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setInterpolationAtTime(double,NATRON_NAMESPACE::KeyframeTypeEnum,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AnimatedParamFunc_setInterpolationAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.AnimatedParam.setInterpolationAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_AnimatedParamFunc_setInterpolationAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - ::NATRON_NAMESPACE::KeyframeTypeEnum cppArg1 = ((::NATRON_NAMESPACE::KeyframeTypeEnum)0); - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setInterpolationAtTime(double,NATRON_NAMESPACE::KeyframeTypeEnum,int) - bool cppResult = cppSelf->setInterpolationAtTime(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AnimatedParamFunc_setInterpolationAtTime_TypeError: - const char* overloads[] = {"float, NatronEngine.Natron.KeyframeTypeEnum, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.AnimatedParam.setInterpolationAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_AnimatedParam_methods[] = { - {"deleteValueAtTime", (PyCFunction)Sbk_AnimatedParamFunc_deleteValueAtTime, METH_VARARGS|METH_KEYWORDS}, - {"getCurrentTime", (PyCFunction)Sbk_AnimatedParamFunc_getCurrentTime, METH_NOARGS}, - {"getDerivativeAtTime", (PyCFunction)Sbk_AnimatedParamFunc_getDerivativeAtTime, METH_VARARGS|METH_KEYWORDS}, - {"getExpression", (PyCFunction)Sbk_AnimatedParamFunc_getExpression, METH_O}, - {"getIntegrateFromTimeToTime", (PyCFunction)Sbk_AnimatedParamFunc_getIntegrateFromTimeToTime, METH_VARARGS|METH_KEYWORDS}, - {"getIsAnimated", (PyCFunction)Sbk_AnimatedParamFunc_getIsAnimated, METH_VARARGS|METH_KEYWORDS}, - {"getKeyIndex", (PyCFunction)Sbk_AnimatedParamFunc_getKeyIndex, METH_VARARGS|METH_KEYWORDS}, - {"getKeyTime", (PyCFunction)Sbk_AnimatedParamFunc_getKeyTime, METH_VARARGS}, - {"getNumKeys", (PyCFunction)Sbk_AnimatedParamFunc_getNumKeys, METH_VARARGS|METH_KEYWORDS}, - {"removeAnimation", (PyCFunction)Sbk_AnimatedParamFunc_removeAnimation, METH_VARARGS|METH_KEYWORDS}, - {"setExpression", (PyCFunction)Sbk_AnimatedParamFunc_setExpression, METH_VARARGS|METH_KEYWORDS}, - {"setInterpolationAtTime", (PyCFunction)Sbk_AnimatedParamFunc_setInterpolationAtTime, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_AnimatedParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_AnimatedParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_AnimatedParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.AnimatedParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_AnimatedParam_traverse, - /*tp_clear*/ Sbk_AnimatedParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_AnimatedParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_AnimatedParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::AnimatedParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void AnimatedParam_PythonToCpp_AnimatedParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_AnimatedParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_AnimatedParam_PythonToCpp_AnimatedParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_AnimatedParam_Type)) - return AnimatedParam_PythonToCpp_AnimatedParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* AnimatedParam_PTR_CppToPython_AnimatedParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::AnimatedParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_AnimatedParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_AnimatedParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX] = reinterpret_cast(&Sbk_AnimatedParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "AnimatedParam", "AnimatedParam*", - &Sbk_AnimatedParam_Type, &Shiboken::callCppDestructor< ::AnimatedParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_AnimatedParam_Type, - AnimatedParam_PythonToCpp_AnimatedParam_PTR, - is_AnimatedParam_PythonToCpp_AnimatedParam_PTR_Convertible, - AnimatedParam_PTR_CppToPython_AnimatedParam); - - Shiboken::Conversions::registerConverterName(converter, "AnimatedParam"); - Shiboken::Conversions::registerConverterName(converter, "AnimatedParam*"); - Shiboken::Conversions::registerConverterName(converter, "AnimatedParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::AnimatedParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::AnimatedParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_AnimatedParam_Type, &Sbk_AnimatedParam_typeDiscovery); - - - AnimatedParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/animatedparam_wrapper.h b/Engine/Qt4/NatronEngine/animatedparam_wrapper.h deleted file mode 100644 index fadbb6d792..0000000000 --- a/Engine/Qt4/NatronEngine/animatedparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_ANIMATEDPARAMWRAPPER_H -#define SBK_ANIMATEDPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class AnimatedParamWrapper : public AnimatedParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { AnimatedParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~AnimatedParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_ANIMATEDPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/app_wrapper.cpp b/Engine/Qt4/NatronEngine/app_wrapper.cpp deleted file mode 100644 index 8af6bc5f70..0000000000 --- a/Engine/Qt4/NatronEngine/app_wrapper.cpp +++ /dev/null @@ -1,1259 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "app_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include -#include -#include -#include - - -// Native --------------------------------------------------------- - -void AppWrapper::pysideInitQtMetaTypes() -{ -} - -AppWrapper::~AppWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_AppFunc_addFormat(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addFormat(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // addFormat(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_addFormat_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addFormat(QString) - cppSelf->addFormat(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AppFunc_addFormat_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.addFormat", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_addProjectLayer(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addProjectLayer(ImageLayer) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArg)))) { - overloadId = 0; // addProjectLayer(ImageLayer) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_addProjectLayer_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp)) - pythonToCpp(pyArg, &cppArg0_local); - else - pythonToCpp(pyArg, &cppArg0); - - - if (!PyErr_Occurred()) { - // addProjectLayer(ImageLayer) - cppSelf->addProjectLayer(*cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AppFunc_addProjectLayer_TypeError: - const char* overloads[] = {"NatronEngine.ImageLayer", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.addProjectLayer", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_closeProject(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // closeProject() - bool cppResult = cppSelf->closeProject(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_createNode(PyObject* self, PyObject* args, PyObject* kwds) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createNode(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createNode(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:createNode", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: createNode(QString,int,Group*,std::map)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // createNode(QString,int,Group*,std::map)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // createNode(QString,int,Group*,std::map)const - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // createNode(QString,int,Group*,std::map)const - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[3])))) { - overloadId = 0; // createNode(QString,int,Group*,std::map)const - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_createNode_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "majorVersion"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createNode(): got multiple values for keyword argument 'majorVersion'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_AppFunc_createNode_TypeError; - } - value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createNode(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[2])))) - goto Sbk_AppFunc_createNode_TypeError; - } - value = PyDict_GetItemString(kwds, "props"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createNode(): got multiple values for keyword argument 'props'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[3])))) - goto Sbk_AppFunc_createNode_TypeError; - } - } - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = -1; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - if (!Shiboken::Object::isValid(pyArgs[2])) - return 0; - ::Group* cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - ::std::map cppArg3; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // createNode(QString,int,Group*,std::map)const - // Begin code injection - - Effect * cppResult = cppSelf->createNode(cppArg0,cppArg1,cppArg2, cppArg3); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_createNode_TypeError: - const char* overloads[] = {"unicode, int = -1, NatronEngine.Group = None, dict = NodeCreationPropertyMap()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.App.createNode", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_createReader(PyObject* self, PyObject* args, PyObject* kwds) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createReader(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createReader(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:createReader", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: createReader(QString,Group*,std::map)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // createReader(QString,Group*,std::map)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // createReader(QString,Group*,std::map)const - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[2])))) { - overloadId = 0; // createReader(QString,Group*,std::map)const - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_createReader_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createReader(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[1])))) - goto Sbk_AppFunc_createReader_TypeError; - } - value = PyDict_GetItemString(kwds, "props"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createReader(): got multiple values for keyword argument 'props'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[2])))) - goto Sbk_AppFunc_createReader_TypeError; - } - } - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Group* cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - ::std::map cppArg2; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // createReader(QString,Group*,std::map)const - // Begin code injection - - Effect * cppResult = cppSelf->createReader(cppArg0,cppArg1, cppArg2); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_createReader_TypeError: - const char* overloads[] = {"unicode, NatronEngine.Group = None, dict = NodeCreationPropertyMap()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.App.createReader", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_createWriter(PyObject* self, PyObject* args, PyObject* kwds) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createWriter(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createWriter(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:createWriter", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: createWriter(QString,Group*,std::map)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // createWriter(QString,Group*,std::map)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // createWriter(QString,Group*,std::map)const - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[2])))) { - overloadId = 0; // createWriter(QString,Group*,std::map)const - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_createWriter_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createWriter(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[1])))) - goto Sbk_AppFunc_createWriter_TypeError; - } - value = PyDict_GetItemString(kwds, "props"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.createWriter(): got multiple values for keyword argument 'props'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], (pyArgs[2])))) - goto Sbk_AppFunc_createWriter_TypeError; - } - } - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Group* cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - ::std::map cppArg2; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // createWriter(QString,Group*,std::map)const - // Begin code injection - - Effect * cppResult = cppSelf->createWriter(cppArg0,cppArg1, cppArg2); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_createWriter_TypeError: - const char* overloads[] = {"unicode, NatronEngine.Group = None, dict = NodeCreationPropertyMap()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.App.createWriter", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_getAppID(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getAppID()const - int cppResult = const_cast(cppSelf)->getAppID(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_getProjectParam(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getProjectParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getProjectParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_getProjectParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getProjectParam(QString)const - Param * cppResult = const_cast(cppSelf)->getProjectParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_getProjectParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.getProjectParam", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_getViewNames(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getViewNames()const - std::list cppResult = const_cast(cppSelf)->getViewNames(); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_loadProject(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: loadProject(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // loadProject(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_loadProject_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // loadProject(QString) - // Begin code injection - - App * cppResult = cppSelf->loadProject(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_APP_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_loadProject_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.loadProject", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_newProject(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // newProject() - // Begin code injection - - App * cppResult = cppSelf->newProject(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_APP_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_render(PyObject* self, PyObject* args, PyObject* kwds) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.render(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.render(): not enough arguments"); - return 0; - } else if (numArgs == 2) - goto Sbk_AppFunc_render_TypeError; - - if (!PyArg_ParseTuple(args, "|OOOO:render", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: render(Effect*,int,int,int) - // 1: render(std::list,std::list,std::list,std::list) - if (numArgs >= 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // render(Effect*,int,int,int) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // render(Effect*,int,int,int) - } - } else if (numArgs == 1 - && PyList_Check(pyArgs[0])) { - overloadId = 1; // render(std::list,std::list,std::list,std::list) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_render_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // render(Effect * writeNode, int firstFrame, int lastFrame, int frameStep) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "frameStep"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.App.render(): got multiple values for keyword argument 'frameStep'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_AppFunc_render_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Effect* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3 = 1; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // render(Effect*,int,int,int) - cppSelf->render(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - case 1: // render(const std::list & effects, const std::list & firstFrames, const std::list & lastFrames, const std::list & frameSteps) - { - - if (!PyErr_Occurred()) { - // render(std::list,std::list,std::list,std::list) - // Begin code injection - - if (!PyList_Check(pyArgs[1-1])) { - PyErr_SetString(PyExc_TypeError, "tasks must be a list of tuple objects."); - return 0; - } - std::list effects; - - std::list firstFrames; - - std::list lastFrames; - - std::list frameSteps; - - int size = (int)PyList_GET_SIZE(pyArgs[1-1]); - for (int i = 0; i < size; ++i) { - PyObject* tuple = PyList_GET_ITEM(pyArgs[1-1],i); - if (!tuple) { - PyErr_SetString(PyExc_TypeError, "tasks must be a list of tuple objects."); - return 0; - } - - int tupleSize = PyTuple_GET_SIZE(tuple); - if (tupleSize != 4 && tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 or 4 items."); - return 0; - } - ::Effect* writeNode = ((::Effect*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], PyTuple_GET_ITEM(tuple, 0), &(writeNode)); - int firstFrame; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 1), &(firstFrame)); - int lastFrame; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 2), &(lastFrame)); - int frameStep; - if (tupleSize == 4) { - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 3), &(frameStep)); - } else { - frameStep = INT_MIN; - } - effects.push_back(writeNode); - firstFrames.push_back(firstFrame); - lastFrames.push_back(lastFrame); - frameSteps.push_back(frameStep); - } - - cppSelf->render(effects,firstFrames,lastFrames, frameSteps); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AppFunc_render_TypeError: - const char* overloads[] = {"NatronEngine.Effect, int, int, int = 1", "list, list, list, list", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.App.render", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_resetProject(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // resetProject() - bool cppResult = cppSelf->resetProject(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_saveProject(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: saveProject(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // saveProject(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_saveProject_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // saveProject(QString) - bool cppResult = cppSelf->saveProject(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_saveProject_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.saveProject", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_saveProjectAs(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: saveProjectAs(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // saveProjectAs(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_saveProjectAs_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // saveProjectAs(QString) - bool cppResult = cppSelf->saveProjectAs(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_saveProjectAs_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.saveProjectAs", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_saveTempProject(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: saveTempProject(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // saveTempProject(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_saveTempProject_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // saveTempProject(QString) - bool cppResult = cppSelf->saveTempProject(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppFunc_saveTempProject_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.saveTempProject", overloads); - return 0; -} - -static PyObject* Sbk_AppFunc_timelineGetLeftBound(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // timelineGetLeftBound()const - int cppResult = const_cast(cppSelf)->timelineGetLeftBound(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_timelineGetRightBound(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // timelineGetRightBound()const - int cppResult = const_cast(cppSelf)->timelineGetRightBound(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_timelineGetTime(PyObject* self) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // timelineGetTime()const - int cppResult = const_cast(cppSelf)->timelineGetTime(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppFunc_writeToScriptEditor(PyObject* self, PyObject* pyArg) -{ - AppWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (AppWrapper*)((::App*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: writeToScriptEditor(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // writeToScriptEditor(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppFunc_writeToScriptEditor_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // writeToScriptEditor(QString) - cppSelf->writeToScriptEditor(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_AppFunc_writeToScriptEditor_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.App.writeToScriptEditor", overloads); - return 0; -} - -static PyMethodDef Sbk_App_methods[] = { - {"addFormat", (PyCFunction)Sbk_AppFunc_addFormat, METH_O}, - {"addProjectLayer", (PyCFunction)Sbk_AppFunc_addProjectLayer, METH_O}, - {"closeProject", (PyCFunction)Sbk_AppFunc_closeProject, METH_NOARGS}, - {"createNode", (PyCFunction)Sbk_AppFunc_createNode, METH_VARARGS|METH_KEYWORDS}, - {"createReader", (PyCFunction)Sbk_AppFunc_createReader, METH_VARARGS|METH_KEYWORDS}, - {"createWriter", (PyCFunction)Sbk_AppFunc_createWriter, METH_VARARGS|METH_KEYWORDS}, - {"getAppID", (PyCFunction)Sbk_AppFunc_getAppID, METH_NOARGS}, - {"getProjectParam", (PyCFunction)Sbk_AppFunc_getProjectParam, METH_O}, - {"getViewNames", (PyCFunction)Sbk_AppFunc_getViewNames, METH_NOARGS}, - {"loadProject", (PyCFunction)Sbk_AppFunc_loadProject, METH_O}, - {"newProject", (PyCFunction)Sbk_AppFunc_newProject, METH_NOARGS}, - {"render", (PyCFunction)Sbk_AppFunc_render, METH_VARARGS|METH_KEYWORDS}, - {"resetProject", (PyCFunction)Sbk_AppFunc_resetProject, METH_NOARGS}, - {"saveProject", (PyCFunction)Sbk_AppFunc_saveProject, METH_O}, - {"saveProjectAs", (PyCFunction)Sbk_AppFunc_saveProjectAs, METH_O}, - {"saveTempProject", (PyCFunction)Sbk_AppFunc_saveTempProject, METH_O}, - {"timelineGetLeftBound", (PyCFunction)Sbk_AppFunc_timelineGetLeftBound, METH_NOARGS}, - {"timelineGetRightBound", (PyCFunction)Sbk_AppFunc_timelineGetRightBound, METH_NOARGS}, - {"timelineGetTime", (PyCFunction)Sbk_AppFunc_timelineGetTime, METH_NOARGS}, - {"writeToScriptEditor", (PyCFunction)Sbk_AppFunc_writeToScriptEditor, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_App_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_App_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_App_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.App", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_App_traverse, - /*tp_clear*/ Sbk_App_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_App_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_App_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Group >())) - return dynamic_cast< ::App*>(reinterpret_cast< ::Group*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void App_PythonToCpp_App_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_App_Type, pyIn, cppOut); -} -static PythonToCppFunc is_App_PythonToCpp_App_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_App_Type)) - return App_PythonToCpp_App_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* App_PTR_CppToPython_App(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::App*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_App_Type, const_cast(cppIn), false, false, typeName); -} - -void init_App(PyObject* module) -{ - SbkNatronEngineTypes[SBK_APP_IDX] = reinterpret_cast(&Sbk_App_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "App", "App*", - &Sbk_App_Type, &Shiboken::callCppDestructor< ::App >, (SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_App_Type, - App_PythonToCpp_App_PTR, - is_App_PythonToCpp_App_PTR_Convertible, - App_PTR_CppToPython_App); - - Shiboken::Conversions::registerConverterName(converter, "App"); - Shiboken::Conversions::registerConverterName(converter, "App*"); - Shiboken::Conversions::registerConverterName(converter, "App&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::App).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::AppWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_App_Type, &Sbk_App_typeDiscovery); - - - AppWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/app_wrapper.h b/Engine/Qt4/NatronEngine/app_wrapper.h deleted file mode 100644 index 3a9d4f1d5f..0000000000 --- a/Engine/Qt4/NatronEngine/app_wrapper.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SBK_APPWRAPPER_H -#define SBK_APPWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class AppWrapper : public App -{ -public: - inline void renderInternal_protected(bool forceBlocking, Effect * writeNode, int firstFrame, int lastFrame, int frameStep) { App::renderInternal(forceBlocking, writeNode, firstFrame, lastFrame, frameStep); } - inline void renderInternal_protected(bool forceBlocking, const std::list & effects, const std::list & firstFrames, const std::list & lastFrames, const std::list & frameSteps) { App::renderInternal(forceBlocking, effects, firstFrames, lastFrames, frameSteps); } - virtual ~AppWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_APPWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/appsettings_wrapper.cpp b/Engine/Qt4/NatronEngine/appsettings_wrapper.cpp deleted file mode 100644 index 85cafbc074..0000000000 --- a/Engine/Qt4/NatronEngine/appsettings_wrapper.cpp +++ /dev/null @@ -1,286 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "appsettings_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_AppSettingsFunc_getParam(PyObject* self, PyObject* pyArg) -{ - ::AppSettings* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::AppSettings*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APPSETTINGS_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_AppSettingsFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_AppSettingsFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.AppSettings.getParam", overloads); - return 0; -} - -static PyObject* Sbk_AppSettingsFunc_getParams(PyObject* self) -{ - ::AppSettings* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::AppSettings*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APPSETTINGS_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParams()const - // Begin code injection - - std::list params = cppSelf->getParams(); - PyObject* ret = PyList_New((int) params.size()); - int idx = 0; - for (std::list::iterator it = params.begin(); it!=params.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_AppSettingsFunc_restoreDefaultSettings(PyObject* self) -{ - ::AppSettings* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::AppSettings*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APPSETTINGS_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // restoreDefaultSettings() - cppSelf->restoreDefaultSettings(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_AppSettingsFunc_saveSettings(PyObject* self) -{ - ::AppSettings* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::AppSettings*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_APPSETTINGS_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // saveSettings() - cppSelf->saveSettings(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyMethodDef Sbk_AppSettings_methods[] = { - {"getParam", (PyCFunction)Sbk_AppSettingsFunc_getParam, METH_O}, - {"getParams", (PyCFunction)Sbk_AppSettingsFunc_getParams, METH_NOARGS}, - {"restoreDefaultSettings", (PyCFunction)Sbk_AppSettingsFunc_restoreDefaultSettings, METH_NOARGS}, - {"saveSettings", (PyCFunction)Sbk_AppSettingsFunc_saveSettings, METH_NOARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_AppSettings_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_AppSettings_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_AppSettings_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.AppSettings", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_AppSettings_traverse, - /*tp_clear*/ Sbk_AppSettings_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_AppSettings_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void AppSettings_PythonToCpp_AppSettings_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_AppSettings_Type, pyIn, cppOut); -} -static PythonToCppFunc is_AppSettings_PythonToCpp_AppSettings_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_AppSettings_Type)) - return AppSettings_PythonToCpp_AppSettings_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* AppSettings_PTR_CppToPython_AppSettings(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::AppSettings*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_AppSettings_Type, const_cast(cppIn), false, false, typeName); -} - -void init_AppSettings(PyObject* module) -{ - SbkNatronEngineTypes[SBK_APPSETTINGS_IDX] = reinterpret_cast(&Sbk_AppSettings_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "AppSettings", "AppSettings*", - &Sbk_AppSettings_Type, &Shiboken::callCppDestructor< ::AppSettings >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_AppSettings_Type, - AppSettings_PythonToCpp_AppSettings_PTR, - is_AppSettings_PythonToCpp_AppSettings_PTR_Convertible, - AppSettings_PTR_CppToPython_AppSettings); - - Shiboken::Conversions::registerConverterName(converter, "AppSettings"); - Shiboken::Conversions::registerConverterName(converter, "AppSettings*"); - Shiboken::Conversions::registerConverterName(converter, "AppSettings&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::AppSettings).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/appsettings_wrapper.h b/Engine/Qt4/NatronEngine/appsettings_wrapper.h deleted file mode 100644 index 5fc0c48385..0000000000 --- a/Engine/Qt4/NatronEngine/appsettings_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_APPSETTINGS_H -#define SBK_APPSETTINGS_H - -#include - -#include - -#endif // SBK_APPSETTINGS_H - diff --git a/Engine/Qt4/NatronEngine/beziercurve_wrapper.cpp b/Engine/Qt4/NatronEngine/beziercurve_wrapper.cpp deleted file mode 100644 index 4789a90af3..0000000000 --- a/Engine/Qt4/NatronEngine/beziercurve_wrapper.cpp +++ /dev/null @@ -1,1864 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "beziercurve_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include - - -// Native --------------------------------------------------------- - -void BezierCurveWrapper::pysideInitQtMetaTypes() -{ -} - -BezierCurveWrapper::~BezierCurveWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_BezierCurveFunc_addControlPoint(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addControlPoint", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: addControlPoint(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // addControlPoint(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_addControlPoint_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // addControlPoint(double,double) - cppSelf->addControlPoint(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_addControlPoint_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.addControlPoint", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_addControlPointOnSegment(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addControlPointOnSegment", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: addControlPointOnSegment(int,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // addControlPointOnSegment(int,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_addControlPointOnSegment_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // addControlPointOnSegment(int,double) - cppSelf->addControlPointOnSegment(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_addControlPointOnSegment_TypeError: - const char* overloads[] = {"int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.addControlPointOnSegment", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getActivatedParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getActivatedParam()const - BooleanParam * cppResult = const_cast(cppSelf)->getActivatedParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getColor(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getColor(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getColor(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getColor_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getColor(double) - ColorTuple* cppResult = new ColorTuple(cppSelf->getColor(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], cppResult, true, true); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getColor_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.getColor", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getColorParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getColorParam()const - ColorParam * cppResult = const_cast(cppSelf)->getColorParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getCompositingOperator(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCompositingOperator()const - NATRON_NAMESPACE::MergingFunctionEnum cppResult = NATRON_NAMESPACE::MergingFunctionEnum(const_cast(cppSelf)->getCompositingOperator()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getCompositingOperatorParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCompositingOperatorParam()const - ChoiceParam * cppResult = const_cast(cppSelf)->getCompositingOperatorParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getControlPointPosition(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getControlPointPosition", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getControlPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getControlPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getControlPointPosition_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getControlPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - // Begin code injection - - double x,y,rx,ry,lx,ly; - cppSelf->getControlPointPosition(cppArg0, cppArg1, &x,&y, &lx,&ly,&rx,&ry); - - PyObject* ret = PyTuple_New(6); - PyTuple_SET_ITEM(ret, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &x)); - PyTuple_SET_ITEM(ret, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &y)); - PyTuple_SET_ITEM(ret, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &lx)); - PyTuple_SET_ITEM(ret, 3, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ly)); - PyTuple_SET_ITEM(ret, 4, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &rx)); - PyTuple_SET_ITEM(ret, 5, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ry)); - return ret; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getControlPointPosition_TypeError: - const char* overloads[] = {"int, float, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.getControlPointPosition", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getFeatherDistance(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getFeatherDistance(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getFeatherDistance(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getFeatherDistance_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getFeatherDistance(double)const - double cppResult = const_cast(cppSelf)->getFeatherDistance(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getFeatherDistance_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.getFeatherDistance", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getFeatherDistanceParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getFeatherDistanceParam()const - DoubleParam * cppResult = const_cast(cppSelf)->getFeatherDistanceParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getFeatherFallOff(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getFeatherFallOff(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getFeatherFallOff(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getFeatherFallOff_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getFeatherFallOff(double)const - double cppResult = const_cast(cppSelf)->getFeatherFallOff(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getFeatherFallOff_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.getFeatherFallOff", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getFeatherFallOffParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getFeatherFallOffParam()const - DoubleParam * cppResult = const_cast(cppSelf)->getFeatherFallOffParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getFeatherPointPosition(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getFeatherPointPosition", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getFeatherPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getFeatherPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getFeatherPointPosition_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getFeatherPointPosition(int,double,double*,double*,double*,double*,double*,double*)const - // Begin code injection - - double x,y,rx,ry,lx,ly; - cppSelf->getFeatherPointPosition(cppArg0, cppArg1, &x,&y, &lx,&ly,&rx,&ry); - - PyObject* ret = PyTuple_New(6); - PyTuple_SET_ITEM(ret, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &x)); - PyTuple_SET_ITEM(ret, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &y)); - PyTuple_SET_ITEM(ret, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &lx)); - PyTuple_SET_ITEM(ret, 3, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ly)); - PyTuple_SET_ITEM(ret, 4, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &rx)); - PyTuple_SET_ITEM(ret, 5, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ry)); - return ret; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getFeatherPointPosition_TypeError: - const char* overloads[] = {"int, float, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.getFeatherPointPosition", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getIsActivated(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getIsActivated(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getIsActivated(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getIsActivated_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getIsActivated(double) - bool cppResult = cppSelf->getIsActivated(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getIsActivated_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.getIsActivated", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getKeyframes(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getKeyframes(std::list*)const - // Begin code injection - - std::list keys; - cppSelf->getKeyframes(&keys); - PyObject* ret = PyList_New((int) keys.size()); - int idx = 0; - for (std::list::iterator it = keys.begin(); it!=keys.end(); ++it,++idx) { - PyList_SET_ITEM(ret, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &*it)); - } - return ret; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getNumControlPoints(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumControlPoints()const - int cppResult = const_cast(cppSelf)->getNumControlPoints(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getOpacity(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getOpacity(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getOpacity(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_getOpacity_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getOpacity(double)const - double cppResult = const_cast(cppSelf)->getOpacity(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BezierCurveFunc_getOpacity_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.getOpacity", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_getOpacityParam(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getOpacityParam()const - DoubleParam * cppResult = const_cast(cppSelf)->getOpacityParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_getOverlayColor(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getOverlayColor()const - ColorTuple* cppResult = new ColorTuple(const_cast(cppSelf)->getOverlayColor()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], cppResult, true, true); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_isCurveFinished(PyObject* self) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isCurveFinished()const - bool cppResult = const_cast(cppSelf)->isCurveFinished(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BezierCurveFunc_moveFeatherByIndex(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "moveFeatherByIndex", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: moveFeatherByIndex(int,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // moveFeatherByIndex(int,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_moveFeatherByIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // moveFeatherByIndex(int,double,double,double) - cppSelf->moveFeatherByIndex(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_moveFeatherByIndex_TypeError: - const char* overloads[] = {"int, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.moveFeatherByIndex", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_moveLeftBezierPoint(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "moveLeftBezierPoint", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: moveLeftBezierPoint(int,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // moveLeftBezierPoint(int,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_moveLeftBezierPoint_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // moveLeftBezierPoint(int,double,double,double) - cppSelf->moveLeftBezierPoint(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_moveLeftBezierPoint_TypeError: - const char* overloads[] = {"int, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.moveLeftBezierPoint", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_movePointByIndex(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "movePointByIndex", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: movePointByIndex(int,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // movePointByIndex(int,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_movePointByIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // movePointByIndex(int,double,double,double) - cppSelf->movePointByIndex(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_movePointByIndex_TypeError: - const char* overloads[] = {"int, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.movePointByIndex", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_moveRightBezierPoint(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "moveRightBezierPoint", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: moveRightBezierPoint(int,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // moveRightBezierPoint(int,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_moveRightBezierPoint_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // moveRightBezierPoint(int,double,double,double) - cppSelf->moveRightBezierPoint(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_moveRightBezierPoint_TypeError: - const char* overloads[] = {"int, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.moveRightBezierPoint", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_removeControlPointByIndex(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: removeControlPointByIndex(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // removeControlPointByIndex(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_removeControlPointByIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // removeControlPointByIndex(int) - cppSelf->removeControlPointByIndex(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_removeControlPointByIndex_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.removeControlPointByIndex", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setActivated(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setActivated", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setActivated(double,bool) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setActivated(double,bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setActivated_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - bool cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setActivated(double,bool) - cppSelf->setActivated(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setActivated_TypeError: - const char* overloads[] = {"float, bool", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setActivated", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setColor(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setColor", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: setColor(double,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // setColor(double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setColor_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // setColor(double,double,double,double) - cppSelf->setColor(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setColor_TypeError: - const char* overloads[] = {"float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setColor", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setCompositingOperator(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCompositingOperator(NATRON_NAMESPACE::MergingFunctionEnum) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX]), (pyArg)))) { - overloadId = 0; // setCompositingOperator(NATRON_NAMESPACE::MergingFunctionEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setCompositingOperator_TypeError; - - // Call function/method - { - ::NATRON_NAMESPACE::MergingFunctionEnum cppArg0 = ((::NATRON_NAMESPACE::MergingFunctionEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCompositingOperator(NATRON_NAMESPACE::MergingFunctionEnum) - cppSelf->setCompositingOperator(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setCompositingOperator_TypeError: - const char* overloads[] = {"NatronEngine.Natron.MergingFunctionEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.setCompositingOperator", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setCurveFinished(PyObject* self, PyObject* pyArg) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCurveFinished(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setCurveFinished(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setCurveFinished_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCurveFinished(bool) - cppSelf->setCurveFinished(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setCurveFinished_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BezierCurve.setCurveFinished", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setFeatherDistance(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setFeatherDistance", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setFeatherDistance(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setFeatherDistance(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setFeatherDistance_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setFeatherDistance(double,double) - cppSelf->setFeatherDistance(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setFeatherDistance_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setFeatherDistance", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setFeatherFallOff(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setFeatherFallOff", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setFeatherFallOff(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setFeatherFallOff(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setFeatherFallOff_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setFeatherFallOff(double,double) - cppSelf->setFeatherFallOff(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setFeatherFallOff_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setFeatherFallOff", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setFeatherPointAtIndex(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setFeatherPointAtIndex", 8, 8, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]), &(pyArgs[5]), &(pyArgs[6]), &(pyArgs[7]))) - return 0; - - - // Overloaded function decisor - // 0: setFeatherPointAtIndex(int,double,double,double,double,double,double,double) - if (numArgs == 8 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4]))) - && (pythonToCpp[5] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[5]))) - && (pythonToCpp[6] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[6]))) - && (pythonToCpp[7] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[7])))) { - overloadId = 0; // setFeatherPointAtIndex(int,double,double,double,double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setFeatherPointAtIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - double cppArg5; - pythonToCpp[5](pyArgs[5], &cppArg5); - double cppArg6; - pythonToCpp[6](pyArgs[6], &cppArg6); - double cppArg7; - pythonToCpp[7](pyArgs[7], &cppArg7); - - if (!PyErr_Occurred()) { - // setFeatherPointAtIndex(int,double,double,double,double,double,double,double) - cppSelf->setFeatherPointAtIndex(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4, cppArg5, cppArg6, cppArg7); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setFeatherPointAtIndex_TypeError: - const char* overloads[] = {"int, float, float, float, float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setFeatherPointAtIndex", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setOpacity(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setOpacity", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setOpacity(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setOpacity(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setOpacity_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setOpacity(double,double) - cppSelf->setOpacity(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setOpacity_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setOpacity", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setOverlayColor(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setOverlayColor", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setOverlayColor(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setOverlayColor(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setOverlayColor_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setOverlayColor(double,double,double) - cppSelf->setOverlayColor(cppArg0, cppArg1, cppArg2); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setOverlayColor_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setOverlayColor", overloads); - return 0; -} - -static PyObject* Sbk_BezierCurveFunc_setPointAtIndex(PyObject* self, PyObject* args) -{ - ::BezierCurve* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BezierCurve*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setPointAtIndex", 8, 8, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]), &(pyArgs[5]), &(pyArgs[6]), &(pyArgs[7]))) - return 0; - - - // Overloaded function decisor - // 0: setPointAtIndex(int,double,double,double,double,double,double,double) - if (numArgs == 8 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4]))) - && (pythonToCpp[5] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[5]))) - && (pythonToCpp[6] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[6]))) - && (pythonToCpp[7] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[7])))) { - overloadId = 0; // setPointAtIndex(int,double,double,double,double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BezierCurveFunc_setPointAtIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - double cppArg5; - pythonToCpp[5](pyArgs[5], &cppArg5); - double cppArg6; - pythonToCpp[6](pyArgs[6], &cppArg6); - double cppArg7; - pythonToCpp[7](pyArgs[7], &cppArg7); - - if (!PyErr_Occurred()) { - // setPointAtIndex(int,double,double,double,double,double,double,double) - cppSelf->setPointAtIndex(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4, cppArg5, cppArg6, cppArg7); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BezierCurveFunc_setPointAtIndex_TypeError: - const char* overloads[] = {"int, float, float, float, float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BezierCurve.setPointAtIndex", overloads); - return 0; -} - -static PyMethodDef Sbk_BezierCurve_methods[] = { - {"addControlPoint", (PyCFunction)Sbk_BezierCurveFunc_addControlPoint, METH_VARARGS}, - {"addControlPointOnSegment", (PyCFunction)Sbk_BezierCurveFunc_addControlPointOnSegment, METH_VARARGS}, - {"getActivatedParam", (PyCFunction)Sbk_BezierCurveFunc_getActivatedParam, METH_NOARGS}, - {"getColor", (PyCFunction)Sbk_BezierCurveFunc_getColor, METH_O}, - {"getColorParam", (PyCFunction)Sbk_BezierCurveFunc_getColorParam, METH_NOARGS}, - {"getCompositingOperator", (PyCFunction)Sbk_BezierCurveFunc_getCompositingOperator, METH_NOARGS}, - {"getCompositingOperatorParam", (PyCFunction)Sbk_BezierCurveFunc_getCompositingOperatorParam, METH_NOARGS}, - {"getControlPointPosition", (PyCFunction)Sbk_BezierCurveFunc_getControlPointPosition, METH_VARARGS}, - {"getFeatherDistance", (PyCFunction)Sbk_BezierCurveFunc_getFeatherDistance, METH_O}, - {"getFeatherDistanceParam", (PyCFunction)Sbk_BezierCurveFunc_getFeatherDistanceParam, METH_NOARGS}, - {"getFeatherFallOff", (PyCFunction)Sbk_BezierCurveFunc_getFeatherFallOff, METH_O}, - {"getFeatherFallOffParam", (PyCFunction)Sbk_BezierCurveFunc_getFeatherFallOffParam, METH_NOARGS}, - {"getFeatherPointPosition", (PyCFunction)Sbk_BezierCurveFunc_getFeatherPointPosition, METH_VARARGS}, - {"getIsActivated", (PyCFunction)Sbk_BezierCurveFunc_getIsActivated, METH_O}, - {"getKeyframes", (PyCFunction)Sbk_BezierCurveFunc_getKeyframes, METH_NOARGS}, - {"getNumControlPoints", (PyCFunction)Sbk_BezierCurveFunc_getNumControlPoints, METH_NOARGS}, - {"getOpacity", (PyCFunction)Sbk_BezierCurveFunc_getOpacity, METH_O}, - {"getOpacityParam", (PyCFunction)Sbk_BezierCurveFunc_getOpacityParam, METH_NOARGS}, - {"getOverlayColor", (PyCFunction)Sbk_BezierCurveFunc_getOverlayColor, METH_NOARGS}, - {"isCurveFinished", (PyCFunction)Sbk_BezierCurveFunc_isCurveFinished, METH_NOARGS}, - {"moveFeatherByIndex", (PyCFunction)Sbk_BezierCurveFunc_moveFeatherByIndex, METH_VARARGS}, - {"moveLeftBezierPoint", (PyCFunction)Sbk_BezierCurveFunc_moveLeftBezierPoint, METH_VARARGS}, - {"movePointByIndex", (PyCFunction)Sbk_BezierCurveFunc_movePointByIndex, METH_VARARGS}, - {"moveRightBezierPoint", (PyCFunction)Sbk_BezierCurveFunc_moveRightBezierPoint, METH_VARARGS}, - {"removeControlPointByIndex", (PyCFunction)Sbk_BezierCurveFunc_removeControlPointByIndex, METH_O}, - {"setActivated", (PyCFunction)Sbk_BezierCurveFunc_setActivated, METH_VARARGS}, - {"setColor", (PyCFunction)Sbk_BezierCurveFunc_setColor, METH_VARARGS}, - {"setCompositingOperator", (PyCFunction)Sbk_BezierCurveFunc_setCompositingOperator, METH_O}, - {"setCurveFinished", (PyCFunction)Sbk_BezierCurveFunc_setCurveFinished, METH_O}, - {"setFeatherDistance", (PyCFunction)Sbk_BezierCurveFunc_setFeatherDistance, METH_VARARGS}, - {"setFeatherFallOff", (PyCFunction)Sbk_BezierCurveFunc_setFeatherFallOff, METH_VARARGS}, - {"setFeatherPointAtIndex", (PyCFunction)Sbk_BezierCurveFunc_setFeatherPointAtIndex, METH_VARARGS}, - {"setOpacity", (PyCFunction)Sbk_BezierCurveFunc_setOpacity, METH_VARARGS}, - {"setOverlayColor", (PyCFunction)Sbk_BezierCurveFunc_setOverlayColor, METH_VARARGS}, - {"setPointAtIndex", (PyCFunction)Sbk_BezierCurveFunc_setPointAtIndex, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_BezierCurve_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_BezierCurve_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_BezierCurve_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.BezierCurve", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_BezierCurve_traverse, - /*tp_clear*/ Sbk_BezierCurve_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_BezierCurve_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_BezierCurve_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::ItemBase >())) - return dynamic_cast< ::BezierCurve*>(reinterpret_cast< ::ItemBase*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void BezierCurve_PythonToCpp_BezierCurve_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_BezierCurve_Type, pyIn, cppOut); -} -static PythonToCppFunc is_BezierCurve_PythonToCpp_BezierCurve_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_BezierCurve_Type)) - return BezierCurve_PythonToCpp_BezierCurve_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* BezierCurve_PTR_CppToPython_BezierCurve(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::BezierCurve*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_BezierCurve_Type, const_cast(cppIn), false, false, typeName); -} - -void init_BezierCurve(PyObject* module) -{ - SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX] = reinterpret_cast(&Sbk_BezierCurve_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "BezierCurve", "BezierCurve*", - &Sbk_BezierCurve_Type, &Shiboken::callCppDestructor< ::BezierCurve >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_BezierCurve_Type, - BezierCurve_PythonToCpp_BezierCurve_PTR, - is_BezierCurve_PythonToCpp_BezierCurve_PTR_Convertible, - BezierCurve_PTR_CppToPython_BezierCurve); - - Shiboken::Conversions::registerConverterName(converter, "BezierCurve"); - Shiboken::Conversions::registerConverterName(converter, "BezierCurve*"); - Shiboken::Conversions::registerConverterName(converter, "BezierCurve&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::BezierCurve).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::BezierCurveWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_BezierCurve_Type, &Sbk_BezierCurve_typeDiscovery); - - - BezierCurveWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/beziercurve_wrapper.h b/Engine/Qt4/NatronEngine/beziercurve_wrapper.h deleted file mode 100644 index 642c72a197..0000000000 --- a/Engine/Qt4/NatronEngine/beziercurve_wrapper.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SBK_BEZIERCURVEWRAPPER_H -#define SBK_BEZIERCURVEWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class BezierCurveWrapper : public BezierCurve -{ -public: - virtual ~BezierCurveWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_BEZIERCURVEWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/booleanparam_wrapper.cpp b/Engine/Qt4/NatronEngine/booleanparam_wrapper.cpp deleted file mode 100644 index 3d841ed3be..0000000000 --- a/Engine/Qt4/NatronEngine/booleanparam_wrapper.cpp +++ /dev/null @@ -1,647 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "booleanparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void BooleanParamWrapper::pysideInitQtMetaTypes() -{ -} - -BooleanParamWrapper::~BooleanParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_BooleanParamFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - bool cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BooleanParamFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BooleanParam.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_get(PyObject* self, PyObject* args) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - bool cppResult = const_cast(cppSelf)->get(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - bool cppResult = const_cast(cppSelf)->get(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BooleanParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BooleanParam.get", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_getDefaultValue(PyObject* self) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getDefaultValue()const - bool cppResult = const_cast(cppSelf)->getDefaultValue(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BooleanParamFunc_getValue(PyObject* self) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValue()const - bool cppResult = const_cast(cppSelf)->getValue(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BooleanParamFunc_getValueAtTime(PyObject* self, PyObject* pyArg) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getValueAtTime(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getValueAtTime(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_getValueAtTime_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getValueAtTime(double)const - bool cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_BooleanParamFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BooleanParam.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_restoreDefaultValue(PyObject* self) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // restoreDefaultValue() - cppSelf->restoreDefaultValue(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_BooleanParamFunc_set(PyObject* self, PyObject* args) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: set(bool) - // 1: set(bool,double) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // set(bool) - } else if (numArgs == 2 - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // set(bool,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(bool x) - { - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(bool) - cppSelf->set(cppArg0); - } - break; - } - case 1: // set(bool x, double frame) - { - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(bool,double) - cppSelf->set(cppArg0, cppArg1); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BooleanParamFunc_set_TypeError: - const char* overloads[] = {"bool", "bool, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BooleanParam.set", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_setDefaultValue(PyObject* self, PyObject* pyArg) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setDefaultValue(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setDefaultValue(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_setDefaultValue_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setDefaultValue(bool) - cppSelf->setDefaultValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BooleanParamFunc_setDefaultValue_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BooleanParam.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_setValue(PyObject* self, PyObject* pyArg) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setValue(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setValue(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_setValue_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setValue(bool) - cppSelf->setValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BooleanParamFunc_setValue_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.BooleanParam.setValue", overloads); - return 0; -} - -static PyObject* Sbk_BooleanParamFunc_setValueAtTime(PyObject* self, PyObject* args) -{ - BooleanParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (BooleanParamWrapper*)((::BooleanParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setValueAtTime", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(bool,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValueAtTime(bool,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BooleanParamFunc_setValueAtTime_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValueAtTime(bool,double) - cppSelf->setValueAtTime(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BooleanParamFunc_setValueAtTime_TypeError: - const char* overloads[] = {"bool, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BooleanParam.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_BooleanParam_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_BooleanParamFunc_addAsDependencyOf, METH_VARARGS}, - {"get", (PyCFunction)Sbk_BooleanParamFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_BooleanParamFunc_getDefaultValue, METH_NOARGS}, - {"getValue", (PyCFunction)Sbk_BooleanParamFunc_getValue, METH_NOARGS}, - {"getValueAtTime", (PyCFunction)Sbk_BooleanParamFunc_getValueAtTime, METH_O}, - {"restoreDefaultValue", (PyCFunction)Sbk_BooleanParamFunc_restoreDefaultValue, METH_NOARGS}, - {"set", (PyCFunction)Sbk_BooleanParamFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_BooleanParamFunc_setDefaultValue, METH_O}, - {"setValue", (PyCFunction)Sbk_BooleanParamFunc_setValue, METH_O}, - {"setValueAtTime", (PyCFunction)Sbk_BooleanParamFunc_setValueAtTime, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_BooleanParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_BooleanParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_BooleanParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.BooleanParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_BooleanParam_traverse, - /*tp_clear*/ Sbk_BooleanParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_BooleanParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_BooleanParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::BooleanParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void BooleanParam_PythonToCpp_BooleanParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_BooleanParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_BooleanParam_PythonToCpp_BooleanParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_BooleanParam_Type)) - return BooleanParam_PythonToCpp_BooleanParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* BooleanParam_PTR_CppToPython_BooleanParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::BooleanParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_BooleanParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_BooleanParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX] = reinterpret_cast(&Sbk_BooleanParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "BooleanParam", "BooleanParam*", - &Sbk_BooleanParam_Type, &Shiboken::callCppDestructor< ::BooleanParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_BooleanParam_Type, - BooleanParam_PythonToCpp_BooleanParam_PTR, - is_BooleanParam_PythonToCpp_BooleanParam_PTR_Convertible, - BooleanParam_PTR_CppToPython_BooleanParam); - - Shiboken::Conversions::registerConverterName(converter, "BooleanParam"); - Shiboken::Conversions::registerConverterName(converter, "BooleanParam*"); - Shiboken::Conversions::registerConverterName(converter, "BooleanParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::BooleanParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::BooleanParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_BooleanParam_Type, &Sbk_BooleanParam_typeDiscovery); - - - BooleanParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/booleanparam_wrapper.h b/Engine/Qt4/NatronEngine/booleanparam_wrapper.h deleted file mode 100644 index 72e2e2566c..0000000000 --- a/Engine/Qt4/NatronEngine/booleanparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_BOOLEANPARAMWRAPPER_H -#define SBK_BOOLEANPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class BooleanParamWrapper : public BooleanParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { BooleanParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~BooleanParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_BOOLEANPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.cpp b/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.cpp deleted file mode 100644 index 7b09b638f0..0000000000 --- a/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.cpp +++ /dev/null @@ -1,376 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "boolnodecreationproperty_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void BoolNodeCreationPropertyWrapper::pysideInitQtMetaTypes() -{ -} - -BoolNodeCreationPropertyWrapper::BoolNodeCreationPropertyWrapper(bool value) : BoolNodeCreationProperty(value) { - // ... middle -} - -BoolNodeCreationPropertyWrapper::BoolNodeCreationPropertyWrapper(const std::vector & values) : BoolNodeCreationProperty(values) { - // ... middle -} - -BoolNodeCreationPropertyWrapper::~BoolNodeCreationPropertyWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_BoolNodeCreationProperty_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::BoolNodeCreationProperty >())) - return -1; - - ::BoolNodeCreationPropertyWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.BoolNodeCreationProperty(): too many arguments"); - return -1; - } - - if (!PyArg_ParseTuple(args, "|O:BoolNodeCreationProperty", &(pyArgs[0]))) - return -1; - - - // Overloaded function decisor - // 0: BoolNodeCreationProperty(bool) - // 1: BoolNodeCreationProperty(std::vector) - if (numArgs == 0) { - overloadId = 1; // BoolNodeCreationProperty(std::vector) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // BoolNodeCreationProperty(bool) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], (pyArgs[0])))) { - overloadId = 1; // BoolNodeCreationProperty(std::vector) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BoolNodeCreationProperty_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // BoolNodeCreationProperty(bool value) - { - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // BoolNodeCreationProperty(bool) - cptr = new ::BoolNodeCreationPropertyWrapper(cppArg0); - } - break; - } - case 1: // BoolNodeCreationProperty(const std::vector & values) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "values"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.BoolNodeCreationProperty(): got multiple values for keyword argument 'values'."); - return -1; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], (pyArgs[0])))) - goto Sbk_BoolNodeCreationProperty_Init_TypeError; - } - } - ::std::vector cppArg0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // BoolNodeCreationProperty(std::vector) - cptr = new ::BoolNodeCreationPropertyWrapper(cppArg0); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::BoolNodeCreationProperty >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_BoolNodeCreationProperty_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_BoolNodeCreationProperty_Init_TypeError: - const char* overloads[] = {"bool", "list = std.vector< bool >()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BoolNodeCreationProperty", overloads); - return -1; -} - -static PyObject* Sbk_BoolNodeCreationPropertyFunc_getValues(PyObject* self) -{ - ::BoolNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BoolNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValues()const - const std::vector & cppResult = const_cast(cppSelf)->getValues(); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_BoolNodeCreationPropertyFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::BoolNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::BoolNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BOOLNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.BoolNodeCreationProperty.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.BoolNodeCreationProperty.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(bool,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(bool,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(bool,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_BoolNodeCreationPropertyFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "index"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.BoolNodeCreationProperty.setValue(): got multiple values for keyword argument 'index'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_BoolNodeCreationPropertyFunc_setValue_TypeError; - } - } - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(bool,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_BoolNodeCreationPropertyFunc_setValue_TypeError: - const char* overloads[] = {"bool, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.BoolNodeCreationProperty.setValue", overloads); - return 0; -} - -static PyMethodDef Sbk_BoolNodeCreationProperty_methods[] = { - {"getValues", (PyCFunction)Sbk_BoolNodeCreationPropertyFunc_getValues, METH_NOARGS}, - {"setValue", (PyCFunction)Sbk_BoolNodeCreationPropertyFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_BoolNodeCreationProperty_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_BoolNodeCreationProperty_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_BoolNodeCreationProperty_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.BoolNodeCreationProperty", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_BoolNodeCreationProperty_traverse, - /*tp_clear*/ Sbk_BoolNodeCreationProperty_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_BoolNodeCreationProperty_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_BoolNodeCreationProperty_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_BoolNodeCreationProperty_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::NodeCreationProperty >())) - return dynamic_cast< ::BoolNodeCreationProperty*>(reinterpret_cast< ::NodeCreationProperty*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void BoolNodeCreationProperty_PythonToCpp_BoolNodeCreationProperty_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_BoolNodeCreationProperty_Type, pyIn, cppOut); -} -static PythonToCppFunc is_BoolNodeCreationProperty_PythonToCpp_BoolNodeCreationProperty_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_BoolNodeCreationProperty_Type)) - return BoolNodeCreationProperty_PythonToCpp_BoolNodeCreationProperty_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* BoolNodeCreationProperty_PTR_CppToPython_BoolNodeCreationProperty(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::BoolNodeCreationProperty*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_BoolNodeCreationProperty_Type, const_cast(cppIn), false, false, typeName); -} - -void init_BoolNodeCreationProperty(PyObject* module) -{ - SbkNatronEngineTypes[SBK_BOOLNODECREATIONPROPERTY_IDX] = reinterpret_cast(&Sbk_BoolNodeCreationProperty_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "BoolNodeCreationProperty", "BoolNodeCreationProperty*", - &Sbk_BoolNodeCreationProperty_Type, &Shiboken::callCppDestructor< ::BoolNodeCreationProperty >, (SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_BoolNodeCreationProperty_Type, - BoolNodeCreationProperty_PythonToCpp_BoolNodeCreationProperty_PTR, - is_BoolNodeCreationProperty_PythonToCpp_BoolNodeCreationProperty_PTR_Convertible, - BoolNodeCreationProperty_PTR_CppToPython_BoolNodeCreationProperty); - - Shiboken::Conversions::registerConverterName(converter, "BoolNodeCreationProperty"); - Shiboken::Conversions::registerConverterName(converter, "BoolNodeCreationProperty*"); - Shiboken::Conversions::registerConverterName(converter, "BoolNodeCreationProperty&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::BoolNodeCreationProperty).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::BoolNodeCreationPropertyWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_BoolNodeCreationProperty_Type, &Sbk_BoolNodeCreationProperty_typeDiscovery); - - - BoolNodeCreationPropertyWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.h b/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.h deleted file mode 100644 index c1be940914..0000000000 --- a/Engine/Qt4/NatronEngine/boolnodecreationproperty_wrapper.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SBK_BOOLNODECREATIONPROPERTYWRAPPER_H -#define SBK_BOOLNODECREATIONPROPERTYWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class BoolNodeCreationPropertyWrapper : public BoolNodeCreationProperty -{ -public: - BoolNodeCreationPropertyWrapper(bool value); - BoolNodeCreationPropertyWrapper(const std::vector & values = std::vector< bool >()); - virtual ~BoolNodeCreationPropertyWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_BOOLNODECREATIONPROPERTYWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/buttonparam_wrapper.cpp b/Engine/Qt4/NatronEngine/buttonparam_wrapper.cpp deleted file mode 100644 index 87dc8535b7..0000000000 --- a/Engine/Qt4/NatronEngine/buttonparam_wrapper.cpp +++ /dev/null @@ -1,193 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "buttonparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void ButtonParamWrapper::pysideInitQtMetaTypes() -{ -} - -ButtonParamWrapper::~ButtonParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ButtonParamFunc_trigger(PyObject* self) -{ - ButtonParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ButtonParamWrapper*)((::ButtonParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_BUTTONPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // trigger() - cppSelf->trigger(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyMethodDef Sbk_ButtonParam_methods[] = { - {"trigger", (PyCFunction)Sbk_ButtonParamFunc_trigger, METH_NOARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ButtonParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ButtonParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ButtonParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ButtonParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ButtonParam_traverse, - /*tp_clear*/ Sbk_ButtonParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ButtonParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_ButtonParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::ButtonParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ButtonParam_PythonToCpp_ButtonParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ButtonParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ButtonParam_PythonToCpp_ButtonParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ButtonParam_Type)) - return ButtonParam_PythonToCpp_ButtonParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ButtonParam_PTR_CppToPython_ButtonParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ButtonParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ButtonParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ButtonParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_BUTTONPARAM_IDX] = reinterpret_cast(&Sbk_ButtonParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ButtonParam", "ButtonParam*", - &Sbk_ButtonParam_Type, &Shiboken::callCppDestructor< ::ButtonParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ButtonParam_Type, - ButtonParam_PythonToCpp_ButtonParam_PTR, - is_ButtonParam_PythonToCpp_ButtonParam_PTR_Convertible, - ButtonParam_PTR_CppToPython_ButtonParam); - - Shiboken::Conversions::registerConverterName(converter, "ButtonParam"); - Shiboken::Conversions::registerConverterName(converter, "ButtonParam*"); - Shiboken::Conversions::registerConverterName(converter, "ButtonParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ButtonParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ButtonParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_ButtonParam_Type, &Sbk_ButtonParam_typeDiscovery); - - - ButtonParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/buttonparam_wrapper.h b/Engine/Qt4/NatronEngine/buttonparam_wrapper.h deleted file mode 100644 index 8581299594..0000000000 --- a/Engine/Qt4/NatronEngine/buttonparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_BUTTONPARAMWRAPPER_H -#define SBK_BUTTONPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ButtonParamWrapper : public ButtonParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { ButtonParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~ButtonParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_BUTTONPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/choiceparam_wrapper.cpp b/Engine/Qt4/NatronEngine/choiceparam_wrapper.cpp deleted file mode 100644 index 6dcef8af16..0000000000 --- a/Engine/Qt4/NatronEngine/choiceparam_wrapper.cpp +++ /dev/null @@ -1,899 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "choiceparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include - - -// Native --------------------------------------------------------- - -void ChoiceParamWrapper::pysideInitQtMetaTypes() -{ -} - -ChoiceParamWrapper::~ChoiceParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ChoiceParamFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - int cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ChoiceParamFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ChoiceParam.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_addOption(PyObject* self, PyObject* args) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addOption", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: addOption(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // addOption(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_addOption_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // addOption(QString,QString) - cppSelf->addOption(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_addOption_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ChoiceParam.addOption", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_get(PyObject* self, PyObject* args) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - int cppResult = const_cast(cppSelf)->get(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - int cppResult = const_cast(cppSelf)->get(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ChoiceParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ChoiceParam.get", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_getDefaultValue(PyObject* self) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getDefaultValue()const - int cppResult = const_cast(cppSelf)->getDefaultValue(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ChoiceParamFunc_getNumOptions(PyObject* self) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumOptions()const - int cppResult = const_cast(cppSelf)->getNumOptions(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ChoiceParamFunc_getOption(PyObject* self, PyObject* pyArg) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getOption(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getOption(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_getOption_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getOption(int)const - QString cppResult = const_cast(cppSelf)->getOption(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ChoiceParamFunc_getOption_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ChoiceParam.getOption", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_getOptions(PyObject* self) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getOptions()const - QStringList cppResult = const_cast(cppSelf)->getOptions(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ChoiceParamFunc_getValue(PyObject* self) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValue()const - int cppResult = const_cast(cppSelf)->getValue(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ChoiceParamFunc_getValueAtTime(PyObject* self, PyObject* pyArg) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getValueAtTime(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getValueAtTime(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_getValueAtTime_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getValueAtTime(double)const - int cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ChoiceParamFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ChoiceParam.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_restoreDefaultValue(PyObject* self) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // restoreDefaultValue() - cppSelf->restoreDefaultValue(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_ChoiceParamFunc_set(PyObject* self, PyObject* args) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: set(QString) - // 1: set(int) - // 2: set(int,double) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 1; // set(int) - } else if (numArgs == 2 - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 2; // set(int,double) - } - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - overloadId = 0; // set(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(const QString & label) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(QString) - cppSelf->set(cppArg0); - } - break; - } - case 1: // set(int x) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(int) - cppSelf->set(cppArg0); - } - break; - } - case 2: // set(int x, double frame) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(int,double) - cppSelf->set(cppArg0, cppArg1); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_set_TypeError: - const char* overloads[] = {"unicode", "int", "int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ChoiceParam.set", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_setDefaultValue(PyObject* self, PyObject* pyArg) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setDefaultValue(QString) - // 1: setDefaultValue(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 1; // setDefaultValue(int) - } else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setDefaultValue(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_setDefaultValue_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // setDefaultValue(const QString & value) - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setDefaultValue(QString) - cppSelf->setDefaultValue(cppArg0); - } - break; - } - case 1: // setDefaultValue(int value) - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setDefaultValue(int) - cppSelf->setDefaultValue(cppArg0); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_setDefaultValue_TypeError: - const char* overloads[] = {"unicode", "int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ChoiceParam.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_setOptions(PyObject* self, PyObject* pyArg) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setOptions(std::list >) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setOptions(std::list >) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_setOptions_TypeError; - - // Call function/method - { - ::std::list > cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setOptions(std::list >) - cppSelf->setOptions(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_setOptions_TypeError: - const char* overloads[] = {"list", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ChoiceParam.setOptions", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_setValue(PyObject* self, PyObject* pyArg) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setValue(QString) - // 1: setValue(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 1; // setValue(int) - } else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setValue(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_setValue_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // setValue(const QString & label) - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setValue(QString) - cppSelf->setValue(cppArg0); - } - break; - } - case 1: // setValue(int value) - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setValue(int) - cppSelf->setValue(cppArg0); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_setValue_TypeError: - const char* overloads[] = {"unicode", "int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ChoiceParam.setValue", overloads); - return 0; -} - -static PyObject* Sbk_ChoiceParamFunc_setValueAtTime(PyObject* self, PyObject* args) -{ - ChoiceParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ChoiceParamWrapper*)((::ChoiceParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setValueAtTime", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(int,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValueAtTime(int,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ChoiceParamFunc_setValueAtTime_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValueAtTime(int,double) - cppSelf->setValueAtTime(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ChoiceParamFunc_setValueAtTime_TypeError: - const char* overloads[] = {"int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ChoiceParam.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_ChoiceParam_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_ChoiceParamFunc_addAsDependencyOf, METH_VARARGS}, - {"addOption", (PyCFunction)Sbk_ChoiceParamFunc_addOption, METH_VARARGS}, - {"get", (PyCFunction)Sbk_ChoiceParamFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_ChoiceParamFunc_getDefaultValue, METH_NOARGS}, - {"getNumOptions", (PyCFunction)Sbk_ChoiceParamFunc_getNumOptions, METH_NOARGS}, - {"getOption", (PyCFunction)Sbk_ChoiceParamFunc_getOption, METH_O}, - {"getOptions", (PyCFunction)Sbk_ChoiceParamFunc_getOptions, METH_NOARGS}, - {"getValue", (PyCFunction)Sbk_ChoiceParamFunc_getValue, METH_NOARGS}, - {"getValueAtTime", (PyCFunction)Sbk_ChoiceParamFunc_getValueAtTime, METH_O}, - {"restoreDefaultValue", (PyCFunction)Sbk_ChoiceParamFunc_restoreDefaultValue, METH_NOARGS}, - {"set", (PyCFunction)Sbk_ChoiceParamFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_ChoiceParamFunc_setDefaultValue, METH_O}, - {"setOptions", (PyCFunction)Sbk_ChoiceParamFunc_setOptions, METH_O}, - {"setValue", (PyCFunction)Sbk_ChoiceParamFunc_setValue, METH_O}, - {"setValueAtTime", (PyCFunction)Sbk_ChoiceParamFunc_setValueAtTime, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ChoiceParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ChoiceParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ChoiceParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ChoiceParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ChoiceParam_traverse, - /*tp_clear*/ Sbk_ChoiceParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ChoiceParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_ChoiceParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::ChoiceParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ChoiceParam_PythonToCpp_ChoiceParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ChoiceParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ChoiceParam_PythonToCpp_ChoiceParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ChoiceParam_Type)) - return ChoiceParam_PythonToCpp_ChoiceParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ChoiceParam_PTR_CppToPython_ChoiceParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ChoiceParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ChoiceParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ChoiceParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX] = reinterpret_cast(&Sbk_ChoiceParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ChoiceParam", "ChoiceParam*", - &Sbk_ChoiceParam_Type, &Shiboken::callCppDestructor< ::ChoiceParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ChoiceParam_Type, - ChoiceParam_PythonToCpp_ChoiceParam_PTR, - is_ChoiceParam_PythonToCpp_ChoiceParam_PTR_Convertible, - ChoiceParam_PTR_CppToPython_ChoiceParam); - - Shiboken::Conversions::registerConverterName(converter, "ChoiceParam"); - Shiboken::Conversions::registerConverterName(converter, "ChoiceParam*"); - Shiboken::Conversions::registerConverterName(converter, "ChoiceParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ChoiceParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ChoiceParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_ChoiceParam_Type, &Sbk_ChoiceParam_typeDiscovery); - - - ChoiceParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/choiceparam_wrapper.h b/Engine/Qt4/NatronEngine/choiceparam_wrapper.h deleted file mode 100644 index 2bedd10ec6..0000000000 --- a/Engine/Qt4/NatronEngine/choiceparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_CHOICEPARAMWRAPPER_H -#define SBK_CHOICEPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ChoiceParamWrapper : public ChoiceParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { ChoiceParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~ChoiceParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_CHOICEPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/colorparam_wrapper.cpp b/Engine/Qt4/NatronEngine/colorparam_wrapper.cpp deleted file mode 100644 index fa50a2b778..0000000000 --- a/Engine/Qt4/NatronEngine/colorparam_wrapper.cpp +++ /dev/null @@ -1,1461 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "colorparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void ColorParamWrapper::pysideInitQtMetaTypes() -{ -} - -ColorParamWrapper::~ColorParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ColorParamFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - double cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_get(PyObject* self, PyObject* args) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - ColorTuple* cppResult = new ColorTuple(const_cast(cppSelf)->get()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], cppResult, true, true); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - ColorTuple* cppResult = new ColorTuple(const_cast(cppSelf)->get(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], cppResult, true, true); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.get", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getDefaultValue(int)const - if (numArgs == 0) { - overloadId = 0; // getDefaultValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getDefaultValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ColorParamFunc_getDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getDefaultValue(int)const - double cppResult = const_cast(cppSelf)->getDefaultValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.getDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getDisplayMaximum(PyObject* self, PyObject* pyArg) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMaximum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getDisplayMaximum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMaximum(int)const - double cppResult = const_cast(cppSelf)->getDisplayMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getDisplayMaximum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ColorParam.getDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getDisplayMinimum(PyObject* self, PyObject* pyArg) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMinimum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getDisplayMinimum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMinimum(int)const - double cppResult = const_cast(cppSelf)->getDisplayMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getDisplayMinimum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ColorParam.getDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getMaximum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMaximum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMaximum(int)const - if (numArgs == 0) { - overloadId = 0; // getMaximum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ColorParamFunc_getMaximum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMaximum(int)const - double cppResult = const_cast(cppSelf)->getMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getMaximum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.getMaximum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getMinimum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMinimum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMinimum(int)const - if (numArgs == 0) { - overloadId = 0; // getMinimum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ColorParamFunc_getMinimum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMinimum(int)const - double cppResult = const_cast(cppSelf)->getMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getMinimum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.getMinimum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getValue(int)const - if (numArgs == 0) { - overloadId = 0; // getValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ColorParamFunc_getValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getValue(int)const - double cppResult = const_cast(cppSelf)->getValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.getValue", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_getValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getValueAtTime", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getValueAtTime(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getValueAtTime(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getValueAtTime(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_getValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.getValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_getValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getValueAtTime(double,int)const - double cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ColorParamFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_restoreDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.restoreDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:restoreDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: restoreDefaultValue(int) - if (numArgs == 0) { - overloadId = 0; // restoreDefaultValue(int) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // restoreDefaultValue(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_restoreDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.restoreDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ColorParamFunc_restoreDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // restoreDefaultValue(int) - cppSelf->restoreDefaultValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_restoreDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.restoreDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_set(PyObject* self, PyObject* args) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 4, 5, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]))) - return 0; - - - // Overloaded function decisor - // 0: set(double,double,double,double) - // 1: set(double,double,double,double,double) - if (numArgs >= 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - if (numArgs == 4) { - overloadId = 0; // set(double,double,double,double) - } else if (numArgs == 5 - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4])))) { - overloadId = 1; // set(double,double,double,double,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(double r, double g, double b, double a) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // set(double,double,double,double) - cppSelf->set(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - case 1: // set(double r, double g, double b, double a, double frame) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - - if (!PyErr_Occurred()) { - // set(double,double,double,double,double) - cppSelf->set(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_set_TypeError: - const char* overloads[] = {"float, float, float, float", "float, float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.set", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDefaultValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDefaultValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDefaultValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDefaultValue(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDefaultValue(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDefaultValue(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setDefaultValue_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDefaultValue(double,int) - cppSelf->setDefaultValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setDefaultValue_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setDisplayMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMaximum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMaximum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMaximum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setDisplayMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setDisplayMaximum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMaximum(double,int) - cppSelf->setDisplayMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setDisplayMaximum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setDisplayMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMinimum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMinimum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMinimum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setDisplayMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setDisplayMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setDisplayMinimum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMinimum(double,int) - cppSelf->setDisplayMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setDisplayMinimum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMaximum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMaximum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMaximum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setMaximum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMaximum(double,int) - cppSelf->setMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setMaximum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setMaximum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMinimum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMinimum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMinimum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setMinimum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMinimum(double,int) - cppSelf->setMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setMinimum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setMinimum", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ColorParamFunc_setValue_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(double,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setValue_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setValue", overloads); - return 0; -} - -static PyObject* Sbk_ColorParamFunc_setValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - ColorParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ColorParamWrapper*)((::ColorParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:setValueAtTime", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(double,double,int) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // setValueAtTime(double,double,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setValueAtTime(double,double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ColorParamFunc_setValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ColorParam.setValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ColorParamFunc_setValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setValueAtTime(double,double,int) - cppSelf->setValueAtTime(cppArg0, cppArg1, cppArg2); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ColorParamFunc_setValueAtTime_TypeError: - const char* overloads[] = {"float, float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ColorParam.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_ColorParam_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_ColorParamFunc_addAsDependencyOf, METH_VARARGS}, - {"get", (PyCFunction)Sbk_ColorParamFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_ColorParamFunc_getDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"getDisplayMaximum", (PyCFunction)Sbk_ColorParamFunc_getDisplayMaximum, METH_O}, - {"getDisplayMinimum", (PyCFunction)Sbk_ColorParamFunc_getDisplayMinimum, METH_O}, - {"getMaximum", (PyCFunction)Sbk_ColorParamFunc_getMaximum, METH_VARARGS|METH_KEYWORDS}, - {"getMinimum", (PyCFunction)Sbk_ColorParamFunc_getMinimum, METH_VARARGS|METH_KEYWORDS}, - {"getValue", (PyCFunction)Sbk_ColorParamFunc_getValue, METH_VARARGS|METH_KEYWORDS}, - {"getValueAtTime", (PyCFunction)Sbk_ColorParamFunc_getValueAtTime, METH_VARARGS|METH_KEYWORDS}, - {"restoreDefaultValue", (PyCFunction)Sbk_ColorParamFunc_restoreDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"set", (PyCFunction)Sbk_ColorParamFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_ColorParamFunc_setDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMaximum", (PyCFunction)Sbk_ColorParamFunc_setDisplayMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMinimum", (PyCFunction)Sbk_ColorParamFunc_setDisplayMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setMaximum", (PyCFunction)Sbk_ColorParamFunc_setMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setMinimum", (PyCFunction)Sbk_ColorParamFunc_setMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setValue", (PyCFunction)Sbk_ColorParamFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - {"setValueAtTime", (PyCFunction)Sbk_ColorParamFunc_setValueAtTime, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ColorParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ColorParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ColorParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ColorParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ColorParam_traverse, - /*tp_clear*/ Sbk_ColorParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ColorParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_ColorParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::ColorParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ColorParam_PythonToCpp_ColorParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ColorParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ColorParam_PythonToCpp_ColorParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ColorParam_Type)) - return ColorParam_PythonToCpp_ColorParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ColorParam_PTR_CppToPython_ColorParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ColorParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ColorParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ColorParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_COLORPARAM_IDX] = reinterpret_cast(&Sbk_ColorParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ColorParam", "ColorParam*", - &Sbk_ColorParam_Type, &Shiboken::callCppDestructor< ::ColorParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ColorParam_Type, - ColorParam_PythonToCpp_ColorParam_PTR, - is_ColorParam_PythonToCpp_ColorParam_PTR_Convertible, - ColorParam_PTR_CppToPython_ColorParam); - - Shiboken::Conversions::registerConverterName(converter, "ColorParam"); - Shiboken::Conversions::registerConverterName(converter, "ColorParam*"); - Shiboken::Conversions::registerConverterName(converter, "ColorParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ColorParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ColorParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_ColorParam_Type, &Sbk_ColorParam_typeDiscovery); - - - ColorParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/colorparam_wrapper.h b/Engine/Qt4/NatronEngine/colorparam_wrapper.h deleted file mode 100644 index ac894f6869..0000000000 --- a/Engine/Qt4/NatronEngine/colorparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_COLORPARAMWRAPPER_H -#define SBK_COLORPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ColorParamWrapper : public ColorParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { ColorParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~ColorParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_COLORPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/colortuple_wrapper.cpp b/Engine/Qt4/NatronEngine/colortuple_wrapper.cpp deleted file mode 100644 index a6475452f8..0000000000 --- a/Engine/Qt4/NatronEngine/colortuple_wrapper.cpp +++ /dev/null @@ -1,360 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "colortuple_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_ColorTuple_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::ColorTuple >())) - return -1; - - ::ColorTuple* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // ColorTuple() - cptr = new ::ColorTuple(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::ColorTuple >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_ColorTuple_methods[] = { - - {0} // Sentinel -}; - -PyObject* Sbk_ColorTupleFunc___getitem__(PyObject* self, Py_ssize_t _i) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - // Begin code injection - - if (_i < 0 || _i >= 4) { - PyErr_BadArgument(); - return 0; - } else { - double ret; - switch (_i) { - case 0: - ret = cppSelf->r; - break; - case 1: - ret = cppSelf->g; - break; - case 2: - ret = cppSelf->b; - break; - case 3: - ret = cppSelf->a; - break; - - } - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - } - - // End of code injection -} - -static PyObject* Sbk_ColorTuple_get_g(PyObject* self, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->g); - return pyOut; -} -static int Sbk_ColorTuple_set_g(PyObject* self, PyObject* pyIn, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'g' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'g', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->g; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_ColorTuple_get_r(PyObject* self, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->r); - return pyOut; -} -static int Sbk_ColorTuple_set_r(PyObject* self, PyObject* pyIn, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'r' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'r', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->r; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_ColorTuple_get_a(PyObject* self, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->a); - return pyOut; -} -static int Sbk_ColorTuple_set_a(PyObject* self, PyObject* pyIn, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'a' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'a', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->a; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_ColorTuple_get_b(PyObject* self, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->b); - return pyOut; -} -static int Sbk_ColorTuple_set_b(PyObject* self, PyObject* pyIn, void*) -{ - ::ColorTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ColorTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'b' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'b', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->b; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -// Getters and Setters for ColorTuple -static PyGetSetDef Sbk_ColorTuple_getsetlist[] = { - {const_cast("g"), Sbk_ColorTuple_get_g, Sbk_ColorTuple_set_g}, - {const_cast("r"), Sbk_ColorTuple_get_r, Sbk_ColorTuple_set_r}, - {const_cast("a"), Sbk_ColorTuple_get_a, Sbk_ColorTuple_set_a}, - {const_cast("b"), Sbk_ColorTuple_get_b, Sbk_ColorTuple_set_b}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ColorTuple_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ColorTuple_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static PySequenceMethods Sbk_ColorTuple_TypeAsSequence; - -static SbkObjectType Sbk_ColorTuple_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ColorTuple", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ColorTuple_traverse, - /*tp_clear*/ Sbk_ColorTuple_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ColorTuple_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_ColorTuple_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_ColorTuple_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ColorTuple_PythonToCpp_ColorTuple_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ColorTuple_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ColorTuple_PythonToCpp_ColorTuple_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ColorTuple_Type)) - return ColorTuple_PythonToCpp_ColorTuple_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ColorTuple_PTR_CppToPython_ColorTuple(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ColorTuple*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ColorTuple_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ColorTuple(PyObject* module) -{ - // type supports sequence protocol - memset(&Sbk_ColorTuple_TypeAsSequence, 0, sizeof(PySequenceMethods)); - Sbk_ColorTuple_TypeAsSequence.sq_item = &Sbk_ColorTupleFunc___getitem__; - Sbk_ColorTuple_Type.super.ht_type.tp_as_sequence = &Sbk_ColorTuple_TypeAsSequence; - - SbkNatronEngineTypes[SBK_COLORTUPLE_IDX] = reinterpret_cast(&Sbk_ColorTuple_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ColorTuple", "ColorTuple*", - &Sbk_ColorTuple_Type, &Shiboken::callCppDestructor< ::ColorTuple >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ColorTuple_Type, - ColorTuple_PythonToCpp_ColorTuple_PTR, - is_ColorTuple_PythonToCpp_ColorTuple_PTR_Convertible, - ColorTuple_PTR_CppToPython_ColorTuple); - - Shiboken::Conversions::registerConverterName(converter, "ColorTuple"); - Shiboken::Conversions::registerConverterName(converter, "ColorTuple*"); - Shiboken::Conversions::registerConverterName(converter, "ColorTuple&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ColorTuple).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/colortuple_wrapper.h b/Engine/Qt4/NatronEngine/colortuple_wrapper.h deleted file mode 100644 index 862631cbfd..0000000000 --- a/Engine/Qt4/NatronEngine/colortuple_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_COLORTUPLE_H -#define SBK_COLORTUPLE_H - -#include - -#include - -#endif // SBK_COLORTUPLE_H - diff --git a/Engine/Qt4/NatronEngine/double2dparam_wrapper.cpp b/Engine/Qt4/NatronEngine/double2dparam_wrapper.cpp deleted file mode 100644 index bbfffac561..0000000000 --- a/Engine/Qt4/NatronEngine/double2dparam_wrapper.cpp +++ /dev/null @@ -1,409 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "double2dparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void Double2DParamWrapper::pysideInitQtMetaTypes() -{ -} - -Double2DParamWrapper::~Double2DParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_Double2DParamFunc_get(PyObject* self, PyObject* args) -{ - Double2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double2DParamWrapper*)((::Double2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double2DParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - Double2DTuple* cppResult = new Double2DTuple(const_cast(cppSelf)->get()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], cppResult, true, true); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - Double2DTuple* cppResult = new Double2DTuple(const_cast(cppSelf)->get(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], cppResult, true, true); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_Double2DParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Double2DParam.get", overloads); - return 0; -} - -static PyObject* Sbk_Double2DParamFunc_set(PyObject* self, PyObject* args) -{ - Double2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double2DParamWrapper*)((::Double2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 2, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: set(double,double) - // 1: set(double,double,double) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // set(double,double) - } else if (numArgs == 3 - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 1; // set(double,double,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double2DParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(double x, double y) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(double,double) - cppSelf->set(cppArg0, cppArg1); - } - break; - } - case 1: // set(double x, double y, double frame) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // set(double,double,double) - cppSelf->set(cppArg0, cppArg1, cppArg2); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Double2DParamFunc_set_TypeError: - const char* overloads[] = {"float, float", "float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Double2DParam.set", overloads); - return 0; -} - -static PyObject* Sbk_Double2DParamFunc_setCanAutoFoldDimensions(PyObject* self, PyObject* pyArg) -{ - Double2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double2DParamWrapper*)((::Double2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCanAutoFoldDimensions(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setCanAutoFoldDimensions(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double2DParamFunc_setCanAutoFoldDimensions_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCanAutoFoldDimensions(bool) - cppSelf->setCanAutoFoldDimensions(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Double2DParamFunc_setCanAutoFoldDimensions_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Double2DParam.setCanAutoFoldDimensions", overloads); - return 0; -} - -static PyObject* Sbk_Double2DParamFunc_setUsePointInteract(PyObject* self, PyObject* pyArg) -{ - Double2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double2DParamWrapper*)((::Double2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setUsePointInteract(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setUsePointInteract(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double2DParamFunc_setUsePointInteract_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setUsePointInteract(bool) - cppSelf->setUsePointInteract(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Double2DParamFunc_setUsePointInteract_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Double2DParam.setUsePointInteract", overloads); - return 0; -} - -static PyMethodDef Sbk_Double2DParam_methods[] = { - {"get", (PyCFunction)Sbk_Double2DParamFunc_get, METH_VARARGS}, - {"set", (PyCFunction)Sbk_Double2DParamFunc_set, METH_VARARGS}, - {"setCanAutoFoldDimensions", (PyCFunction)Sbk_Double2DParamFunc_setCanAutoFoldDimensions, METH_O}, - {"setUsePointInteract", (PyCFunction)Sbk_Double2DParamFunc_setUsePointInteract, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Double2DParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Double2DParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Double2DParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Double2DParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Double2DParam_traverse, - /*tp_clear*/ Sbk_Double2DParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Double2DParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Double2DParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::Double2DParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Double2DParam_PythonToCpp_Double2DParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Double2DParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Double2DParam_PythonToCpp_Double2DParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Double2DParam_Type)) - return Double2DParam_PythonToCpp_Double2DParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Double2DParam_PTR_CppToPython_Double2DParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Double2DParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Double2DParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Double2DParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX] = reinterpret_cast(&Sbk_Double2DParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Double2DParam", "Double2DParam*", - &Sbk_Double2DParam_Type, &Shiboken::callCppDestructor< ::Double2DParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Double2DParam_Type, - Double2DParam_PythonToCpp_Double2DParam_PTR, - is_Double2DParam_PythonToCpp_Double2DParam_PTR_Convertible, - Double2DParam_PTR_CppToPython_Double2DParam); - - Shiboken::Conversions::registerConverterName(converter, "Double2DParam"); - Shiboken::Conversions::registerConverterName(converter, "Double2DParam*"); - Shiboken::Conversions::registerConverterName(converter, "Double2DParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double2DParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double2DParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Double2DParam_Type, &Sbk_Double2DParam_typeDiscovery); - - - Double2DParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/double2dparam_wrapper.h b/Engine/Qt4/NatronEngine/double2dparam_wrapper.h deleted file mode 100644 index b6609ee54c..0000000000 --- a/Engine/Qt4/NatronEngine/double2dparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_DOUBLE2DPARAMWRAPPER_H -#define SBK_DOUBLE2DPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class Double2DParamWrapper : public Double2DParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { Double2DParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~Double2DParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_DOUBLE2DPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/double2dtuple_wrapper.cpp b/Engine/Qt4/NatronEngine/double2dtuple_wrapper.cpp deleted file mode 100644 index bc1f0f0b09..0000000000 --- a/Engine/Qt4/NatronEngine/double2dtuple_wrapper.cpp +++ /dev/null @@ -1,285 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "double2dtuple_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_Double2DTuple_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Double2DTuple >())) - return -1; - - ::Double2DTuple* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // Double2DTuple() - cptr = new ::Double2DTuple(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Double2DTuple >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_Double2DTuple_methods[] = { - - {0} // Sentinel -}; - -PyObject* Sbk_Double2DTupleFunc___getitem__(PyObject* self, Py_ssize_t _i) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::Double2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], (SbkObject*)self)); - // Begin code injection - - if (_i < 0 || _i >= 2) { - PyErr_BadArgument(); - return 0; - } else { - double ret; - switch (_i) { - case 0: - ret = cppSelf->x; - break; - case 1: - ret = cppSelf->y; - break; - } - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - } - - // End of code injection -} - -static PyObject* Sbk_Double2DTuple_get_x(PyObject* self, void*) -{ - ::Double2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->x); - return pyOut; -} -static int Sbk_Double2DTuple_set_x(PyObject* self, PyObject* pyIn, void*) -{ - ::Double2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->x; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_Double2DTuple_get_y(PyObject* self, void*) -{ - ::Double2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->y); - return pyOut; -} -static int Sbk_Double2DTuple_set_y(PyObject* self, PyObject* pyIn, void*) -{ - ::Double2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->y; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -// Getters and Setters for Double2DTuple -static PyGetSetDef Sbk_Double2DTuple_getsetlist[] = { - {const_cast("x"), Sbk_Double2DTuple_get_x, Sbk_Double2DTuple_set_x}, - {const_cast("y"), Sbk_Double2DTuple_get_y, Sbk_Double2DTuple_set_y}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Double2DTuple_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Double2DTuple_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static PySequenceMethods Sbk_Double2DTuple_TypeAsSequence; - -static SbkObjectType Sbk_Double2DTuple_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Double2DTuple", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Double2DTuple_traverse, - /*tp_clear*/ Sbk_Double2DTuple_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Double2DTuple_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_Double2DTuple_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_Double2DTuple_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Double2DTuple_PythonToCpp_Double2DTuple_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Double2DTuple_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Double2DTuple_PythonToCpp_Double2DTuple_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Double2DTuple_Type)) - return Double2DTuple_PythonToCpp_Double2DTuple_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Double2DTuple_PTR_CppToPython_Double2DTuple(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Double2DTuple*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Double2DTuple_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Double2DTuple(PyObject* module) -{ - // type supports sequence protocol - memset(&Sbk_Double2DTuple_TypeAsSequence, 0, sizeof(PySequenceMethods)); - Sbk_Double2DTuple_TypeAsSequence.sq_item = &Sbk_Double2DTupleFunc___getitem__; - Sbk_Double2DTuple_Type.super.ht_type.tp_as_sequence = &Sbk_Double2DTuple_TypeAsSequence; - - SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX] = reinterpret_cast(&Sbk_Double2DTuple_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Double2DTuple", "Double2DTuple*", - &Sbk_Double2DTuple_Type, &Shiboken::callCppDestructor< ::Double2DTuple >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Double2DTuple_Type, - Double2DTuple_PythonToCpp_Double2DTuple_PTR, - is_Double2DTuple_PythonToCpp_Double2DTuple_PTR_Convertible, - Double2DTuple_PTR_CppToPython_Double2DTuple); - - Shiboken::Conversions::registerConverterName(converter, "Double2DTuple"); - Shiboken::Conversions::registerConverterName(converter, "Double2DTuple*"); - Shiboken::Conversions::registerConverterName(converter, "Double2DTuple&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double2DTuple).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/double2dtuple_wrapper.h b/Engine/Qt4/NatronEngine/double2dtuple_wrapper.h deleted file mode 100644 index 04c88e8020..0000000000 --- a/Engine/Qt4/NatronEngine/double2dtuple_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_DOUBLE2DTUPLE_H -#define SBK_DOUBLE2DTUPLE_H - -#include - -#include - -#endif // SBK_DOUBLE2DTUPLE_H - diff --git a/Engine/Qt4/NatronEngine/double3dparam_wrapper.cpp b/Engine/Qt4/NatronEngine/double3dparam_wrapper.cpp deleted file mode 100644 index 439bace2ca..0000000000 --- a/Engine/Qt4/NatronEngine/double3dparam_wrapper.cpp +++ /dev/null @@ -1,340 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "double3dparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void Double3DParamWrapper::pysideInitQtMetaTypes() -{ -} - -Double3DParamWrapper::~Double3DParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_Double3DParamFunc_get(PyObject* self, PyObject* args) -{ - Double3DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double3DParamWrapper*)((::Double3DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double3DParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - Double3DTuple* cppResult = new Double3DTuple(const_cast(cppSelf)->get()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], cppResult, true, true); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - Double3DTuple* cppResult = new Double3DTuple(const_cast(cppSelf)->get(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], cppResult, true, true); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_Double3DParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Double3DParam.get", overloads); - return 0; -} - -static PyObject* Sbk_Double3DParamFunc_set(PyObject* self, PyObject* args) -{ - Double3DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Double3DParamWrapper*)((::Double3DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 3, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: set(double,double,double) - // 1: set(double,double,double,double) - if (numArgs >= 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // set(double,double,double) - } else if (numArgs == 4 - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // set(double,double,double,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Double3DParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(double x, double y, double z) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // set(double,double,double) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1,cppArg2); - - // End of code injection - - - } - break; - } - case 1: // set(double x, double y, double z, double frame) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // set(double,double,double,double) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1,cppArg2,cppArg3); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Double3DParamFunc_set_TypeError: - const char* overloads[] = {"float, float, float", "float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Double3DParam.set", overloads); - return 0; -} - -static PyMethodDef Sbk_Double3DParam_methods[] = { - {"get", (PyCFunction)Sbk_Double3DParamFunc_get, METH_VARARGS}, - {"set", (PyCFunction)Sbk_Double3DParamFunc_set, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Double3DParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Double3DParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Double3DParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Double3DParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Double3DParam_traverse, - /*tp_clear*/ Sbk_Double3DParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Double3DParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Double3DParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::Double3DParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Double3DParam_PythonToCpp_Double3DParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Double3DParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Double3DParam_PythonToCpp_Double3DParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Double3DParam_Type)) - return Double3DParam_PythonToCpp_Double3DParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Double3DParam_PTR_CppToPython_Double3DParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Double3DParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Double3DParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Double3DParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_DOUBLE3DPARAM_IDX] = reinterpret_cast(&Sbk_Double3DParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Double3DParam", "Double3DParam*", - &Sbk_Double3DParam_Type, &Shiboken::callCppDestructor< ::Double3DParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Double3DParam_Type, - Double3DParam_PythonToCpp_Double3DParam_PTR, - is_Double3DParam_PythonToCpp_Double3DParam_PTR_Convertible, - Double3DParam_PTR_CppToPython_Double3DParam); - - Shiboken::Conversions::registerConverterName(converter, "Double3DParam"); - Shiboken::Conversions::registerConverterName(converter, "Double3DParam*"); - Shiboken::Conversions::registerConverterName(converter, "Double3DParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double3DParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double3DParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Double3DParam_Type, &Sbk_Double3DParam_typeDiscovery); - - - Double3DParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/double3dparam_wrapper.h b/Engine/Qt4/NatronEngine/double3dparam_wrapper.h deleted file mode 100644 index 0f8f795ca4..0000000000 --- a/Engine/Qt4/NatronEngine/double3dparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_DOUBLE3DPARAMWRAPPER_H -#define SBK_DOUBLE3DPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class Double3DParamWrapper : public Double3DParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { Double3DParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~Double3DParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_DOUBLE3DPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/double3dtuple_wrapper.cpp b/Engine/Qt4/NatronEngine/double3dtuple_wrapper.cpp deleted file mode 100644 index b6e3fec468..0000000000 --- a/Engine/Qt4/NatronEngine/double3dtuple_wrapper.cpp +++ /dev/null @@ -1,322 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "double3dtuple_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_Double3DTuple_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Double3DTuple >())) - return -1; - - ::Double3DTuple* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // Double3DTuple() - cptr = new ::Double3DTuple(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Double3DTuple >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_Double3DTuple_methods[] = { - - {0} // Sentinel -}; - -PyObject* Sbk_Double3DTupleFunc___getitem__(PyObject* self, Py_ssize_t _i) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - // Begin code injection - - if (_i < 0 || _i >= 3) { - PyErr_BadArgument(); - return 0; - } else { - double ret; - switch (_i) { - case 0: - ret = cppSelf->x; - break; - case 1: - ret = cppSelf->y; - break; - case 2: - ret = cppSelf->z; - break; - } - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - } - - // End of code injection -} - -static PyObject* Sbk_Double3DTuple_get_x(PyObject* self, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->x); - return pyOut; -} -static int Sbk_Double3DTuple_set_x(PyObject* self, PyObject* pyIn, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->x; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_Double3DTuple_get_y(PyObject* self, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->y); - return pyOut; -} -static int Sbk_Double3DTuple_set_y(PyObject* self, PyObject* pyIn, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->y; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_Double3DTuple_get_z(PyObject* self, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->z); - return pyOut; -} -static int Sbk_Double3DTuple_set_z(PyObject* self, PyObject* pyIn, void*) -{ - ::Double3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Double3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'z' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'z', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->z; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -// Getters and Setters for Double3DTuple -static PyGetSetDef Sbk_Double3DTuple_getsetlist[] = { - {const_cast("x"), Sbk_Double3DTuple_get_x, Sbk_Double3DTuple_set_x}, - {const_cast("y"), Sbk_Double3DTuple_get_y, Sbk_Double3DTuple_set_y}, - {const_cast("z"), Sbk_Double3DTuple_get_z, Sbk_Double3DTuple_set_z}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Double3DTuple_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Double3DTuple_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static PySequenceMethods Sbk_Double3DTuple_TypeAsSequence; - -static SbkObjectType Sbk_Double3DTuple_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Double3DTuple", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Double3DTuple_traverse, - /*tp_clear*/ Sbk_Double3DTuple_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Double3DTuple_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_Double3DTuple_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_Double3DTuple_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Double3DTuple_PythonToCpp_Double3DTuple_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Double3DTuple_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Double3DTuple_PythonToCpp_Double3DTuple_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Double3DTuple_Type)) - return Double3DTuple_PythonToCpp_Double3DTuple_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Double3DTuple_PTR_CppToPython_Double3DTuple(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Double3DTuple*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Double3DTuple_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Double3DTuple(PyObject* module) -{ - // type supports sequence protocol - memset(&Sbk_Double3DTuple_TypeAsSequence, 0, sizeof(PySequenceMethods)); - Sbk_Double3DTuple_TypeAsSequence.sq_item = &Sbk_Double3DTupleFunc___getitem__; - Sbk_Double3DTuple_Type.super.ht_type.tp_as_sequence = &Sbk_Double3DTuple_TypeAsSequence; - - SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX] = reinterpret_cast(&Sbk_Double3DTuple_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Double3DTuple", "Double3DTuple*", - &Sbk_Double3DTuple_Type, &Shiboken::callCppDestructor< ::Double3DTuple >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Double3DTuple_Type, - Double3DTuple_PythonToCpp_Double3DTuple_PTR, - is_Double3DTuple_PythonToCpp_Double3DTuple_PTR_Convertible, - Double3DTuple_PTR_CppToPython_Double3DTuple); - - Shiboken::Conversions::registerConverterName(converter, "Double3DTuple"); - Shiboken::Conversions::registerConverterName(converter, "Double3DTuple*"); - Shiboken::Conversions::registerConverterName(converter, "Double3DTuple&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Double3DTuple).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/double3dtuple_wrapper.h b/Engine/Qt4/NatronEngine/double3dtuple_wrapper.h deleted file mode 100644 index e6e03553d5..0000000000 --- a/Engine/Qt4/NatronEngine/double3dtuple_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_DOUBLE3DTUPLE_H -#define SBK_DOUBLE3DTUPLE_H - -#include - -#include - -#endif // SBK_DOUBLE3DTUPLE_H - diff --git a/Engine/Qt4/NatronEngine/doubleparam_wrapper.cpp b/Engine/Qt4/NatronEngine/doubleparam_wrapper.cpp deleted file mode 100644 index d259d92d4b..0000000000 --- a/Engine/Qt4/NatronEngine/doubleparam_wrapper.cpp +++ /dev/null @@ -1,1445 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "doubleparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void DoubleParamWrapper::pysideInitQtMetaTypes() -{ -} - -DoubleParamWrapper::~DoubleParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_DoubleParamFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - double cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_get(PyObject* self, PyObject* args) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - double cppResult = const_cast(cppSelf)->get(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - double cppResult = const_cast(cppSelf)->get(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.get", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getDefaultValue(int)const - if (numArgs == 0) { - overloadId = 0; // getDefaultValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getDefaultValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_DoubleParamFunc_getDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getDefaultValue(int)const - double cppResult = const_cast(cppSelf)->getDefaultValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.getDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getDisplayMaximum(PyObject* self, PyObject* pyArg) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMaximum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getDisplayMaximum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMaximum(int)const - double cppResult = const_cast(cppSelf)->getDisplayMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getDisplayMaximum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.DoubleParam.getDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getDisplayMinimum(PyObject* self, PyObject* pyArg) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMinimum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getDisplayMinimum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMinimum(int)const - double cppResult = const_cast(cppSelf)->getDisplayMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getDisplayMinimum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.DoubleParam.getDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getMaximum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMaximum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMaximum(int)const - if (numArgs == 0) { - overloadId = 0; // getMaximum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_DoubleParamFunc_getMaximum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMaximum(int)const - double cppResult = const_cast(cppSelf)->getMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getMaximum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.getMaximum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getMinimum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMinimum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMinimum(int)const - if (numArgs == 0) { - overloadId = 0; // getMinimum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_DoubleParamFunc_getMinimum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMinimum(int)const - double cppResult = const_cast(cppSelf)->getMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getMinimum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.getMinimum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getValue(int)const - if (numArgs == 0) { - overloadId = 0; // getValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_DoubleParamFunc_getValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getValue(int)const - double cppResult = const_cast(cppSelf)->getValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.getValue", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_getValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getValueAtTime", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getValueAtTime(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getValueAtTime(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getValueAtTime(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_getValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.getValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_getValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getValueAtTime(double,int)const - double cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_DoubleParamFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_restoreDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.restoreDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:restoreDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: restoreDefaultValue(int) - if (numArgs == 0) { - overloadId = 0; // restoreDefaultValue(int) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // restoreDefaultValue(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_restoreDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.restoreDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_DoubleParamFunc_restoreDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // restoreDefaultValue(int) - cppSelf->restoreDefaultValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_restoreDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.restoreDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_set(PyObject* self, PyObject* args) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: set(double) - // 1: set(double,double) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // set(double) - } else if (numArgs == 2 - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // set(double,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(double x) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(double) - cppSelf->set(cppArg0); - } - break; - } - case 1: // set(double x, double frame) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(double,double) - cppSelf->set(cppArg0, cppArg1); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_set_TypeError: - const char* overloads[] = {"float", "float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.set", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDefaultValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDefaultValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDefaultValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDefaultValue(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDefaultValue(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDefaultValue(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setDefaultValue_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDefaultValue(double,int) - cppSelf->setDefaultValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setDefaultValue_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setDisplayMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMaximum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMaximum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMaximum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setDisplayMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setDisplayMaximum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMaximum(double,int) - cppSelf->setDisplayMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setDisplayMaximum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setDisplayMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMinimum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMinimum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMinimum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setDisplayMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setDisplayMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setDisplayMinimum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMinimum(double,int) - cppSelf->setDisplayMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setDisplayMinimum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMaximum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMaximum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMaximum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setMaximum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMaximum(double,int) - cppSelf->setMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setMaximum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setMaximum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMinimum(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMinimum(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMinimum(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setMinimum_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMinimum(double,int) - cppSelf->setMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setMinimum_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setMinimum", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_DoubleParamFunc_setValue_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(double,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setValue_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setValue", overloads); - return 0; -} - -static PyObject* Sbk_DoubleParamFunc_setValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - DoubleParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (DoubleParamWrapper*)((::DoubleParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:setValueAtTime", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(double,double,int) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // setValueAtTime(double,double,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setValueAtTime(double,double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_DoubleParamFunc_setValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.DoubleParam.setValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_DoubleParamFunc_setValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setValueAtTime(double,double,int) - cppSelf->setValueAtTime(cppArg0, cppArg1, cppArg2); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_DoubleParamFunc_setValueAtTime_TypeError: - const char* overloads[] = {"float, float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.DoubleParam.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_DoubleParam_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_DoubleParamFunc_addAsDependencyOf, METH_VARARGS}, - {"get", (PyCFunction)Sbk_DoubleParamFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_DoubleParamFunc_getDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"getDisplayMaximum", (PyCFunction)Sbk_DoubleParamFunc_getDisplayMaximum, METH_O}, - {"getDisplayMinimum", (PyCFunction)Sbk_DoubleParamFunc_getDisplayMinimum, METH_O}, - {"getMaximum", (PyCFunction)Sbk_DoubleParamFunc_getMaximum, METH_VARARGS|METH_KEYWORDS}, - {"getMinimum", (PyCFunction)Sbk_DoubleParamFunc_getMinimum, METH_VARARGS|METH_KEYWORDS}, - {"getValue", (PyCFunction)Sbk_DoubleParamFunc_getValue, METH_VARARGS|METH_KEYWORDS}, - {"getValueAtTime", (PyCFunction)Sbk_DoubleParamFunc_getValueAtTime, METH_VARARGS|METH_KEYWORDS}, - {"restoreDefaultValue", (PyCFunction)Sbk_DoubleParamFunc_restoreDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"set", (PyCFunction)Sbk_DoubleParamFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_DoubleParamFunc_setDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMaximum", (PyCFunction)Sbk_DoubleParamFunc_setDisplayMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMinimum", (PyCFunction)Sbk_DoubleParamFunc_setDisplayMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setMaximum", (PyCFunction)Sbk_DoubleParamFunc_setMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setMinimum", (PyCFunction)Sbk_DoubleParamFunc_setMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setValue", (PyCFunction)Sbk_DoubleParamFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - {"setValueAtTime", (PyCFunction)Sbk_DoubleParamFunc_setValueAtTime, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_DoubleParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_DoubleParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_DoubleParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.DoubleParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_DoubleParam_traverse, - /*tp_clear*/ Sbk_DoubleParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_DoubleParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_DoubleParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::DoubleParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void DoubleParam_PythonToCpp_DoubleParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_DoubleParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_DoubleParam_PythonToCpp_DoubleParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_DoubleParam_Type)) - return DoubleParam_PythonToCpp_DoubleParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* DoubleParam_PTR_CppToPython_DoubleParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::DoubleParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_DoubleParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_DoubleParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX] = reinterpret_cast(&Sbk_DoubleParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "DoubleParam", "DoubleParam*", - &Sbk_DoubleParam_Type, &Shiboken::callCppDestructor< ::DoubleParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_DoubleParam_Type, - DoubleParam_PythonToCpp_DoubleParam_PTR, - is_DoubleParam_PythonToCpp_DoubleParam_PTR_Convertible, - DoubleParam_PTR_CppToPython_DoubleParam); - - Shiboken::Conversions::registerConverterName(converter, "DoubleParam"); - Shiboken::Conversions::registerConverterName(converter, "DoubleParam*"); - Shiboken::Conversions::registerConverterName(converter, "DoubleParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::DoubleParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::DoubleParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_DoubleParam_Type, &Sbk_DoubleParam_typeDiscovery); - - - DoubleParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/doubleparam_wrapper.h b/Engine/Qt4/NatronEngine/doubleparam_wrapper.h deleted file mode 100644 index 1ccbe9c239..0000000000 --- a/Engine/Qt4/NatronEngine/doubleparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_DOUBLEPARAMWRAPPER_H -#define SBK_DOUBLEPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class DoubleParamWrapper : public DoubleParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { DoubleParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~DoubleParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_DOUBLEPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/effect_wrapper.cpp b/Engine/Qt4/NatronEngine/effect_wrapper.cpp deleted file mode 100644 index 7f3df6f1c6..0000000000 --- a/Engine/Qt4/NatronEngine/effect_wrapper.cpp +++ /dev/null @@ -1,1829 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "effect_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include -#include -#include -#include -#include - - -// Native --------------------------------------------------------- - -void EffectWrapper::pysideInitQtMetaTypes() -{ -} - -EffectWrapper::~EffectWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_EffectFunc_addUserPlane(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addUserPlane", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: addUserPlane(QString,QStringList) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[1])))) { - overloadId = 0; // addUserPlane(QString,QStringList) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_addUserPlane_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QStringList cppArg1 = ::QStringList(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // addUserPlane(QString,QStringList) - bool cppResult = cppSelf->addUserPlane(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_addUserPlane_TypeError: - const char* overloads[] = {"unicode, QStringList", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.addUserPlane", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_beginChanges(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // beginChanges() - cppSelf->beginChanges(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_EffectFunc_canConnectInput(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "canConnectInput", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: canConnectInput(int,const Effect*)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArgs[1])))) { - overloadId = 0; // canConnectInput(int,const Effect*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_canConnectInput_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Effect* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // canConnectInput(int,const Effect*)const - bool cppResult = const_cast(cppSelf)->canConnectInput(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_canConnectInput_TypeError: - const char* overloads[] = {"int, NatronEngine.Effect", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.canConnectInput", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_connectInput(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "connectInput", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: connectInput(int,const Effect*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArgs[1])))) { - overloadId = 0; // connectInput(int,const Effect*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_connectInput_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Effect* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // connectInput(int,const Effect*) - // Begin code injection - - bool cppResult = cppSelf->connectInput(cppArg0,cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_connectInput_TypeError: - const char* overloads[] = {"int, NatronEngine.Effect", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.connectInput", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_destroy(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Effect.destroy(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:destroy", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: destroy(bool) - if (numArgs == 0) { - overloadId = 0; // destroy(bool) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // destroy(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_destroy_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "autoReconnect"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Effect.destroy(): got multiple values for keyword argument 'autoReconnect'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_EffectFunc_destroy_TypeError; - } - } - bool cppArg0 = true; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // destroy(bool) - // Begin code injection - - cppSelf->destroy(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_destroy_TypeError: - const char* overloads[] = {"bool = true", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.destroy", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_disconnectInput(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: disconnectInput(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // disconnectInput(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_disconnectInput_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // disconnectInput(int) - // Begin code injection - - cppSelf->disconnectInput(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_disconnectInput_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.disconnectInput", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_endChanges(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // endChanges() - cppSelf->endChanges(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_EffectFunc_getAvailableLayers(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getAvailableLayers(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getAvailableLayers(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_getAvailableLayers_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getAvailableLayers(int)const - std::list cppResult = const_cast(cppSelf)->getAvailableLayers(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_getAvailableLayers_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.getAvailableLayers", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_getBitDepth(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getBitDepth()const - NATRON_NAMESPACE::ImageBitDepthEnum cppResult = NATRON_NAMESPACE::ImageBitDepthEnum(const_cast(cppSelf)->getBitDepth()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getColor(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getColor(double*,double*,double*)const - // Begin code injection - - double r,g,b; - cppSelf->getColor(&r,&g,&b); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &r)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &g)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &b)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getCurrentTime(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCurrentTime()const - int cppResult = const_cast(cppSelf)->getCurrentTime(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getFrameRate(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getFrameRate()const - double cppResult = const_cast(cppSelf)->getFrameRate(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getInput(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getInput(QString)const - // 1: getInput(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 1; // getInput(int)const - } else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getInput(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_getInput_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // getInput(const QString & inputLabel) const - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getInput(QString)const - Effect * cppResult = const_cast(cppSelf)->getInput(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - break; - } - case 1: // getInput(int inputNumber) const - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getInput(int)const - Effect * cppResult = const_cast(cppSelf)->getInput(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_getInput_TypeError: - const char* overloads[] = {"unicode", "int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.getInput", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_getInputLabel(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getInputLabel(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getInputLabel(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_getInputLabel_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getInputLabel(int) - QString cppResult = cppSelf->getInputLabel(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_getInputLabel_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.getInputLabel", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_getLabel(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLabel()const - QString cppResult = const_cast(cppSelf)->getLabel(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getMaxInputCount(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getMaxInputCount()const - int cppResult = const_cast(cppSelf)->getMaxInputCount(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getOutputFormat(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getOutputFormat()const - RectI* cppResult = new RectI(const_cast(cppSelf)->getOutputFormat()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], cppResult, true, true); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getParam(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.getParam", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_getParams(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParams()const - // Begin code injection - - std::list params = cppSelf->getParams(); - PyObject* ret = PyList_New((int) params.size()); - int idx = 0; - for (std::list::iterator it = params.begin(); it!=params.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getPixelAspectRatio(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPixelAspectRatio()const - double cppResult = const_cast(cppSelf)->getPixelAspectRatio(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getPluginID(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPluginID()const - QString cppResult = const_cast(cppSelf)->getPluginID(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getPosition(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPosition(double*,double*)const - // Begin code injection - - double x,y; - cppSelf->getPosition(&x,&y); - pyResult = PyTuple_New(2); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &y)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getPremult(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPremult()const - NATRON_NAMESPACE::ImagePremultiplicationEnum cppResult = NATRON_NAMESPACE::ImagePremultiplicationEnum(const_cast(cppSelf)->getPremult()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getRegionOfDefinition(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getRegionOfDefinition", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getRegionOfDefinition(double,int)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getRegionOfDefinition(double,int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_getRegionOfDefinition_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getRegionOfDefinition(double,int)const - RectD* cppResult = new RectD(const_cast(cppSelf)->getRegionOfDefinition(cppArg0, cppArg1)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], cppResult, true, true); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_getRegionOfDefinition_TypeError: - const char* overloads[] = {"float, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.getRegionOfDefinition", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_getRotoContext(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getRotoContext()const - Roto * cppResult = const_cast(cppSelf)->getRotoContext(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_ROTO_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getScriptName(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getScriptName()const - QString cppResult = const_cast(cppSelf)->getScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getSize(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getSize(double*,double*)const - // Begin code injection - - double x,y; - cppSelf->getSize(&x,&y); - pyResult = PyTuple_New(2); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &y)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getTrackerContext(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getTrackerContext()const - Tracker * cppResult = const_cast(cppSelf)->getTrackerContext(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACKER_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_getUserPageParam(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getUserPageParam()const - PageParam * cppResult = const_cast(cppSelf)->getUserPageParam(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PAGEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_isNodeSelected(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isNodeSelected()const - bool cppResult = const_cast(cppSelf)->isNodeSelected(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_isOutputNode(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isOutputNode() - bool cppResult = cppSelf->isOutputNode(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_isReaderNode(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isReaderNode() - bool cppResult = cppSelf->isReaderNode(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_isWriterNode(PyObject* self) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isWriterNode() - bool cppResult = cppSelf->isWriterNode(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_EffectFunc_setColor(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setColor", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setColor(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setColor(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setColor_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setColor(double,double,double) - cppSelf->setColor(cppArg0, cppArg1, cppArg2); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setColor_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.setColor", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setLabel(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setLabel(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setLabel(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setLabel_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setLabel(QString) - // Begin code injection - - cppSelf->setLabel(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setLabel_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.setLabel", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setPagesOrder(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setPagesOrder(QStringList) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArg)))) { - overloadId = 0; // setPagesOrder(QStringList) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setPagesOrder_TypeError; - - // Call function/method - { - ::QStringList cppArg0 = ::QStringList(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setPagesOrder(QStringList) - cppSelf->setPagesOrder(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setPagesOrder_TypeError: - const char* overloads[] = {"QStringList", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.setPagesOrder", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setPosition(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setPosition", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setPosition(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setPosition(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setPosition_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setPosition(double,double) - cppSelf->setPosition(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setPosition_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.setPosition", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setScriptName(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setScriptName(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setScriptName(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setScriptName_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setScriptName(QString) - // Begin code injection - - bool cppResult = cppSelf->setScriptName(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_EffectFunc_setScriptName_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.setScriptName", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setSize(PyObject* self, PyObject* args) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setSize", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setSize(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setSize(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setSize_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setSize(double,double) - cppSelf->setSize(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setSize_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Effect.setSize", overloads); - return 0; -} - -static PyObject* Sbk_EffectFunc_setSubGraphEditable(PyObject* self, PyObject* pyArg) -{ - ::Effect* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Effect*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EFFECT_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setSubGraphEditable(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setSubGraphEditable(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_EffectFunc_setSubGraphEditable_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setSubGraphEditable(bool) - cppSelf->setSubGraphEditable(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_EffectFunc_setSubGraphEditable_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Effect.setSubGraphEditable", overloads); - return 0; -} - -static PyMethodDef Sbk_Effect_methods[] = { - {"addUserPlane", (PyCFunction)Sbk_EffectFunc_addUserPlane, METH_VARARGS}, - {"beginChanges", (PyCFunction)Sbk_EffectFunc_beginChanges, METH_NOARGS}, - {"canConnectInput", (PyCFunction)Sbk_EffectFunc_canConnectInput, METH_VARARGS}, - {"connectInput", (PyCFunction)Sbk_EffectFunc_connectInput, METH_VARARGS}, - {"destroy", (PyCFunction)Sbk_EffectFunc_destroy, METH_VARARGS|METH_KEYWORDS}, - {"disconnectInput", (PyCFunction)Sbk_EffectFunc_disconnectInput, METH_O}, - {"endChanges", (PyCFunction)Sbk_EffectFunc_endChanges, METH_NOARGS}, - {"getAvailableLayers", (PyCFunction)Sbk_EffectFunc_getAvailableLayers, METH_O}, - {"getBitDepth", (PyCFunction)Sbk_EffectFunc_getBitDepth, METH_NOARGS}, - {"getColor", (PyCFunction)Sbk_EffectFunc_getColor, METH_NOARGS}, - {"getCurrentTime", (PyCFunction)Sbk_EffectFunc_getCurrentTime, METH_NOARGS}, - {"getFrameRate", (PyCFunction)Sbk_EffectFunc_getFrameRate, METH_NOARGS}, - {"getInput", (PyCFunction)Sbk_EffectFunc_getInput, METH_O}, - {"getInputLabel", (PyCFunction)Sbk_EffectFunc_getInputLabel, METH_O}, - {"getLabel", (PyCFunction)Sbk_EffectFunc_getLabel, METH_NOARGS}, - {"getMaxInputCount", (PyCFunction)Sbk_EffectFunc_getMaxInputCount, METH_NOARGS}, - {"getOutputFormat", (PyCFunction)Sbk_EffectFunc_getOutputFormat, METH_NOARGS}, - {"getParam", (PyCFunction)Sbk_EffectFunc_getParam, METH_O}, - {"getParams", (PyCFunction)Sbk_EffectFunc_getParams, METH_NOARGS}, - {"getPixelAspectRatio", (PyCFunction)Sbk_EffectFunc_getPixelAspectRatio, METH_NOARGS}, - {"getPluginID", (PyCFunction)Sbk_EffectFunc_getPluginID, METH_NOARGS}, - {"getPosition", (PyCFunction)Sbk_EffectFunc_getPosition, METH_NOARGS}, - {"getPremult", (PyCFunction)Sbk_EffectFunc_getPremult, METH_NOARGS}, - {"getRegionOfDefinition", (PyCFunction)Sbk_EffectFunc_getRegionOfDefinition, METH_VARARGS}, - {"getRotoContext", (PyCFunction)Sbk_EffectFunc_getRotoContext, METH_NOARGS}, - {"getScriptName", (PyCFunction)Sbk_EffectFunc_getScriptName, METH_NOARGS}, - {"getSize", (PyCFunction)Sbk_EffectFunc_getSize, METH_NOARGS}, - {"getTrackerContext", (PyCFunction)Sbk_EffectFunc_getTrackerContext, METH_NOARGS}, - {"getUserPageParam", (PyCFunction)Sbk_EffectFunc_getUserPageParam, METH_NOARGS}, - {"isNodeSelected", (PyCFunction)Sbk_EffectFunc_isNodeSelected, METH_NOARGS}, - {"isOutputNode", (PyCFunction)Sbk_EffectFunc_isOutputNode, METH_NOARGS}, - {"isReaderNode", (PyCFunction)Sbk_EffectFunc_isReaderNode, METH_NOARGS}, - {"isWriterNode", (PyCFunction)Sbk_EffectFunc_isWriterNode, METH_NOARGS}, - {"setColor", (PyCFunction)Sbk_EffectFunc_setColor, METH_VARARGS}, - {"setLabel", (PyCFunction)Sbk_EffectFunc_setLabel, METH_O}, - {"setPagesOrder", (PyCFunction)Sbk_EffectFunc_setPagesOrder, METH_O}, - {"setPosition", (PyCFunction)Sbk_EffectFunc_setPosition, METH_VARARGS}, - {"setScriptName", (PyCFunction)Sbk_EffectFunc_setScriptName, METH_O}, - {"setSize", (PyCFunction)Sbk_EffectFunc_setSize, METH_VARARGS}, - {"setSubGraphEditable", (PyCFunction)Sbk_EffectFunc_setSubGraphEditable, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Effect_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Effect_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -static int mi_offsets[] = { -1, -1, -1, -1, -1 }; -int* -Sbk_Effect_mi_init(const void* cptr) -{ - if (mi_offsets[0] == -1) { - std::set offsets; - std::set::iterator it; - const Effect* class_ptr = reinterpret_cast(cptr); - size_t base = (size_t) class_ptr; - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((Effect*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((Effect*)((void*)class_ptr))) - base); - - offsets.erase(0); - - int i = 0; - for (it = offsets.begin(); it != offsets.end(); it++) { - mi_offsets[i] = *it; - i++; - } - } - return mi_offsets; -} -static void* Sbk_EffectSpecialCastFunction(void* obj, SbkObjectType* desiredType) -{ - Effect* me = reinterpret_cast< ::Effect*>(obj); - if (desiredType == reinterpret_cast(SbkNatronEngineTypes[SBK_GROUP_IDX])) - return static_cast< ::Group*>(me); - else if (desiredType == reinterpret_cast(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX])) - return static_cast< ::UserParamHolder*>(me); - return me; -} - - -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Effect_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Effect", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Effect_traverse, - /*tp_clear*/ Sbk_Effect_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Effect_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Effect_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Group >())) - return dynamic_cast< ::Effect*>(reinterpret_cast< ::Group*>(cptr)); - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::UserParamHolder >())) - return dynamic_cast< ::Effect*>(reinterpret_cast< ::UserParamHolder*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Effect_PythonToCpp_Effect_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Effect_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Effect_PythonToCpp_Effect_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Effect_Type)) - return Effect_PythonToCpp_Effect_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Effect_PTR_CppToPython_Effect(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Effect*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Effect_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Effect(PyObject* module) -{ - SbkNatronEngineTypes[SBK_EFFECT_IDX] = reinterpret_cast(&Sbk_Effect_Type); - - PyObject* Sbk_Effect_Type_bases = PyTuple_Pack(2, - (PyObject*)SbkNatronEngineTypes[SBK_GROUP_IDX], - (PyObject*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX]); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Effect", "Effect*", - &Sbk_Effect_Type, &Shiboken::callCppDestructor< ::Effect >, (SbkObjectType*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], Sbk_Effect_Type_bases)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Effect_Type, - Effect_PythonToCpp_Effect_PTR, - is_Effect_PythonToCpp_Effect_PTR_Convertible, - Effect_PTR_CppToPython_Effect); - - Shiboken::Conversions::registerConverterName(converter, "Effect"); - Shiboken::Conversions::registerConverterName(converter, "Effect*"); - Shiboken::Conversions::registerConverterName(converter, "Effect&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Effect).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::EffectWrapper).name()); - - - MultipleInheritanceInitFunction func = Sbk_Effect_mi_init; - Shiboken::ObjectType::setMultipleIheritanceFunction(&Sbk_Effect_Type, func); - Shiboken::ObjectType::setCastFunction(&Sbk_Effect_Type, &Sbk_EffectSpecialCastFunction); - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Effect_Type, &Sbk_Effect_typeDiscovery); - - - EffectWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/effect_wrapper.h b/Engine/Qt4/NatronEngine/effect_wrapper.h deleted file mode 100644 index ec3add2e40..0000000000 --- a/Engine/Qt4/NatronEngine/effect_wrapper.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SBK_EFFECTWRAPPER_H -#define SBK_EFFECTWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class EffectWrapper : public Effect -{ -public: - ~EffectWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_EFFECTWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/exprutils_wrapper.cpp b/Engine/Qt4/NatronEngine/exprutils_wrapper.cpp deleted file mode 100644 index 1bf981628a..0000000000 --- a/Engine/Qt4/NatronEngine/exprutils_wrapper.cpp +++ /dev/null @@ -1,2341 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "exprutils_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_ExprUtils_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::ExprUtils >())) - return -1; - - ::ExprUtils* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // ExprUtils() - cptr = new ::ExprUtils(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::ExprUtils >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyObject* Sbk_ExprUtilsFunc_boxstep(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "boxstep", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: boxstep(double,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // boxstep(double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_boxstep_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // boxstep(double,double) - double cppResult = ::ExprUtils::boxstep(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_boxstep_TypeError: - const char* overloads[] = {"float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.boxstep", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_ccellnoise(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: ccellnoise(Double3DTuple) - if (true) { - overloadId = 0; // ccellnoise(Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_ccellnoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // ccellnoise(Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::ccellnoise(p); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_ccellnoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.ccellnoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cellnoise(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: cellnoise(Double3DTuple) - if (true) { - overloadId = 0; // cellnoise(Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cellnoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // cellnoise(Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - double ret = ExprUtils::cellnoise(p); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cellnoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.cellnoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cfbm(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:cfbm", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: cfbm(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // cfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // cfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // cfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // cfbm(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cfbm_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_cfbm_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_cfbm_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_cfbm_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // cfbm(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::cfbm(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cfbm_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.cfbm", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cfbm4(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm4(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm4(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:cfbm4", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: cfbm4(ColorTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // cfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // cfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // cfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // cfbm4(ColorTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cfbm4_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm4(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_cfbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm4(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_cfbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cfbm4(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_cfbm4_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // cfbm4(ColorTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - Double3DTuple ret = ExprUtils::cfbm4(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cfbm4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.cfbm4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cnoise(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: cnoise(Double3DTuple) - if (true) { - overloadId = 0; // cnoise(Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cnoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // cnoise(Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::cnoise(p); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cnoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.cnoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cnoise4(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: cnoise4(ColorTuple) - if (true) { - overloadId = 0; // cnoise4(ColorTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cnoise4_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // cnoise4(ColorTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - Double3DTuple ret = ExprUtils::cnoise4(p); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cnoise4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.cnoise4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_cturbulence(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cturbulence(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cturbulence(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:cturbulence", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: cturbulence(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // cturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // cturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // cturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // cturbulence(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_cturbulence_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cturbulence(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_cturbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cturbulence(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_cturbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.cturbulence(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_cturbulence_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // cturbulence(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::cturbulence(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_cturbulence_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.cturbulence", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_fbm(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:fbm", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: fbm(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // fbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // fbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // fbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // fbm(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_fbm_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_fbm_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_fbm_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_fbm_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // fbm(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - double ret = ExprUtils::fbm(p, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_fbm_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.fbm", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_fbm4(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm4(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm4(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:fbm4", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: fbm4(ColorTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // fbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // fbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // fbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // fbm4(ColorTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_fbm4_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm4(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_fbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm4(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_fbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.fbm4(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_fbm4_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // fbm4(ColorTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - double ret = ExprUtils::fbm4(p, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_fbm4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.fbm4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_gaussstep(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "gaussstep", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: gaussstep(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // gaussstep(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_gaussstep_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // gaussstep(double,double,double) - double cppResult = ::ExprUtils::gaussstep(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_gaussstep_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.gaussstep", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_hash(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: hash(std::vector) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], (pyArg)))) { - overloadId = 0; // hash(std::vector) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_hash_TypeError; - - // Call function/method - { - ::std::vector cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // hash(std::vector) - double cppResult = ::ExprUtils::hash(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_hash_TypeError: - const char* overloads[] = {"list", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.hash", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_linearstep(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "linearstep", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: linearstep(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // linearstep(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_linearstep_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // linearstep(double,double,double) - double cppResult = ::ExprUtils::linearstep(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_linearstep_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.linearstep", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_mix(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "mix", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: mix(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // mix(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_mix_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // mix(double,double,double) - double cppResult = ::ExprUtils::mix(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_mix_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.mix", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_noise(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: noise(Double2DTuple) - // 1: noise(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 1; // noise(double) - } else if (true) { - overloadId = 0; // noise(Double2DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_noise_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // noise(const Double2DTuple & p) - { - - if (!PyErr_Occurred()) { - // noise(Double2DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 4 && tupleSize != 3 && tupleSize != 2) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 2, 3 or 4 items."); - return 0; - } - - double ret = 0.; - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - if (tupleSize == 2) { - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - Double2DTuple p = {x1, x2}; - ret = ExprUtils::noise(p); - } else if (tupleSize == 3) { - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - ret = ExprUtils::noise(p); - } else if (tupleSize == 4) { - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - ret = ExprUtils::noise(p); - } - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - - return pyResult; - - // End of code injection - - - } - break; - } - case 1: // noise(double x) - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // noise(double) - double cppResult = ::ExprUtils::noise(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_noise_TypeError: - const char* overloads[] = {"NatronEngine.Double2DTuple", "float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.noise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_pnoise(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "pnoise", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: pnoise(Double3DTuple,Double3DTuple) - if (numArgs == 2) { - overloadId = 0; // pnoise(Double3DTuple,Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_pnoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // pnoise(Double3DTuple,Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - tupleSize = PyTuple_GET_SIZE(pyArgs[2-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - double p1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[2-1], 0), &(p1)); - double p2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[2-1], 1), &(p2)); - double p3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[2-1], 2), &(p3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple period = {p1, p2, p3}; - double ret = ExprUtils::pnoise(p, period); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_pnoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.pnoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_remap(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "remap", 5, 5, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]))) - return 0; - - - // Overloaded function decisor - // 0: remap(double,double,double,double,double) - if (numArgs == 5 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4])))) { - overloadId = 0; // remap(double,double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_remap_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - - if (!PyErr_Occurred()) { - // remap(double,double,double,double,double) - double cppResult = ::ExprUtils::remap(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_remap_TypeError: - const char* overloads[] = {"float, float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.remap", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_smoothstep(PyObject* self, PyObject* args) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "smoothstep", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: smoothstep(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // smoothstep(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_smoothstep_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // smoothstep(double,double,double) - double cppResult = ::ExprUtils::smoothstep(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_smoothstep_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.smoothstep", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_snoise(PyObject* self, PyObject* pyArg) -{ - ::ExprUtils* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ExprUtils*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_EXPRUTILS_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: snoise(Double3DTuple) - if (true) { - overloadId = 0; // snoise(Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_snoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // snoise(Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - double ret = cppSelf->snoise(p); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_snoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.snoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_snoise4(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: snoise4(ColorTuple) - if (true) { - overloadId = 0; // snoise4(ColorTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_snoise4_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // snoise4(ColorTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - double ret = ExprUtils::snoise4(p); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_snoise4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.snoise4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_turbulence(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.turbulence(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.turbulence(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:turbulence", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: turbulence(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // turbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // turbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // turbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // turbulence(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_turbulence_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.turbulence(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_turbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.turbulence(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_turbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.turbulence(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_turbulence_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // turbulence(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - double ret = ExprUtils::turbulence(p, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_turbulence_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.turbulence", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_vfbm(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:vfbm", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: vfbm(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // vfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // vfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // vfbm(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // vfbm(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_vfbm_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_vfbm_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_vfbm_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_vfbm_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // vfbm(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::vfbm(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_vfbm_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.vfbm", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_vfbm4(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm4(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm4(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:vfbm4", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: vfbm4(ColorTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // vfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // vfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // vfbm4(ColorTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // vfbm4(ColorTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_vfbm4_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm4(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_vfbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm4(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_vfbm4_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vfbm4(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_vfbm4_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // vfbm4(ColorTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - Double3DTuple ret = ExprUtils::vfbm4(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_vfbm4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.vfbm4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_vnoise(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: vnoise(Double3DTuple) - if (true) { - overloadId = 0; // vnoise(Double3DTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_vnoise_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // vnoise(Double3DTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::vnoise(p); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_vnoise_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.vnoise", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_vnoise4(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: vnoise4(ColorTuple) - if (true) { - overloadId = 0; // vnoise4(ColorTuple) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_vnoise4_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // vnoise4(ColorTuple) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArg); - if (tupleSize != 4) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 4 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 2), &(x3)); - double x4; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArg, 3), &(x4)); - ColorTuple p = {x1, x2, x3, x4}; - Double3DTuple ret = ExprUtils::vnoise4(p); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_vnoise4_TypeError: - const char* overloads[] = {"NatronEngine.ColorTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ExprUtils.vnoise4", overloads); - return 0; -} - -static PyObject* Sbk_ExprUtilsFunc_vturbulence(PyObject* self, PyObject* args, PyObject* kwds) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vturbulence(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vturbulence(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:vturbulence", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: vturbulence(Double3DTuple,int,double,double) - if (true) { - if (numArgs == 1) { - overloadId = 0; // vturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // vturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // vturbulence(Double3DTuple,int,double,double) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // vturbulence(Double3DTuple,int,double,double) - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ExprUtilsFunc_vturbulence_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "octaves"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vturbulence(): got multiple values for keyword argument 'octaves'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ExprUtilsFunc_vturbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "lacunarity"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vturbulence(): got multiple values for keyword argument 'lacunarity'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_ExprUtilsFunc_vturbulence_TypeError; - } - value = PyDict_GetItemString(kwds, "gain"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ExprUtils.vturbulence(): got multiple values for keyword argument 'gain'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ExprUtilsFunc_vturbulence_TypeError; - } - } - int cppArg1 = 6; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2 = 2.; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3 = 0.5; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // vturbulence(Double3DTuple,int,double,double) - // Begin code injection - - int tupleSize = PyTuple_GET_SIZE(pyArgs[1-1]); - if (tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 items."); - return 0; - } - double x1; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 0), &(x1)); - double x2; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 1), &(x2)); - double x3; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(pyArgs[1-1], 2), &(x3)); - Double3DTuple p = {x1, x2, x3}; - Double3DTuple ret = ExprUtils::vturbulence(p, cppArg1, cppArg2, cppArg3); - pyResult = PyTuple_New(3); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.y)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret.z)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ExprUtilsFunc_vturbulence_TypeError: - const char* overloads[] = {"NatronEngine.Double3DTuple, int = 6, float = 2., float = 0.5", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ExprUtils.vturbulence", overloads); - return 0; -} - -static PyMethodDef Sbk_ExprUtils_methods[] = { - {"boxstep", (PyCFunction)Sbk_ExprUtilsFunc_boxstep, METH_VARARGS|METH_STATIC}, - {"ccellnoise", (PyCFunction)Sbk_ExprUtilsFunc_ccellnoise, METH_O|METH_STATIC}, - {"cellnoise", (PyCFunction)Sbk_ExprUtilsFunc_cellnoise, METH_O|METH_STATIC}, - {"cfbm", (PyCFunction)Sbk_ExprUtilsFunc_cfbm, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"cfbm4", (PyCFunction)Sbk_ExprUtilsFunc_cfbm4, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"cnoise", (PyCFunction)Sbk_ExprUtilsFunc_cnoise, METH_O|METH_STATIC}, - {"cnoise4", (PyCFunction)Sbk_ExprUtilsFunc_cnoise4, METH_O|METH_STATIC}, - {"cturbulence", (PyCFunction)Sbk_ExprUtilsFunc_cturbulence, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"fbm", (PyCFunction)Sbk_ExprUtilsFunc_fbm, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"fbm4", (PyCFunction)Sbk_ExprUtilsFunc_fbm4, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"gaussstep", (PyCFunction)Sbk_ExprUtilsFunc_gaussstep, METH_VARARGS|METH_STATIC}, - {"hash", (PyCFunction)Sbk_ExprUtilsFunc_hash, METH_O|METH_STATIC}, - {"linearstep", (PyCFunction)Sbk_ExprUtilsFunc_linearstep, METH_VARARGS|METH_STATIC}, - {"mix", (PyCFunction)Sbk_ExprUtilsFunc_mix, METH_VARARGS|METH_STATIC}, - {"noise", (PyCFunction)Sbk_ExprUtilsFunc_noise, METH_O|METH_STATIC}, - {"pnoise", (PyCFunction)Sbk_ExprUtilsFunc_pnoise, METH_VARARGS|METH_STATIC}, - {"remap", (PyCFunction)Sbk_ExprUtilsFunc_remap, METH_VARARGS|METH_STATIC}, - {"smoothstep", (PyCFunction)Sbk_ExprUtilsFunc_smoothstep, METH_VARARGS|METH_STATIC}, - {"snoise", (PyCFunction)Sbk_ExprUtilsFunc_snoise, METH_O}, - {"snoise4", (PyCFunction)Sbk_ExprUtilsFunc_snoise4, METH_O|METH_STATIC}, - {"turbulence", (PyCFunction)Sbk_ExprUtilsFunc_turbulence, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"vfbm", (PyCFunction)Sbk_ExprUtilsFunc_vfbm, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"vfbm4", (PyCFunction)Sbk_ExprUtilsFunc_vfbm4, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - {"vnoise", (PyCFunction)Sbk_ExprUtilsFunc_vnoise, METH_O|METH_STATIC}, - {"vnoise4", (PyCFunction)Sbk_ExprUtilsFunc_vnoise4, METH_O|METH_STATIC}, - {"vturbulence", (PyCFunction)Sbk_ExprUtilsFunc_vturbulence, METH_VARARGS|METH_KEYWORDS|METH_STATIC}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ExprUtils_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ExprUtils_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ExprUtils_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ExprUtils", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ExprUtils_traverse, - /*tp_clear*/ Sbk_ExprUtils_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ExprUtils_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_ExprUtils_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ExprUtils_PythonToCpp_ExprUtils_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ExprUtils_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ExprUtils_PythonToCpp_ExprUtils_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ExprUtils_Type)) - return ExprUtils_PythonToCpp_ExprUtils_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ExprUtils_PTR_CppToPython_ExprUtils(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ExprUtils*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ExprUtils_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ExprUtils(PyObject* module) -{ - SbkNatronEngineTypes[SBK_EXPRUTILS_IDX] = reinterpret_cast(&Sbk_ExprUtils_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ExprUtils", "ExprUtils*", - &Sbk_ExprUtils_Type, &Shiboken::callCppDestructor< ::ExprUtils >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ExprUtils_Type, - ExprUtils_PythonToCpp_ExprUtils_PTR, - is_ExprUtils_PythonToCpp_ExprUtils_PTR_Convertible, - ExprUtils_PTR_CppToPython_ExprUtils); - - Shiboken::Conversions::registerConverterName(converter, "ExprUtils"); - Shiboken::Conversions::registerConverterName(converter, "ExprUtils*"); - Shiboken::Conversions::registerConverterName(converter, "ExprUtils&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ExprUtils).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/exprutils_wrapper.h b/Engine/Qt4/NatronEngine/exprutils_wrapper.h deleted file mode 100644 index cf8b36f56d..0000000000 --- a/Engine/Qt4/NatronEngine/exprutils_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_EXPRUTILS_H -#define SBK_EXPRUTILS_H - -#include - -#include - -#endif // SBK_EXPRUTILS_H - diff --git a/Engine/Qt4/NatronEngine/fileparam_wrapper.cpp b/Engine/Qt4/NatronEngine/fileparam_wrapper.cpp deleted file mode 100644 index c25697c2e2..0000000000 --- a/Engine/Qt4/NatronEngine/fileparam_wrapper.cpp +++ /dev/null @@ -1,260 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "fileparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void FileParamWrapper::pysideInitQtMetaTypes() -{ -} - -FileParamWrapper::~FileParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_FileParamFunc_openFile(PyObject* self) -{ - FileParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (FileParamWrapper*)((::FileParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_FILEPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // openFile() - cppSelf->openFile(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_FileParamFunc_reloadFile(PyObject* self) -{ - FileParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (FileParamWrapper*)((::FileParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_FILEPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // reloadFile() - cppSelf->reloadFile(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_FileParamFunc_setSequenceEnabled(PyObject* self, PyObject* pyArg) -{ - FileParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (FileParamWrapper*)((::FileParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_FILEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setSequenceEnabled(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setSequenceEnabled(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_FileParamFunc_setSequenceEnabled_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setSequenceEnabled(bool) - cppSelf->setSequenceEnabled(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_FileParamFunc_setSequenceEnabled_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.FileParam.setSequenceEnabled", overloads); - return 0; -} - -static PyMethodDef Sbk_FileParam_methods[] = { - {"openFile", (PyCFunction)Sbk_FileParamFunc_openFile, METH_NOARGS}, - {"reloadFile", (PyCFunction)Sbk_FileParamFunc_reloadFile, METH_NOARGS}, - {"setSequenceEnabled", (PyCFunction)Sbk_FileParamFunc_setSequenceEnabled, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_FileParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_FileParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_FileParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.FileParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_FileParam_traverse, - /*tp_clear*/ Sbk_FileParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_FileParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_FileParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::FileParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void FileParam_PythonToCpp_FileParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_FileParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_FileParam_PythonToCpp_FileParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_FileParam_Type)) - return FileParam_PythonToCpp_FileParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* FileParam_PTR_CppToPython_FileParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::FileParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_FileParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_FileParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_FILEPARAM_IDX] = reinterpret_cast(&Sbk_FileParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "FileParam", "FileParam*", - &Sbk_FileParam_Type, &Shiboken::callCppDestructor< ::FileParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_FileParam_Type, - FileParam_PythonToCpp_FileParam_PTR, - is_FileParam_PythonToCpp_FileParam_PTR_Convertible, - FileParam_PTR_CppToPython_FileParam); - - Shiboken::Conversions::registerConverterName(converter, "FileParam"); - Shiboken::Conversions::registerConverterName(converter, "FileParam*"); - Shiboken::Conversions::registerConverterName(converter, "FileParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::FileParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::FileParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_FileParam_Type, &Sbk_FileParam_typeDiscovery); - - - FileParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/fileparam_wrapper.h b/Engine/Qt4/NatronEngine/fileparam_wrapper.h deleted file mode 100644 index 3e5151858a..0000000000 --- a/Engine/Qt4/NatronEngine/fileparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_FILEPARAMWRAPPER_H -#define SBK_FILEPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class FileParamWrapper : public FileParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { FileParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~FileParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_FILEPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.cpp b/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.cpp deleted file mode 100644 index 57e0f2e153..0000000000 --- a/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.cpp +++ /dev/null @@ -1,376 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "floatnodecreationproperty_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void FloatNodeCreationPropertyWrapper::pysideInitQtMetaTypes() -{ -} - -FloatNodeCreationPropertyWrapper::FloatNodeCreationPropertyWrapper(const std::vector & values) : FloatNodeCreationProperty(values) { - // ... middle -} - -FloatNodeCreationPropertyWrapper::FloatNodeCreationPropertyWrapper(double value) : FloatNodeCreationProperty(value) { - // ... middle -} - -FloatNodeCreationPropertyWrapper::~FloatNodeCreationPropertyWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_FloatNodeCreationProperty_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::FloatNodeCreationProperty >())) - return -1; - - ::FloatNodeCreationPropertyWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.FloatNodeCreationProperty(): too many arguments"); - return -1; - } - - if (!PyArg_ParseTuple(args, "|O:FloatNodeCreationProperty", &(pyArgs[0]))) - return -1; - - - // Overloaded function decisor - // 0: FloatNodeCreationProperty(std::vector) - // 1: FloatNodeCreationProperty(double) - if (numArgs == 0) { - overloadId = 0; // FloatNodeCreationProperty(std::vector) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // FloatNodeCreationProperty(double) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], (pyArgs[0])))) { - overloadId = 0; // FloatNodeCreationProperty(std::vector) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_FloatNodeCreationProperty_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // FloatNodeCreationProperty(const std::vector & values) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "values"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.FloatNodeCreationProperty(): got multiple values for keyword argument 'values'."); - return -1; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], (pyArgs[0])))) - goto Sbk_FloatNodeCreationProperty_Init_TypeError; - } - } - ::std::vector cppArg0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // FloatNodeCreationProperty(std::vector) - cptr = new ::FloatNodeCreationPropertyWrapper(cppArg0); - } - break; - } - case 1: // FloatNodeCreationProperty(double value) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // FloatNodeCreationProperty(double) - cptr = new ::FloatNodeCreationPropertyWrapper(cppArg0); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::FloatNodeCreationProperty >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_FloatNodeCreationProperty_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_FloatNodeCreationProperty_Init_TypeError: - const char* overloads[] = {"list = std.vector< double >()", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.FloatNodeCreationProperty", overloads); - return -1; -} - -static PyObject* Sbk_FloatNodeCreationPropertyFunc_getValues(PyObject* self) -{ - ::FloatNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::FloatNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_FLOATNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValues()const - const std::vector & cppResult = const_cast(cppSelf)->getValues(); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_FloatNodeCreationPropertyFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::FloatNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::FloatNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_FLOATNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.FloatNodeCreationProperty.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.FloatNodeCreationProperty.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(double,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(double,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_FloatNodeCreationPropertyFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "index"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.FloatNodeCreationProperty.setValue(): got multiple values for keyword argument 'index'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_FloatNodeCreationPropertyFunc_setValue_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(double,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_FloatNodeCreationPropertyFunc_setValue_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.FloatNodeCreationProperty.setValue", overloads); - return 0; -} - -static PyMethodDef Sbk_FloatNodeCreationProperty_methods[] = { - {"getValues", (PyCFunction)Sbk_FloatNodeCreationPropertyFunc_getValues, METH_NOARGS}, - {"setValue", (PyCFunction)Sbk_FloatNodeCreationPropertyFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_FloatNodeCreationProperty_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_FloatNodeCreationProperty_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_FloatNodeCreationProperty_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.FloatNodeCreationProperty", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_FloatNodeCreationProperty_traverse, - /*tp_clear*/ Sbk_FloatNodeCreationProperty_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_FloatNodeCreationProperty_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_FloatNodeCreationProperty_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_FloatNodeCreationProperty_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::NodeCreationProperty >())) - return dynamic_cast< ::FloatNodeCreationProperty*>(reinterpret_cast< ::NodeCreationProperty*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void FloatNodeCreationProperty_PythonToCpp_FloatNodeCreationProperty_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_FloatNodeCreationProperty_Type, pyIn, cppOut); -} -static PythonToCppFunc is_FloatNodeCreationProperty_PythonToCpp_FloatNodeCreationProperty_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_FloatNodeCreationProperty_Type)) - return FloatNodeCreationProperty_PythonToCpp_FloatNodeCreationProperty_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* FloatNodeCreationProperty_PTR_CppToPython_FloatNodeCreationProperty(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::FloatNodeCreationProperty*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_FloatNodeCreationProperty_Type, const_cast(cppIn), false, false, typeName); -} - -void init_FloatNodeCreationProperty(PyObject* module) -{ - SbkNatronEngineTypes[SBK_FLOATNODECREATIONPROPERTY_IDX] = reinterpret_cast(&Sbk_FloatNodeCreationProperty_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "FloatNodeCreationProperty", "FloatNodeCreationProperty*", - &Sbk_FloatNodeCreationProperty_Type, &Shiboken::callCppDestructor< ::FloatNodeCreationProperty >, (SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_FloatNodeCreationProperty_Type, - FloatNodeCreationProperty_PythonToCpp_FloatNodeCreationProperty_PTR, - is_FloatNodeCreationProperty_PythonToCpp_FloatNodeCreationProperty_PTR_Convertible, - FloatNodeCreationProperty_PTR_CppToPython_FloatNodeCreationProperty); - - Shiboken::Conversions::registerConverterName(converter, "FloatNodeCreationProperty"); - Shiboken::Conversions::registerConverterName(converter, "FloatNodeCreationProperty*"); - Shiboken::Conversions::registerConverterName(converter, "FloatNodeCreationProperty&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::FloatNodeCreationProperty).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::FloatNodeCreationPropertyWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_FloatNodeCreationProperty_Type, &Sbk_FloatNodeCreationProperty_typeDiscovery); - - - FloatNodeCreationPropertyWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.h b/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.h deleted file mode 100644 index daeb7deb6f..0000000000 --- a/Engine/Qt4/NatronEngine/floatnodecreationproperty_wrapper.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SBK_FLOATNODECREATIONPROPERTYWRAPPER_H -#define SBK_FLOATNODECREATIONPROPERTYWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class FloatNodeCreationPropertyWrapper : public FloatNodeCreationProperty -{ -public: - FloatNodeCreationPropertyWrapper(const std::vector & values = std::vector< double >()); - FloatNodeCreationPropertyWrapper(double value); - virtual ~FloatNodeCreationPropertyWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_FLOATNODECREATIONPROPERTYWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/group_wrapper.cpp b/Engine/Qt4/NatronEngine/group_wrapper.cpp deleted file mode 100644 index 8f041b6902..0000000000 --- a/Engine/Qt4/NatronEngine/group_wrapper.cpp +++ /dev/null @@ -1,285 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "group_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - -// Native --------------------------------------------------------- - -void GroupWrapper::pysideInitQtMetaTypes() -{ -} - -GroupWrapper::GroupWrapper() : Group() { - // ... middle -} - -GroupWrapper::~GroupWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_Group_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Group >())) - return -1; - - ::GroupWrapper* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // Group() - cptr = new ::GroupWrapper(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Group >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyObject* Sbk_GroupFunc_getChildren(PyObject* self) -{ - ::Group* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Group*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getChildren()const - // Begin code injection - - std::list effects = cppSelf->getChildren(); - PyObject* ret = PyList_New((int) effects.size()); - int idx = 0; - for (std::list::iterator it = effects.begin(); it!=effects.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GroupFunc_getNode(PyObject* self, PyObject* pyArg) -{ - ::Group* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Group*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getNode(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getNode(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GroupFunc_getNode_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getNode(QString)const - Effect * cppResult = const_cast(cppSelf)->getNode(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GroupFunc_getNode_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Group.getNode", overloads); - return 0; -} - -static PyMethodDef Sbk_Group_methods[] = { - {"getChildren", (PyCFunction)Sbk_GroupFunc_getChildren, METH_NOARGS}, - {"getNode", (PyCFunction)Sbk_GroupFunc_getNode, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Group_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Group_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Group_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Group", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Group_traverse, - /*tp_clear*/ Sbk_Group_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Group_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_Group_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Group_PythonToCpp_Group_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Group_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Group_PythonToCpp_Group_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Group_Type)) - return Group_PythonToCpp_Group_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Group_PTR_CppToPython_Group(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Group*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Group_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Group(PyObject* module) -{ - SbkNatronEngineTypes[SBK_GROUP_IDX] = reinterpret_cast(&Sbk_Group_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Group", "Group*", - &Sbk_Group_Type, &Shiboken::callCppDestructor< ::Group >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Group_Type, - Group_PythonToCpp_Group_PTR, - is_Group_PythonToCpp_Group_PTR_Convertible, - Group_PTR_CppToPython_Group); - - Shiboken::Conversions::registerConverterName(converter, "Group"); - Shiboken::Conversions::registerConverterName(converter, "Group*"); - Shiboken::Conversions::registerConverterName(converter, "Group&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Group).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::GroupWrapper).name()); - - - - GroupWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/group_wrapper.h b/Engine/Qt4/NatronEngine/group_wrapper.h deleted file mode 100644 index 5870a777fa..0000000000 --- a/Engine/Qt4/NatronEngine/group_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_GROUPWRAPPER_H -#define SBK_GROUPWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class GroupWrapper : public Group -{ -public: - GroupWrapper(); - virtual ~GroupWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_GROUPWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/groupparam_wrapper.cpp b/Engine/Qt4/NatronEngine/groupparam_wrapper.cpp deleted file mode 100644 index 330f671bc8..0000000000 --- a/Engine/Qt4/NatronEngine/groupparam_wrapper.cpp +++ /dev/null @@ -1,314 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "groupparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void GroupParamWrapper::pysideInitQtMetaTypes() -{ -} - -GroupParamWrapper::~GroupParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_GroupParamFunc_addParam(PyObject* self, PyObject* pyArg) -{ - GroupParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (GroupParamWrapper*)((::GroupParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUPPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addParam(const Param*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArg)))) { - overloadId = 0; // addParam(const Param*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GroupParamFunc_addParam_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::Param* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addParam(const Param*) - cppSelf->addParam(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GroupParamFunc_addParam_TypeError: - const char* overloads[] = {"NatronEngine.Param", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.GroupParam.addParam", overloads); - return 0; -} - -static PyObject* Sbk_GroupParamFunc_getIsOpened(PyObject* self) -{ - GroupParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (GroupParamWrapper*)((::GroupParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUPPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getIsOpened()const - bool cppResult = const_cast(cppSelf)->getIsOpened(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GroupParamFunc_setAsTab(PyObject* self) -{ - GroupParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (GroupParamWrapper*)((::GroupParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUPPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setAsTab() - cppSelf->setAsTab(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_GroupParamFunc_setOpened(PyObject* self, PyObject* pyArg) -{ - GroupParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (GroupParamWrapper*)((::GroupParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_GROUPPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setOpened(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setOpened(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GroupParamFunc_setOpened_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setOpened(bool) - // Begin code injection - - cppSelf->setOpened(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GroupParamFunc_setOpened_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.GroupParam.setOpened", overloads); - return 0; -} - -static PyMethodDef Sbk_GroupParam_methods[] = { - {"addParam", (PyCFunction)Sbk_GroupParamFunc_addParam, METH_O}, - {"getIsOpened", (PyCFunction)Sbk_GroupParamFunc_getIsOpened, METH_NOARGS}, - {"setAsTab", (PyCFunction)Sbk_GroupParamFunc_setAsTab, METH_NOARGS}, - {"setOpened", (PyCFunction)Sbk_GroupParamFunc_setOpened, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_GroupParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_GroupParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_GroupParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.GroupParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_GroupParam_traverse, - /*tp_clear*/ Sbk_GroupParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_GroupParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_GroupParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::GroupParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void GroupParam_PythonToCpp_GroupParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_GroupParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_GroupParam_PythonToCpp_GroupParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_GroupParam_Type)) - return GroupParam_PythonToCpp_GroupParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* GroupParam_PTR_CppToPython_GroupParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::GroupParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_GroupParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_GroupParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_GROUPPARAM_IDX] = reinterpret_cast(&Sbk_GroupParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "GroupParam", "GroupParam*", - &Sbk_GroupParam_Type, &Shiboken::callCppDestructor< ::GroupParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_GroupParam_Type, - GroupParam_PythonToCpp_GroupParam_PTR, - is_GroupParam_PythonToCpp_GroupParam_PTR_Convertible, - GroupParam_PTR_CppToPython_GroupParam); - - Shiboken::Conversions::registerConverterName(converter, "GroupParam"); - Shiboken::Conversions::registerConverterName(converter, "GroupParam*"); - Shiboken::Conversions::registerConverterName(converter, "GroupParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::GroupParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::GroupParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_GroupParam_Type, &Sbk_GroupParam_typeDiscovery); - - - GroupParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/groupparam_wrapper.h b/Engine/Qt4/NatronEngine/groupparam_wrapper.h deleted file mode 100644 index b177029441..0000000000 --- a/Engine/Qt4/NatronEngine/groupparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_GROUPPARAMWRAPPER_H -#define SBK_GROUPPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class GroupParamWrapper : public GroupParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { GroupParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~GroupParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_GROUPPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/imagelayer_wrapper.cpp b/Engine/Qt4/NatronEngine/imagelayer_wrapper.cpp deleted file mode 100644 index 660b4e9946..0000000000 --- a/Engine/Qt4/NatronEngine/imagelayer_wrapper.cpp +++ /dev/null @@ -1,725 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "imagelayer_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_ImageLayer_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::ImageLayer >())) - return -1; - - ::ImageLayer* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2) - goto Sbk_ImageLayer_Init_TypeError; - - if (!PyArg_UnpackTuple(args, "ImageLayer", 1, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return -1; - - - // Overloaded function decisor - // 0: ImageLayer(ImageLayer) - // 1: ImageLayer(QString,QString,QStringList) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[2])))) { - overloadId = 1; // ImageLayer(QString,QString,QStringList) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArgs[0])))) { - overloadId = 0; // ImageLayer(ImageLayer) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ImageLayer_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // ImageLayer(const ImageLayer & ImageLayer) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return -1; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp[0])) - pythonToCpp[0](pyArgs[0], &cppArg0_local); - else - pythonToCpp[0](pyArgs[0], &cppArg0); - - - if (!PyErr_Occurred()) { - // ImageLayer(ImageLayer) - cptr = new ::ImageLayer(*cppArg0); - } - break; - } - case 1: // ImageLayer(const QString & layerName, const QString & componentsPrettyName, const QStringList & componentsName) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - ::QStringList cppArg2 = ::QStringList(); - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // ImageLayer(QString,QString,QStringList) - cptr = new ::ImageLayer(cppArg0, cppArg1, cppArg2); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::ImageLayer >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_ImageLayer_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_ImageLayer_Init_TypeError: - const char* overloads[] = {"NatronEngine.ImageLayer", "unicode, unicode, QStringList", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ImageLayer", overloads); - return -1; -} - -static PyObject* Sbk_ImageLayerFunc_getAlphaComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getAlphaComponents() - ImageLayer cppResult = ::ImageLayer::getAlphaComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getBackwardMotionComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getBackwardMotionComponents() - ImageLayer cppResult = ::ImageLayer::getBackwardMotionComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getComponentsNames(PyObject* self) -{ - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getComponentsNames()const - const QStringList & cppResult = const_cast(cppSelf)->getComponentsNames(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getComponentsPrettyName(PyObject* self) -{ - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getComponentsPrettyName()const - const QString & cppResult = const_cast(cppSelf)->getComponentsPrettyName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getDisparityLeftComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getDisparityLeftComponents() - ImageLayer cppResult = ::ImageLayer::getDisparityLeftComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getDisparityRightComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getDisparityRightComponents() - ImageLayer cppResult = ::ImageLayer::getDisparityRightComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getForwardMotionComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getForwardMotionComponents() - ImageLayer cppResult = ::ImageLayer::getForwardMotionComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getHash(PyObject* self, PyObject* pyArg) -{ - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getHash(ImageLayer) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArg)))) { - overloadId = 0; // getHash(ImageLayer) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ImageLayerFunc_getHash_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp)) - pythonToCpp(pyArg, &cppArg0_local); - else - pythonToCpp(pyArg, &cppArg0); - - - if (!PyErr_Occurred()) { - // getHash(ImageLayer) - int cppResult = ::ImageLayer::getHash(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ImageLayerFunc_getHash_TypeError: - const char* overloads[] = {"NatronEngine.ImageLayer", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ImageLayer.getHash", overloads); - return 0; -} - -static PyObject* Sbk_ImageLayerFunc_getLayerName(PyObject* self) -{ - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLayerName()const - const QString & cppResult = const_cast(cppSelf)->getLayerName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getNoneComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNoneComponents() - ImageLayer cppResult = ::ImageLayer::getNoneComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getNumComponents(PyObject* self) -{ - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumComponents()const - int cppResult = const_cast(cppSelf)->getNumComponents(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getRGBAComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getRGBAComponents() - ImageLayer cppResult = ::ImageLayer::getRGBAComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_getRGBComponents(PyObject* self) -{ - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getRGBComponents() - ImageLayer cppResult = ::ImageLayer::getRGBComponents(); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayerFunc_isColorPlane(PyObject* self) -{ - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isColorPlane()const - bool cppResult = const_cast(cppSelf)->isColorPlane(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ImageLayer___copy__(PyObject* self) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::ImageLayer& cppSelf = *(((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self))); - PyObject* pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppSelf); - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyMethodDef Sbk_ImageLayer_methods[] = { - {"getAlphaComponents", (PyCFunction)Sbk_ImageLayerFunc_getAlphaComponents, METH_NOARGS|METH_STATIC}, - {"getBackwardMotionComponents", (PyCFunction)Sbk_ImageLayerFunc_getBackwardMotionComponents, METH_NOARGS|METH_STATIC}, - {"getComponentsNames", (PyCFunction)Sbk_ImageLayerFunc_getComponentsNames, METH_NOARGS}, - {"getComponentsPrettyName", (PyCFunction)Sbk_ImageLayerFunc_getComponentsPrettyName, METH_NOARGS}, - {"getDisparityLeftComponents", (PyCFunction)Sbk_ImageLayerFunc_getDisparityLeftComponents, METH_NOARGS|METH_STATIC}, - {"getDisparityRightComponents", (PyCFunction)Sbk_ImageLayerFunc_getDisparityRightComponents, METH_NOARGS|METH_STATIC}, - {"getForwardMotionComponents", (PyCFunction)Sbk_ImageLayerFunc_getForwardMotionComponents, METH_NOARGS|METH_STATIC}, - {"getHash", (PyCFunction)Sbk_ImageLayerFunc_getHash, METH_O|METH_STATIC}, - {"getLayerName", (PyCFunction)Sbk_ImageLayerFunc_getLayerName, METH_NOARGS}, - {"getNoneComponents", (PyCFunction)Sbk_ImageLayerFunc_getNoneComponents, METH_NOARGS|METH_STATIC}, - {"getNumComponents", (PyCFunction)Sbk_ImageLayerFunc_getNumComponents, METH_NOARGS}, - {"getRGBAComponents", (PyCFunction)Sbk_ImageLayerFunc_getRGBAComponents, METH_NOARGS|METH_STATIC}, - {"getRGBComponents", (PyCFunction)Sbk_ImageLayerFunc_getRGBComponents, METH_NOARGS|METH_STATIC}, - {"isColorPlane", (PyCFunction)Sbk_ImageLayerFunc_isColorPlane, METH_NOARGS}, - - {"__copy__", (PyCFunction)Sbk_ImageLayer___copy__, METH_NOARGS}, - {0} // Sentinel -}; - -// Rich comparison -static PyObject* Sbk_ImageLayer_richcompare(PyObject* self, PyObject* pyArg, int op) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::ImageLayer& cppSelf = *(((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self))); - SBK_UNUSED(cppSelf) - PyObject* pyResult = 0; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - switch (op) { - case Py_NE: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArg)))) { - // operator!=(const ImageLayer & other) const - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp)) - pythonToCpp(pyArg, &cppArg0_local); - else - pythonToCpp(pyArg, &cppArg0); - - bool cppResult = cppSelf != (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_True; - Py_INCREF(pyResult); - } - - break; - case Py_LT: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArg)))) { - // operator<(const ImageLayer & other) const - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp)) - pythonToCpp(pyArg, &cppArg0_local); - else - pythonToCpp(pyArg, &cppArg0); - - bool cppResult = cppSelf < (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - goto Sbk_ImageLayer_RichComparison_TypeError; - } - - break; - case Py_EQ: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (pyArg)))) { - // operator==(const ImageLayer & other) const - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ImageLayer cppArg0_local = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - ::ImageLayer* cppArg0 = &cppArg0_local; - if (Shiboken::Conversions::isImplicitConversion((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pythonToCpp)) - pythonToCpp(pyArg, &cppArg0_local); - else - pythonToCpp(pyArg, &cppArg0); - - bool cppResult = cppSelf == (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_False; - Py_INCREF(pyResult); - } - - break; - default: - goto Sbk_ImageLayer_RichComparison_TypeError; - } - - if (pyResult && !PyErr_Occurred()) - return pyResult; - Sbk_ImageLayer_RichComparison_TypeError: - PyErr_SetString(PyExc_NotImplementedError, "operator not implemented."); - return 0; - -} - -} // extern "C" - -static Py_hash_t Sbk_ImageLayer_HashFunc(PyObject* self) { - ::ImageLayer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)self)); - return ImageLayer::getHash(*cppSelf); -} - -static int Sbk_ImageLayer_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ImageLayer_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ImageLayer_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ImageLayer", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ &Sbk_ImageLayer_HashFunc, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ImageLayer_traverse, - /*tp_clear*/ Sbk_ImageLayer_clear, - /*tp_richcompare*/ Sbk_ImageLayer_richcompare, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ImageLayer_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_ImageLayer_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ImageLayer_PythonToCpp_ImageLayer_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ImageLayer_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ImageLayer_PythonToCpp_ImageLayer_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ImageLayer_Type)) - return ImageLayer_PythonToCpp_ImageLayer_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ImageLayer_PTR_CppToPython_ImageLayer(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ImageLayer*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ImageLayer_Type, const_cast(cppIn), false, false, typeName); -} - -// C++ to Python copy conversion. -static PyObject* ImageLayer_COPY_CppToPython_ImageLayer(const void* cppIn) { - return Shiboken::Object::newObject(&Sbk_ImageLayer_Type, new ::ImageLayer(*((::ImageLayer*)cppIn)), true, true); -} - -// Python to C++ copy conversion. -static void ImageLayer_PythonToCpp_ImageLayer_COPY(PyObject* pyIn, void* cppOut) { - *((::ImageLayer*)cppOut) = *((::ImageLayer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], (SbkObject*)pyIn)); -} -static PythonToCppFunc is_ImageLayer_PythonToCpp_ImageLayer_COPY_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ImageLayer_Type)) - return ImageLayer_PythonToCpp_ImageLayer_COPY; - return 0; -} - -void init_ImageLayer(PyObject* module) -{ - SbkNatronEngineTypes[SBK_IMAGELAYER_IDX] = reinterpret_cast(&Sbk_ImageLayer_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ImageLayer", "ImageLayer", - &Sbk_ImageLayer_Type, &Shiboken::callCppDestructor< ::ImageLayer >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ImageLayer_Type, - ImageLayer_PythonToCpp_ImageLayer_PTR, - is_ImageLayer_PythonToCpp_ImageLayer_PTR_Convertible, - ImageLayer_PTR_CppToPython_ImageLayer, - ImageLayer_COPY_CppToPython_ImageLayer); - - Shiboken::Conversions::registerConverterName(converter, "ImageLayer"); - Shiboken::Conversions::registerConverterName(converter, "ImageLayer*"); - Shiboken::Conversions::registerConverterName(converter, "ImageLayer&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ImageLayer).name()); - - // Add Python to C++ copy (value, not pointer neither reference) conversion to type converter. - Shiboken::Conversions::addPythonToCppValueConversion(converter, - ImageLayer_PythonToCpp_ImageLayer_COPY, - is_ImageLayer_PythonToCpp_ImageLayer_COPY_Convertible); - - -} diff --git a/Engine/Qt4/NatronEngine/imagelayer_wrapper.h b/Engine/Qt4/NatronEngine/imagelayer_wrapper.h deleted file mode 100644 index a01ac3c37d..0000000000 --- a/Engine/Qt4/NatronEngine/imagelayer_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_IMAGELAYER_H -#define SBK_IMAGELAYER_H - -#include - -#include - -#endif // SBK_IMAGELAYER_H - diff --git a/Engine/Qt4/NatronEngine/int2dparam_wrapper.cpp b/Engine/Qt4/NatronEngine/int2dparam_wrapper.cpp deleted file mode 100644 index 6d853f6f5c..0000000000 --- a/Engine/Qt4/NatronEngine/int2dparam_wrapper.cpp +++ /dev/null @@ -1,335 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "int2dparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void Int2DParamWrapper::pysideInitQtMetaTypes() -{ -} - -Int2DParamWrapper::~Int2DParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_Int2DParamFunc_get(PyObject* self, PyObject* args) -{ - Int2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Int2DParamWrapper*)((::Int2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Int2DParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - Int2DTuple* cppResult = new Int2DTuple(const_cast(cppSelf)->get()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], cppResult, true, true); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - Int2DTuple* cppResult = new Int2DTuple(const_cast(cppSelf)->get(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], cppResult, true, true); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_Int2DParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Int2DParam.get", overloads); - return 0; -} - -static PyObject* Sbk_Int2DParamFunc_set(PyObject* self, PyObject* args) -{ - Int2DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Int2DParamWrapper*)((::Int2DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 2, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: set(int,int) - // 1: set(int,int,double) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // set(int,int) - } else if (numArgs == 3 - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 1; // set(int,int,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Int2DParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(int x, int y) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(int,int) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1); - - // End of code injection - - - } - break; - } - case 1: // set(int x, int y, double frame) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // set(int,int,double) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1,cppArg2); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Int2DParamFunc_set_TypeError: - const char* overloads[] = {"int, int", "int, int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Int2DParam.set", overloads); - return 0; -} - -static PyMethodDef Sbk_Int2DParam_methods[] = { - {"get", (PyCFunction)Sbk_Int2DParamFunc_get, METH_VARARGS}, - {"set", (PyCFunction)Sbk_Int2DParamFunc_set, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Int2DParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Int2DParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Int2DParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Int2DParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Int2DParam_traverse, - /*tp_clear*/ Sbk_Int2DParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Int2DParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Int2DParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::Int2DParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Int2DParam_PythonToCpp_Int2DParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Int2DParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Int2DParam_PythonToCpp_Int2DParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Int2DParam_Type)) - return Int2DParam_PythonToCpp_Int2DParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Int2DParam_PTR_CppToPython_Int2DParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Int2DParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Int2DParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Int2DParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_INT2DPARAM_IDX] = reinterpret_cast(&Sbk_Int2DParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Int2DParam", "Int2DParam*", - &Sbk_Int2DParam_Type, &Shiboken::callCppDestructor< ::Int2DParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_INTPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Int2DParam_Type, - Int2DParam_PythonToCpp_Int2DParam_PTR, - is_Int2DParam_PythonToCpp_Int2DParam_PTR_Convertible, - Int2DParam_PTR_CppToPython_Int2DParam); - - Shiboken::Conversions::registerConverterName(converter, "Int2DParam"); - Shiboken::Conversions::registerConverterName(converter, "Int2DParam*"); - Shiboken::Conversions::registerConverterName(converter, "Int2DParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int2DParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int2DParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Int2DParam_Type, &Sbk_Int2DParam_typeDiscovery); - - - Int2DParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/int2dparam_wrapper.h b/Engine/Qt4/NatronEngine/int2dparam_wrapper.h deleted file mode 100644 index 9c50e28b29..0000000000 --- a/Engine/Qt4/NatronEngine/int2dparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_INT2DPARAMWRAPPER_H -#define SBK_INT2DPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class Int2DParamWrapper : public Int2DParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { Int2DParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~Int2DParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_INT2DPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/int2dtuple_wrapper.cpp b/Engine/Qt4/NatronEngine/int2dtuple_wrapper.cpp deleted file mode 100644 index 6315ed48e4..0000000000 --- a/Engine/Qt4/NatronEngine/int2dtuple_wrapper.cpp +++ /dev/null @@ -1,289 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "int2dtuple_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_Int2DTuple_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Int2DTuple >())) - return -1; - - ::Int2DTuple* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // Int2DTuple() - cptr = new ::Int2DTuple(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Int2DTuple >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_Int2DTuple_methods[] = { - - {0} // Sentinel -}; - -PyObject* Sbk_Int2DTupleFunc___getitem__(PyObject* self, Py_ssize_t _i) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::Int2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], (SbkObject*)self)); - // Begin code injection - - if (_i < 0 || _i >= 2) { - PyErr_BadArgument(); - return 0; - } else { - int ret; - switch (_i) { - case 0: - ret = cppSelf->x; - break; - case 1: - ret = cppSelf->y; - break; - } - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - } - - // End of code injection -} - -static PyObject* Sbk_Int2DTuple_get_x(PyObject* self, void*) -{ - ::Int2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->x; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_Int2DTuple_set_x(PyObject* self, PyObject* pyIn, void*) -{ - ::Int2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->x; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->x = cppOut_local; - - return 0; -} - -static PyObject* Sbk_Int2DTuple_get_y(PyObject* self, void*) -{ - ::Int2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->y; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_Int2DTuple_set_y(PyObject* self, PyObject* pyIn, void*) -{ - ::Int2DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int2DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->y; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->y = cppOut_local; - - return 0; -} - -// Getters and Setters for Int2DTuple -static PyGetSetDef Sbk_Int2DTuple_getsetlist[] = { - {const_cast("x"), Sbk_Int2DTuple_get_x, Sbk_Int2DTuple_set_x}, - {const_cast("y"), Sbk_Int2DTuple_get_y, Sbk_Int2DTuple_set_y}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Int2DTuple_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Int2DTuple_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static PySequenceMethods Sbk_Int2DTuple_TypeAsSequence; - -static SbkObjectType Sbk_Int2DTuple_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Int2DTuple", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Int2DTuple_traverse, - /*tp_clear*/ Sbk_Int2DTuple_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Int2DTuple_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_Int2DTuple_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_Int2DTuple_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Int2DTuple_PythonToCpp_Int2DTuple_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Int2DTuple_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Int2DTuple_PythonToCpp_Int2DTuple_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Int2DTuple_Type)) - return Int2DTuple_PythonToCpp_Int2DTuple_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Int2DTuple_PTR_CppToPython_Int2DTuple(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Int2DTuple*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Int2DTuple_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Int2DTuple(PyObject* module) -{ - // type supports sequence protocol - memset(&Sbk_Int2DTuple_TypeAsSequence, 0, sizeof(PySequenceMethods)); - Sbk_Int2DTuple_TypeAsSequence.sq_item = &Sbk_Int2DTupleFunc___getitem__; - Sbk_Int2DTuple_Type.super.ht_type.tp_as_sequence = &Sbk_Int2DTuple_TypeAsSequence; - - SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX] = reinterpret_cast(&Sbk_Int2DTuple_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Int2DTuple", "Int2DTuple*", - &Sbk_Int2DTuple_Type, &Shiboken::callCppDestructor< ::Int2DTuple >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Int2DTuple_Type, - Int2DTuple_PythonToCpp_Int2DTuple_PTR, - is_Int2DTuple_PythonToCpp_Int2DTuple_PTR_Convertible, - Int2DTuple_PTR_CppToPython_Int2DTuple); - - Shiboken::Conversions::registerConverterName(converter, "Int2DTuple"); - Shiboken::Conversions::registerConverterName(converter, "Int2DTuple*"); - Shiboken::Conversions::registerConverterName(converter, "Int2DTuple&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int2DTuple).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/int2dtuple_wrapper.h b/Engine/Qt4/NatronEngine/int2dtuple_wrapper.h deleted file mode 100644 index dec0970384..0000000000 --- a/Engine/Qt4/NatronEngine/int2dtuple_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_INT2DTUPLE_H -#define SBK_INT2DTUPLE_H - -#include - -#include - -#endif // SBK_INT2DTUPLE_H - diff --git a/Engine/Qt4/NatronEngine/int3dparam_wrapper.cpp b/Engine/Qt4/NatronEngine/int3dparam_wrapper.cpp deleted file mode 100644 index 93259375ff..0000000000 --- a/Engine/Qt4/NatronEngine/int3dparam_wrapper.cpp +++ /dev/null @@ -1,340 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "int3dparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void Int3DParamWrapper::pysideInitQtMetaTypes() -{ -} - -Int3DParamWrapper::~Int3DParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_Int3DParamFunc_get(PyObject* self, PyObject* args) -{ - Int3DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Int3DParamWrapper*)((::Int3DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Int3DParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - Int3DTuple* cppResult = new Int3DTuple(const_cast(cppSelf)->get()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], cppResult, true, true); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - Int3DTuple* cppResult = new Int3DTuple(const_cast(cppSelf)->get(cppArg0)); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], cppResult, true, true); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_Int3DParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Int3DParam.get", overloads); - return 0; -} - -static PyObject* Sbk_Int3DParamFunc_set(PyObject* self, PyObject* args) -{ - Int3DParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (Int3DParamWrapper*)((::Int3DParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 3, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: set(int,int,int) - // 1: set(int,int,int,double) - if (numArgs >= 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // set(int,int,int) - } else if (numArgs == 4 - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // set(int,int,int,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_Int3DParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(int x, int y, int z) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // set(int,int,int) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1,cppArg2); - - // End of code injection - - - } - break; - } - case 1: // set(int x, int y, int z, double frame) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // set(int,int,int,double) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1,cppArg2,cppArg3); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_Int3DParamFunc_set_TypeError: - const char* overloads[] = {"int, int, int", "int, int, int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Int3DParam.set", overloads); - return 0; -} - -static PyMethodDef Sbk_Int3DParam_methods[] = { - {"get", (PyCFunction)Sbk_Int3DParamFunc_get, METH_VARARGS}, - {"set", (PyCFunction)Sbk_Int3DParamFunc_set, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Int3DParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Int3DParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Int3DParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Int3DParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Int3DParam_traverse, - /*tp_clear*/ Sbk_Int3DParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Int3DParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Int3DParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::Int3DParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Int3DParam_PythonToCpp_Int3DParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Int3DParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Int3DParam_PythonToCpp_Int3DParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Int3DParam_Type)) - return Int3DParam_PythonToCpp_Int3DParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Int3DParam_PTR_CppToPython_Int3DParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Int3DParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Int3DParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Int3DParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_INT3DPARAM_IDX] = reinterpret_cast(&Sbk_Int3DParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Int3DParam", "Int3DParam*", - &Sbk_Int3DParam_Type, &Shiboken::callCppDestructor< ::Int3DParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_INT2DPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Int3DParam_Type, - Int3DParam_PythonToCpp_Int3DParam_PTR, - is_Int3DParam_PythonToCpp_Int3DParam_PTR_Convertible, - Int3DParam_PTR_CppToPython_Int3DParam); - - Shiboken::Conversions::registerConverterName(converter, "Int3DParam"); - Shiboken::Conversions::registerConverterName(converter, "Int3DParam*"); - Shiboken::Conversions::registerConverterName(converter, "Int3DParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int3DParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int3DParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Int3DParam_Type, &Sbk_Int3DParam_typeDiscovery); - - - Int3DParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/int3dparam_wrapper.h b/Engine/Qt4/NatronEngine/int3dparam_wrapper.h deleted file mode 100644 index f8c8f2ece9..0000000000 --- a/Engine/Qt4/NatronEngine/int3dparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_INT3DPARAMWRAPPER_H -#define SBK_INT3DPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class Int3DParamWrapper : public Int3DParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { Int3DParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~Int3DParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_INT3DPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/int3dtuple_wrapper.cpp b/Engine/Qt4/NatronEngine/int3dtuple_wrapper.cpp deleted file mode 100644 index e634c9afb2..0000000000 --- a/Engine/Qt4/NatronEngine/int3dtuple_wrapper.cpp +++ /dev/null @@ -1,328 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "int3dtuple_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_Int3DTuple_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::Int3DTuple >())) - return -1; - - ::Int3DTuple* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // Int3DTuple() - cptr = new ::Int3DTuple(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::Int3DTuple >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_Int3DTuple_methods[] = { - - {0} // Sentinel -}; - -PyObject* Sbk_Int3DTupleFunc___getitem__(PyObject* self, Py_ssize_t _i) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - // Begin code injection - - if (_i < 0 || _i >= 3) { - PyErr_BadArgument(); - return 0; - } else { - int ret; - switch (_i) { - case 0: - ret = cppSelf->x; - break; - case 1: - ret = cppSelf->y; - break; - case 2: - ret = cppSelf->z; - break; - } - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &ret); - } - - // End of code injection -} - -static PyObject* Sbk_Int3DTuple_get_x(PyObject* self, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->x; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_Int3DTuple_set_x(PyObject* self, PyObject* pyIn, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->x; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->x = cppOut_local; - - return 0; -} - -static PyObject* Sbk_Int3DTuple_get_y(PyObject* self, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->y; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_Int3DTuple_set_y(PyObject* self, PyObject* pyIn, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->y; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->y = cppOut_local; - - return 0; -} - -static PyObject* Sbk_Int3DTuple_get_z(PyObject* self, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->z; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_Int3DTuple_set_z(PyObject* self, PyObject* pyIn, void*) -{ - ::Int3DTuple* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Int3DTuple*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'z' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'z', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->z; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->z = cppOut_local; - - return 0; -} - -// Getters and Setters for Int3DTuple -static PyGetSetDef Sbk_Int3DTuple_getsetlist[] = { - {const_cast("x"), Sbk_Int3DTuple_get_x, Sbk_Int3DTuple_set_x}, - {const_cast("y"), Sbk_Int3DTuple_get_y, Sbk_Int3DTuple_set_y}, - {const_cast("z"), Sbk_Int3DTuple_get_z, Sbk_Int3DTuple_set_z}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Int3DTuple_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Int3DTuple_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static PySequenceMethods Sbk_Int3DTuple_TypeAsSequence; - -static SbkObjectType Sbk_Int3DTuple_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Int3DTuple", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Int3DTuple_traverse, - /*tp_clear*/ Sbk_Int3DTuple_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Int3DTuple_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_Int3DTuple_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_Int3DTuple_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Int3DTuple_PythonToCpp_Int3DTuple_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Int3DTuple_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Int3DTuple_PythonToCpp_Int3DTuple_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Int3DTuple_Type)) - return Int3DTuple_PythonToCpp_Int3DTuple_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Int3DTuple_PTR_CppToPython_Int3DTuple(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Int3DTuple*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Int3DTuple_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Int3DTuple(PyObject* module) -{ - // type supports sequence protocol - memset(&Sbk_Int3DTuple_TypeAsSequence, 0, sizeof(PySequenceMethods)); - Sbk_Int3DTuple_TypeAsSequence.sq_item = &Sbk_Int3DTupleFunc___getitem__; - Sbk_Int3DTuple_Type.super.ht_type.tp_as_sequence = &Sbk_Int3DTuple_TypeAsSequence; - - SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX] = reinterpret_cast(&Sbk_Int3DTuple_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Int3DTuple", "Int3DTuple*", - &Sbk_Int3DTuple_Type, &Shiboken::callCppDestructor< ::Int3DTuple >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Int3DTuple_Type, - Int3DTuple_PythonToCpp_Int3DTuple_PTR, - is_Int3DTuple_PythonToCpp_Int3DTuple_PTR_Convertible, - Int3DTuple_PTR_CppToPython_Int3DTuple); - - Shiboken::Conversions::registerConverterName(converter, "Int3DTuple"); - Shiboken::Conversions::registerConverterName(converter, "Int3DTuple*"); - Shiboken::Conversions::registerConverterName(converter, "Int3DTuple&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Int3DTuple).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/int3dtuple_wrapper.h b/Engine/Qt4/NatronEngine/int3dtuple_wrapper.h deleted file mode 100644 index 028749e32c..0000000000 --- a/Engine/Qt4/NatronEngine/int3dtuple_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_INT3DTUPLE_H -#define SBK_INT3DTUPLE_H - -#include - -#include - -#endif // SBK_INT3DTUPLE_H - diff --git a/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.cpp b/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.cpp deleted file mode 100644 index 7331fa7881..0000000000 --- a/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.cpp +++ /dev/null @@ -1,376 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "intnodecreationproperty_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void IntNodeCreationPropertyWrapper::pysideInitQtMetaTypes() -{ -} - -IntNodeCreationPropertyWrapper::IntNodeCreationPropertyWrapper(const std::vector & values) : IntNodeCreationProperty(values) { - // ... middle -} - -IntNodeCreationPropertyWrapper::IntNodeCreationPropertyWrapper(int value) : IntNodeCreationProperty(value) { - // ... middle -} - -IntNodeCreationPropertyWrapper::~IntNodeCreationPropertyWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_IntNodeCreationProperty_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::IntNodeCreationProperty >())) - return -1; - - ::IntNodeCreationPropertyWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntNodeCreationProperty(): too many arguments"); - return -1; - } - - if (!PyArg_ParseTuple(args, "|O:IntNodeCreationProperty", &(pyArgs[0]))) - return -1; - - - // Overloaded function decisor - // 0: IntNodeCreationProperty(std::vector) - // 1: IntNodeCreationProperty(int) - if (numArgs == 0) { - overloadId = 0; // IntNodeCreationProperty(std::vector) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // IntNodeCreationProperty(int) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], (pyArgs[0])))) { - overloadId = 0; // IntNodeCreationProperty(std::vector) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntNodeCreationProperty_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // IntNodeCreationProperty(const std::vector & values) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "values"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntNodeCreationProperty(): got multiple values for keyword argument 'values'."); - return -1; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], (pyArgs[0])))) - goto Sbk_IntNodeCreationProperty_Init_TypeError; - } - } - ::std::vector cppArg0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // IntNodeCreationProperty(std::vector) - cptr = new ::IntNodeCreationPropertyWrapper(cppArg0); - } - break; - } - case 1: // IntNodeCreationProperty(int value) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // IntNodeCreationProperty(int) - cptr = new ::IntNodeCreationPropertyWrapper(cppArg0); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::IntNodeCreationProperty >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_IntNodeCreationProperty_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_IntNodeCreationProperty_Init_TypeError: - const char* overloads[] = {"list = std.vector< int >()", "int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntNodeCreationProperty", overloads); - return -1; -} - -static PyObject* Sbk_IntNodeCreationPropertyFunc_getValues(PyObject* self) -{ - ::IntNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::IntNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValues()const - const std::vector & cppResult = const_cast(cppSelf)->getValues(); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_IntNodeCreationPropertyFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::IntNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::IntNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntNodeCreationProperty.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntNodeCreationProperty.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntNodeCreationPropertyFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "index"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntNodeCreationProperty.setValue(): got multiple values for keyword argument 'index'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntNodeCreationPropertyFunc_setValue_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(int,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntNodeCreationPropertyFunc_setValue_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntNodeCreationProperty.setValue", overloads); - return 0; -} - -static PyMethodDef Sbk_IntNodeCreationProperty_methods[] = { - {"getValues", (PyCFunction)Sbk_IntNodeCreationPropertyFunc_getValues, METH_NOARGS}, - {"setValue", (PyCFunction)Sbk_IntNodeCreationPropertyFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_IntNodeCreationProperty_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_IntNodeCreationProperty_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_IntNodeCreationProperty_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.IntNodeCreationProperty", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_IntNodeCreationProperty_traverse, - /*tp_clear*/ Sbk_IntNodeCreationProperty_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_IntNodeCreationProperty_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_IntNodeCreationProperty_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_IntNodeCreationProperty_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::NodeCreationProperty >())) - return dynamic_cast< ::IntNodeCreationProperty*>(reinterpret_cast< ::NodeCreationProperty*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void IntNodeCreationProperty_PythonToCpp_IntNodeCreationProperty_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_IntNodeCreationProperty_Type, pyIn, cppOut); -} -static PythonToCppFunc is_IntNodeCreationProperty_PythonToCpp_IntNodeCreationProperty_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_IntNodeCreationProperty_Type)) - return IntNodeCreationProperty_PythonToCpp_IntNodeCreationProperty_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* IntNodeCreationProperty_PTR_CppToPython_IntNodeCreationProperty(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::IntNodeCreationProperty*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_IntNodeCreationProperty_Type, const_cast(cppIn), false, false, typeName); -} - -void init_IntNodeCreationProperty(PyObject* module) -{ - SbkNatronEngineTypes[SBK_INTNODECREATIONPROPERTY_IDX] = reinterpret_cast(&Sbk_IntNodeCreationProperty_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "IntNodeCreationProperty", "IntNodeCreationProperty*", - &Sbk_IntNodeCreationProperty_Type, &Shiboken::callCppDestructor< ::IntNodeCreationProperty >, (SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_IntNodeCreationProperty_Type, - IntNodeCreationProperty_PythonToCpp_IntNodeCreationProperty_PTR, - is_IntNodeCreationProperty_PythonToCpp_IntNodeCreationProperty_PTR_Convertible, - IntNodeCreationProperty_PTR_CppToPython_IntNodeCreationProperty); - - Shiboken::Conversions::registerConverterName(converter, "IntNodeCreationProperty"); - Shiboken::Conversions::registerConverterName(converter, "IntNodeCreationProperty*"); - Shiboken::Conversions::registerConverterName(converter, "IntNodeCreationProperty&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::IntNodeCreationProperty).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::IntNodeCreationPropertyWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_IntNodeCreationProperty_Type, &Sbk_IntNodeCreationProperty_typeDiscovery); - - - IntNodeCreationPropertyWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.h b/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.h deleted file mode 100644 index b697d0989a..0000000000 --- a/Engine/Qt4/NatronEngine/intnodecreationproperty_wrapper.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SBK_INTNODECREATIONPROPERTYWRAPPER_H -#define SBK_INTNODECREATIONPROPERTYWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class IntNodeCreationPropertyWrapper : public IntNodeCreationProperty -{ -public: - IntNodeCreationPropertyWrapper(const std::vector & values = std::vector< int >()); - IntNodeCreationPropertyWrapper(int value); - virtual ~IntNodeCreationPropertyWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_INTNODECREATIONPROPERTYWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/intparam_wrapper.cpp b/Engine/Qt4/NatronEngine/intparam_wrapper.cpp deleted file mode 100644 index 2134e3dd25..0000000000 --- a/Engine/Qt4/NatronEngine/intparam_wrapper.cpp +++ /dev/null @@ -1,1475 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "intparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void IntParamWrapper::pysideInitQtMetaTypes() -{ -} - -IntParamWrapper::~IntParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_IntParamFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - int cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_get(PyObject* self, PyObject* args) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - int cppResult = const_cast(cppSelf)->get(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - int cppResult = const_cast(cppSelf)->get(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.get", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getDefaultValue(int)const - if (numArgs == 0) { - overloadId = 0; // getDefaultValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getDefaultValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_IntParamFunc_getDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getDefaultValue(int)const - int cppResult = const_cast(cppSelf)->getDefaultValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.getDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getDisplayMaximum(PyObject* self, PyObject* pyArg) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMaximum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getDisplayMaximum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMaximum(int)const - int cppResult = const_cast(cppSelf)->getDisplayMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getDisplayMaximum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.IntParam.getDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getDisplayMinimum(PyObject* self, PyObject* pyArg) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getDisplayMinimum(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getDisplayMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getDisplayMinimum_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getDisplayMinimum(int)const - int cppResult = const_cast(cppSelf)->getDisplayMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getDisplayMinimum_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.IntParam.getDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getMaximum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMaximum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMaximum(int)const - if (numArgs == 0) { - overloadId = 0; // getMaximum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMaximum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_IntParamFunc_getMaximum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMaximum(int)const - int cppResult = const_cast(cppSelf)->getMaximum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getMaximum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.getMaximum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getMinimum(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getMinimum", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getMinimum(int)const - if (numArgs == 0) { - overloadId = 0; // getMinimum(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getMinimum(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_IntParamFunc_getMinimum_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getMinimum(int)const - int cppResult = const_cast(cppSelf)->getMinimum(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getMinimum_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.getMinimum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getValue(int)const - if (numArgs == 0) { - overloadId = 0; // getValue(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getValue(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_IntParamFunc_getValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getValue(int)const - int cppResult = const_cast(cppSelf)->getValue(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.getValue", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_getValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getValueAtTime", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getValueAtTime(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getValueAtTime(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getValueAtTime(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_getValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.getValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_getValueAtTime_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getValueAtTime(double,int)const - int cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_IntParamFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_restoreDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.restoreDefaultValue(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:restoreDefaultValue", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: restoreDefaultValue(int) - if (numArgs == 0) { - overloadId = 0; // restoreDefaultValue(int) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // restoreDefaultValue(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_restoreDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.restoreDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_IntParamFunc_restoreDefaultValue_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // restoreDefaultValue(int) - // Begin code injection - - cppSelf->restoreDefaultValue(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_restoreDefaultValue_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.restoreDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_set(PyObject* self, PyObject* args) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: set(int) - // 1: set(int,double) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // set(int) - } else if (numArgs == 2 - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // set(int,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(int x) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(int) - // Begin code injection - - cppSelf->set(cppArg0); - - // End of code injection - - - } - break; - } - case 1: // set(int x, double frame) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(int,double) - // Begin code injection - - cppSelf->set(cppArg0,cppArg1); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_set_TypeError: - const char* overloads[] = {"int", "int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.set", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setDefaultValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDefaultValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDefaultValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDefaultValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDefaultValue(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDefaultValue(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDefaultValue(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setDefaultValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDefaultValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setDefaultValue_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDefaultValue(int,int) - cppSelf->setDefaultValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setDefaultValue_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setDisplayMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMaximum(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMaximum(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMaximum(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setDisplayMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setDisplayMaximum_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMaximum(int,int) - cppSelf->setDisplayMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setDisplayMaximum_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setDisplayMaximum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setDisplayMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setDisplayMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setDisplayMinimum(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setDisplayMinimum(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setDisplayMinimum(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setDisplayMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setDisplayMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setDisplayMinimum_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setDisplayMinimum(int,int) - cppSelf->setDisplayMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setDisplayMinimum_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setDisplayMinimum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setMaximum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMaximum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMaximum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMaximum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMaximum(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMaximum(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMaximum(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setMaximum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMaximum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setMaximum_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMaximum(int,int) - cppSelf->setMaximum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setMaximum_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setMaximum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setMinimum(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMinimum(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMinimum(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setMinimum", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setMinimum(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setMinimum(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setMinimum(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setMinimum_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setMinimum(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setMinimum_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setMinimum(int,int) - cppSelf->setMinimum(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setMinimum_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setMinimum", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(int,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(int,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(int,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValue(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_IntParamFunc_setValue_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(int,int) - // Begin code injection - - cppSelf->setValue(cppArg0,cppArg1); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setValue_TypeError: - const char* overloads[] = {"int, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setValue", overloads); - return 0; -} - -static PyObject* Sbk_IntParamFunc_setValueAtTime(PyObject* self, PyObject* args, PyObject* kwds) -{ - IntParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (IntParamWrapper*)((::IntParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_INTPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValueAtTime(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValueAtTime(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOO:setValueAtTime", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(int,double,int) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // setValueAtTime(int,double,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // setValueAtTime(int,double,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_IntParamFunc_setValueAtTime_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[2]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.IntParam.setValueAtTime(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[2] = value; - if (!(pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) - goto Sbk_IntParamFunc_setValueAtTime_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2 = 0; - if (pythonToCpp[2]) pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setValueAtTime(int,double,int) - // Begin code injection - - cppSelf->setValueAtTime(cppArg0,cppArg1,cppArg2); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_IntParamFunc_setValueAtTime_TypeError: - const char* overloads[] = {"int, float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.IntParam.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_IntParam_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_IntParamFunc_addAsDependencyOf, METH_VARARGS}, - {"get", (PyCFunction)Sbk_IntParamFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_IntParamFunc_getDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"getDisplayMaximum", (PyCFunction)Sbk_IntParamFunc_getDisplayMaximum, METH_O}, - {"getDisplayMinimum", (PyCFunction)Sbk_IntParamFunc_getDisplayMinimum, METH_O}, - {"getMaximum", (PyCFunction)Sbk_IntParamFunc_getMaximum, METH_VARARGS|METH_KEYWORDS}, - {"getMinimum", (PyCFunction)Sbk_IntParamFunc_getMinimum, METH_VARARGS|METH_KEYWORDS}, - {"getValue", (PyCFunction)Sbk_IntParamFunc_getValue, METH_VARARGS|METH_KEYWORDS}, - {"getValueAtTime", (PyCFunction)Sbk_IntParamFunc_getValueAtTime, METH_VARARGS|METH_KEYWORDS}, - {"restoreDefaultValue", (PyCFunction)Sbk_IntParamFunc_restoreDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"set", (PyCFunction)Sbk_IntParamFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_IntParamFunc_setDefaultValue, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMaximum", (PyCFunction)Sbk_IntParamFunc_setDisplayMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setDisplayMinimum", (PyCFunction)Sbk_IntParamFunc_setDisplayMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setMaximum", (PyCFunction)Sbk_IntParamFunc_setMaximum, METH_VARARGS|METH_KEYWORDS}, - {"setMinimum", (PyCFunction)Sbk_IntParamFunc_setMinimum, METH_VARARGS|METH_KEYWORDS}, - {"setValue", (PyCFunction)Sbk_IntParamFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - {"setValueAtTime", (PyCFunction)Sbk_IntParamFunc_setValueAtTime, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_IntParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_IntParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_IntParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.IntParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_IntParam_traverse, - /*tp_clear*/ Sbk_IntParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_IntParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_IntParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::IntParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void IntParam_PythonToCpp_IntParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_IntParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_IntParam_PythonToCpp_IntParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_IntParam_Type)) - return IntParam_PythonToCpp_IntParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* IntParam_PTR_CppToPython_IntParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::IntParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_IntParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_IntParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_INTPARAM_IDX] = reinterpret_cast(&Sbk_IntParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "IntParam", "IntParam*", - &Sbk_IntParam_Type, &Shiboken::callCppDestructor< ::IntParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_IntParam_Type, - IntParam_PythonToCpp_IntParam_PTR, - is_IntParam_PythonToCpp_IntParam_PTR_Convertible, - IntParam_PTR_CppToPython_IntParam); - - Shiboken::Conversions::registerConverterName(converter, "IntParam"); - Shiboken::Conversions::registerConverterName(converter, "IntParam*"); - Shiboken::Conversions::registerConverterName(converter, "IntParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::IntParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::IntParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_IntParam_Type, &Sbk_IntParam_typeDiscovery); - - - IntParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/intparam_wrapper.h b/Engine/Qt4/NatronEngine/intparam_wrapper.h deleted file mode 100644 index 76d366e966..0000000000 --- a/Engine/Qt4/NatronEngine/intparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_INTPARAMWRAPPER_H -#define SBK_INTPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class IntParamWrapper : public IntParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { IntParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~IntParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_INTPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/itembase_wrapper.cpp b/Engine/Qt4/NatronEngine/itembase_wrapper.cpp deleted file mode 100644 index f2e4c7cabf..0000000000 --- a/Engine/Qt4/NatronEngine/itembase_wrapper.cpp +++ /dev/null @@ -1,559 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "itembase_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - -// Native --------------------------------------------------------- - -void ItemBaseWrapper::pysideInitQtMetaTypes() -{ -} - -ItemBaseWrapper::~ItemBaseWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ItemBaseFunc_getLabel(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLabel()const - QString cppResult = const_cast(cppSelf)->getLabel(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_getLocked(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLocked()const - bool cppResult = const_cast(cppSelf)->getLocked(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_getLockedRecursive(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLockedRecursive()const - bool cppResult = const_cast(cppSelf)->getLockedRecursive(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_getParam(PyObject* self, PyObject* pyArg) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ItemBaseFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ItemBaseFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ItemBase.getParam", overloads); - return 0; -} - -static PyObject* Sbk_ItemBaseFunc_getParentLayer(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParentLayer()const - Layer * cppResult = const_cast(cppSelf)->getParentLayer(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_LAYER_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_getScriptName(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getScriptName()const - QString cppResult = const_cast(cppSelf)->getScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_getVisible(PyObject* self) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getVisible()const - bool cppResult = const_cast(cppSelf)->getVisible(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ItemBaseFunc_setLabel(PyObject* self, PyObject* pyArg) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setLabel(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setLabel(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ItemBaseFunc_setLabel_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setLabel(QString) - // Begin code injection - - cppSelf->setLabel(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ItemBaseFunc_setLabel_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ItemBase.setLabel", overloads); - return 0; -} - -static PyObject* Sbk_ItemBaseFunc_setLocked(PyObject* self, PyObject* pyArg) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setLocked(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setLocked(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ItemBaseFunc_setLocked_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setLocked(bool) - cppSelf->setLocked(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ItemBaseFunc_setLocked_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ItemBase.setLocked", overloads); - return 0; -} - -static PyObject* Sbk_ItemBaseFunc_setScriptName(PyObject* self, PyObject* pyArg) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setScriptName(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setScriptName(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ItemBaseFunc_setScriptName_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setScriptName(QString) - // Begin code injection - - bool cppResult = cppSelf->setScriptName(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ItemBaseFunc_setScriptName_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ItemBase.setScriptName", overloads); - return 0; -} - -static PyObject* Sbk_ItemBaseFunc_setVisible(PyObject* self, PyObject* pyArg) -{ - ::ItemBase* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::ItemBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setVisible(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setVisible(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ItemBaseFunc_setVisible_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setVisible(bool) - cppSelf->setVisible(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ItemBaseFunc_setVisible_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ItemBase.setVisible", overloads); - return 0; -} - -static PyMethodDef Sbk_ItemBase_methods[] = { - {"getLabel", (PyCFunction)Sbk_ItemBaseFunc_getLabel, METH_NOARGS}, - {"getLocked", (PyCFunction)Sbk_ItemBaseFunc_getLocked, METH_NOARGS}, - {"getLockedRecursive", (PyCFunction)Sbk_ItemBaseFunc_getLockedRecursive, METH_NOARGS}, - {"getParam", (PyCFunction)Sbk_ItemBaseFunc_getParam, METH_O}, - {"getParentLayer", (PyCFunction)Sbk_ItemBaseFunc_getParentLayer, METH_NOARGS}, - {"getScriptName", (PyCFunction)Sbk_ItemBaseFunc_getScriptName, METH_NOARGS}, - {"getVisible", (PyCFunction)Sbk_ItemBaseFunc_getVisible, METH_NOARGS}, - {"setLabel", (PyCFunction)Sbk_ItemBaseFunc_setLabel, METH_O}, - {"setLocked", (PyCFunction)Sbk_ItemBaseFunc_setLocked, METH_O}, - {"setScriptName", (PyCFunction)Sbk_ItemBaseFunc_setScriptName, METH_O}, - {"setVisible", (PyCFunction)Sbk_ItemBaseFunc_setVisible, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ItemBase_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ItemBase_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ItemBase_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ItemBase", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ItemBase_traverse, - /*tp_clear*/ Sbk_ItemBase_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ItemBase_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ItemBase_PythonToCpp_ItemBase_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ItemBase_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ItemBase_PythonToCpp_ItemBase_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ItemBase_Type)) - return ItemBase_PythonToCpp_ItemBase_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ItemBase_PTR_CppToPython_ItemBase(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ItemBase*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ItemBase_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ItemBase(PyObject* module) -{ - SbkNatronEngineTypes[SBK_ITEMBASE_IDX] = reinterpret_cast(&Sbk_ItemBase_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ItemBase", "ItemBase*", - &Sbk_ItemBase_Type, &Shiboken::callCppDestructor< ::ItemBase >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ItemBase_Type, - ItemBase_PythonToCpp_ItemBase_PTR, - is_ItemBase_PythonToCpp_ItemBase_PTR_Convertible, - ItemBase_PTR_CppToPython_ItemBase); - - Shiboken::Conversions::registerConverterName(converter, "ItemBase"); - Shiboken::Conversions::registerConverterName(converter, "ItemBase*"); - Shiboken::Conversions::registerConverterName(converter, "ItemBase&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ItemBase).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ItemBaseWrapper).name()); - - - - ItemBaseWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/itembase_wrapper.h b/Engine/Qt4/NatronEngine/itembase_wrapper.h deleted file mode 100644 index ab292cf730..0000000000 --- a/Engine/Qt4/NatronEngine/itembase_wrapper.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SBK_ITEMBASEWRAPPER_H -#define SBK_ITEMBASEWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ItemBaseWrapper : public ItemBase -{ -public: - virtual ~ItemBaseWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_ITEMBASEWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/layer_wrapper.cpp b/Engine/Qt4/NatronEngine/layer_wrapper.cpp deleted file mode 100644 index 76636b4d22..0000000000 --- a/Engine/Qt4/NatronEngine/layer_wrapper.cpp +++ /dev/null @@ -1,378 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "layer_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include - - -// Native --------------------------------------------------------- - -void LayerWrapper::pysideInitQtMetaTypes() -{ -} - -LayerWrapper::~LayerWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_LayerFunc_addItem(PyObject* self, PyObject* pyArg) -{ - ::Layer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Layer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_LAYER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addItem(ItemBase*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (pyArg)))) { - overloadId = 0; // addItem(ItemBase*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_LayerFunc_addItem_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ItemBase* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addItem(ItemBase*) - // Begin code injection - - cppSelf->addItem(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_LayerFunc_addItem_TypeError: - const char* overloads[] = {"NatronEngine.ItemBase", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Layer.addItem", overloads); - return 0; -} - -static PyObject* Sbk_LayerFunc_getChildren(PyObject* self) -{ - ::Layer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Layer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_LAYER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getChildren()const - // Begin code injection - - std::list items = cppSelf->getChildren(); - PyObject* ret = PyList_New((int) items.size()); - int idx = 0; - for (std::list::iterator it = items.begin(); it!=items.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_LayerFunc_insertItem(PyObject* self, PyObject* args) -{ - ::Layer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Layer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_LAYER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "insertItem", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: insertItem(int,ItemBase*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (pyArgs[1])))) { - overloadId = 0; // insertItem(int,ItemBase*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_LayerFunc_insertItem_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::ItemBase* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // insertItem(int,ItemBase*) - // Begin code injection - - cppSelf->insertItem(cppArg0,cppArg1); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_LayerFunc_insertItem_TypeError: - const char* overloads[] = {"int, NatronEngine.ItemBase", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Layer.insertItem", overloads); - return 0; -} - -static PyObject* Sbk_LayerFunc_removeItem(PyObject* self, PyObject* pyArg) -{ - ::Layer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Layer*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_LAYER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: removeItem(ItemBase*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], (pyArg)))) { - overloadId = 0; // removeItem(ItemBase*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_LayerFunc_removeItem_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::ItemBase* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // removeItem(ItemBase*) - // Begin code injection - - cppSelf->removeItem(cppArg0); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_LayerFunc_removeItem_TypeError: - const char* overloads[] = {"NatronEngine.ItemBase", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Layer.removeItem", overloads); - return 0; -} - -static PyMethodDef Sbk_Layer_methods[] = { - {"addItem", (PyCFunction)Sbk_LayerFunc_addItem, METH_O}, - {"getChildren", (PyCFunction)Sbk_LayerFunc_getChildren, METH_NOARGS}, - {"insertItem", (PyCFunction)Sbk_LayerFunc_insertItem, METH_VARARGS}, - {"removeItem", (PyCFunction)Sbk_LayerFunc_removeItem, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Layer_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Layer_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Layer_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Layer", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Layer_traverse, - /*tp_clear*/ Sbk_Layer_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Layer_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_Layer_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::ItemBase >())) - return dynamic_cast< ::Layer*>(reinterpret_cast< ::ItemBase*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Layer_PythonToCpp_Layer_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Layer_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Layer_PythonToCpp_Layer_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Layer_Type)) - return Layer_PythonToCpp_Layer_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Layer_PTR_CppToPython_Layer(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Layer*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Layer_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Layer(PyObject* module) -{ - SbkNatronEngineTypes[SBK_LAYER_IDX] = reinterpret_cast(&Sbk_Layer_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Layer", "Layer*", - &Sbk_Layer_Type, &Shiboken::callCppDestructor< ::Layer >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Layer_Type, - Layer_PythonToCpp_Layer_PTR, - is_Layer_PythonToCpp_Layer_PTR_Convertible, - Layer_PTR_CppToPython_Layer); - - Shiboken::Conversions::registerConverterName(converter, "Layer"); - Shiboken::Conversions::registerConverterName(converter, "Layer*"); - Shiboken::Conversions::registerConverterName(converter, "Layer&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Layer).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::LayerWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_Layer_Type, &Sbk_Layer_typeDiscovery); - - - LayerWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/layer_wrapper.h b/Engine/Qt4/NatronEngine/layer_wrapper.h deleted file mode 100644 index 3680c891fc..0000000000 --- a/Engine/Qt4/NatronEngine/layer_wrapper.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SBK_LAYERWRAPPER_H -#define SBK_LAYERWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class LayerWrapper : public Layer -{ -public: - virtual ~LayerWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_LAYERWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/natron_enum_wrapper.cpp b/Engine/Qt4/NatronEngine/natron_enum_wrapper.cpp deleted file mode 100644 index 42523b62ea..0000000000 --- a/Engine/Qt4/NatronEngine/natron_enum_wrapper.cpp +++ /dev/null @@ -1,1851 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "natron_enum_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyMethodDef Sbk_NATRON_NAMESPACE_methods[] = { - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_NATRON_NAMESPACE_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_NATRON_NAMESPACE_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_NATRON_NAMESPACE_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Natron", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ 0, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_NATRON_NAMESPACE_traverse, - /*tp_clear*/ Sbk_NATRON_NAMESPACE_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_NATRON_NAMESPACE_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -PyObject* SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___and__(PyObject* self, PyObject* pyArg) -{ - ::NATRON_NAMESPACE::StandardButtons cppResult, cppSelf, cppArg; -#ifdef IS_PY3K - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(pyArg); -#else - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(pyArg); -#endif - - cppResult = cppSelf & cppArg; - return Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), &cppResult); -} - -PyObject* SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___or__(PyObject* self, PyObject* pyArg) -{ - ::NATRON_NAMESPACE::StandardButtons cppResult, cppSelf, cppArg; -#ifdef IS_PY3K - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(pyArg); -#else - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(pyArg); -#endif - - cppResult = cppSelf | cppArg; - return Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), &cppResult); -} - -PyObject* SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___xor__(PyObject* self, PyObject* pyArg) -{ - ::NATRON_NAMESPACE::StandardButtons cppResult, cppSelf, cppArg; -#ifdef IS_PY3K - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyLong_AsLong(pyArg); -#else - cppSelf = (::NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(self); - cppArg = (NATRON_NAMESPACE::StandardButtons)PyInt_AsLong(pyArg); -#endif - - cppResult = cppSelf ^ cppArg; - return Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), &cppResult); -} - -PyObject* SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___invert__(PyObject* self, PyObject* pyArg) -{ - ::NATRON_NAMESPACE::StandardButtons cppSelf; - Shiboken::Conversions::pythonToCppCopy(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), self, &cppSelf); - ::NATRON_NAMESPACE::StandardButtons cppResult = ~cppSelf; - return Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), &cppResult); -} - -static PyObject* SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum_long(PyObject* self) -{ - int val; - Shiboken::Conversions::pythonToCppCopy(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), self, &val); - return Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &val); -} -static int SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum__nonzero(PyObject* self) -{ - int val; - Shiboken::Conversions::pythonToCppCopy(SBK_CONVERTER(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]), self, &val); - return val != 0; -} - -static PyNumberMethods SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum_as_number = { - /*nb_add*/ 0, - /*nb_subtract*/ 0, - /*nb_multiply*/ 0, - #ifndef IS_PY3K - /* nb_divide */ 0, - #endif - /*nb_remainder*/ 0, - /*nb_divmod*/ 0, - /*nb_power*/ 0, - /*nb_negative*/ 0, - /*nb_positive*/ 0, - /*nb_absolute*/ 0, - /*nb_nonzero*/ SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum__nonzero, - /*nb_invert*/ (unaryfunc)SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___invert__, - /*nb_lshift*/ 0, - /*nb_rshift*/ 0, - /*nb_and*/ (binaryfunc)SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___and__, - /*nb_xor*/ (binaryfunc)SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___xor__, - /*nb_or*/ (binaryfunc)SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum___or__, - #ifndef IS_PY3K - /* nb_coerce */ 0, - #endif - /*nb_int*/ SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum_long, - #ifdef IS_PY3K - /*nb_reserved*/ 0, - /*nb_float*/ 0, - #else - /*nb_long*/ SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum_long, - /*nb_float*/ 0, - /*nb_oct*/ 0, - /*nb_hex*/ 0, - #endif - /*nb_inplace_add*/ 0, - /*nb_inplace_subtract*/ 0, - /*nb_inplace_multiply*/ 0, - #ifndef IS_PY3K - /*nb_inplace_divide*/ 0, - #endif - /*nb_inplace_remainder*/ 0, - /*nb_inplace_power*/ 0, - /*nb_inplace_lshift*/ 0, - /*nb_inplace_rshift*/ 0, - /*nb_inplace_and*/ 0, - /*nb_inplace_xor*/ 0, - /*nb_inplace_or*/ 0, - /*nb_floor_divide*/ 0, - /*nb_true_divide*/ 0, - /*nb_inplace_floor_divide*/ 0, - /*nb_inplace_true_divide*/ 0, - /*nb_index*/ 0 -}; - - - -// Type conversion functions. - -// Python to C++ enum conversion. -static void NATRON_NAMESPACE_StatusEnum_PythonToCpp_NATRON_NAMESPACE_StatusEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::StatusEnum*)cppOut) = (::NATRON_NAMESPACE::StatusEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_StatusEnum_PythonToCpp_NATRON_NAMESPACE_StatusEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX])) - return NATRON_NAMESPACE_StatusEnum_PythonToCpp_NATRON_NAMESPACE_StatusEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_StatusEnum_CppToPython_NATRON_NAMESPACE_StatusEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::StatusEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_NATRON_NAMESPACE_StandardButtonEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::StandardButtonEnum*)cppOut) = (::NATRON_NAMESPACE::StandardButtonEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_NATRON_NAMESPACE_StandardButtonEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX])) - return NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_NATRON_NAMESPACE_StandardButtonEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_StandardButtonEnum_CppToPython_NATRON_NAMESPACE_StandardButtonEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::StandardButtonEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], castCppIn); - -} - -static void QFlags_NATRON_NAMESPACE_StandardButtonEnum__PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_(PyObject* pyIn, void* cppOut) { - *((::QFlags*)cppOut) = ::QFlags(QFlag(PySide::QFlags::getValue(reinterpret_cast(pyIn)))); - -} -static PythonToCppFunc is_QFlags_NATRON_NAMESPACE_StandardButtonEnum__PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX])) - return QFlags_NATRON_NAMESPACE_StandardButtonEnum__PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_; - return 0; -} -static PyObject* QFlags_NATRON_NAMESPACE_StandardButtonEnum__CppToPython_QFlags_NATRON_NAMESPACE_StandardButtonEnum_(const void* cppIn) { - int castCppIn = *((::QFlags*)cppIn); - return reinterpret_cast(PySide::QFlags::newObject(castCppIn, SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX])); - -} - -static void NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_(PyObject* pyIn, void* cppOut) { - *((::QFlags*)cppOut) = ::QFlags(QFlag(Shiboken::Enum::getValue(pyIn))); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX])) - return NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_; - return 0; -} -static void number_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_(PyObject* pyIn, void* cppOut) { - Shiboken::AutoDecRef pyLong(PyNumber_Long(pyIn)); - *((::QFlags*)cppOut) = ::QFlags(QFlag(PyLong_AsLong(pyLong.object()))); - -} -static PythonToCppFunc is_number_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible(PyObject* pyIn) { - if (PyNumber_Check(pyIn)) - return number_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_; - return 0; -} -static void NATRON_NAMESPACE_KeyframeTypeEnum_PythonToCpp_NATRON_NAMESPACE_KeyframeTypeEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::KeyframeTypeEnum*)cppOut) = (::NATRON_NAMESPACE::KeyframeTypeEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_KeyframeTypeEnum_PythonToCpp_NATRON_NAMESPACE_KeyframeTypeEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX])) - return NATRON_NAMESPACE_KeyframeTypeEnum_PythonToCpp_NATRON_NAMESPACE_KeyframeTypeEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_KeyframeTypeEnum_CppToPython_NATRON_NAMESPACE_KeyframeTypeEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::KeyframeTypeEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_PixmapEnum_PythonToCpp_NATRON_NAMESPACE_PixmapEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::PixmapEnum*)cppOut) = (::NATRON_NAMESPACE::PixmapEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_PixmapEnum_PythonToCpp_NATRON_NAMESPACE_PixmapEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX])) - return NATRON_NAMESPACE_PixmapEnum_PythonToCpp_NATRON_NAMESPACE_PixmapEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_PixmapEnum_CppToPython_NATRON_NAMESPACE_PixmapEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::PixmapEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_ValueChangedReasonEnum_PythonToCpp_NATRON_NAMESPACE_ValueChangedReasonEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::ValueChangedReasonEnum*)cppOut) = (::NATRON_NAMESPACE::ValueChangedReasonEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_ValueChangedReasonEnum_PythonToCpp_NATRON_NAMESPACE_ValueChangedReasonEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX])) - return NATRON_NAMESPACE_ValueChangedReasonEnum_PythonToCpp_NATRON_NAMESPACE_ValueChangedReasonEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_ValueChangedReasonEnum_CppToPython_NATRON_NAMESPACE_ValueChangedReasonEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::ValueChangedReasonEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_AnimationLevelEnum_PythonToCpp_NATRON_NAMESPACE_AnimationLevelEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::AnimationLevelEnum*)cppOut) = (::NATRON_NAMESPACE::AnimationLevelEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_AnimationLevelEnum_PythonToCpp_NATRON_NAMESPACE_AnimationLevelEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX])) - return NATRON_NAMESPACE_AnimationLevelEnum_PythonToCpp_NATRON_NAMESPACE_AnimationLevelEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_AnimationLevelEnum_CppToPython_NATRON_NAMESPACE_AnimationLevelEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::AnimationLevelEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_ImagePremultiplicationEnum_PythonToCpp_NATRON_NAMESPACE_ImagePremultiplicationEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::ImagePremultiplicationEnum*)cppOut) = (::NATRON_NAMESPACE::ImagePremultiplicationEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_ImagePremultiplicationEnum_PythonToCpp_NATRON_NAMESPACE_ImagePremultiplicationEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX])) - return NATRON_NAMESPACE_ImagePremultiplicationEnum_PythonToCpp_NATRON_NAMESPACE_ImagePremultiplicationEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_ImagePremultiplicationEnum_CppToPython_NATRON_NAMESPACE_ImagePremultiplicationEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::ImagePremultiplicationEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_ViewerCompositingOperatorEnum_PythonToCpp_NATRON_NAMESPACE_ViewerCompositingOperatorEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::ViewerCompositingOperatorEnum*)cppOut) = (::NATRON_NAMESPACE::ViewerCompositingOperatorEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_ViewerCompositingOperatorEnum_PythonToCpp_NATRON_NAMESPACE_ViewerCompositingOperatorEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX])) - return NATRON_NAMESPACE_ViewerCompositingOperatorEnum_PythonToCpp_NATRON_NAMESPACE_ViewerCompositingOperatorEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_ViewerCompositingOperatorEnum_CppToPython_NATRON_NAMESPACE_ViewerCompositingOperatorEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::ViewerCompositingOperatorEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_ViewerColorSpaceEnum_PythonToCpp_NATRON_NAMESPACE_ViewerColorSpaceEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::ViewerColorSpaceEnum*)cppOut) = (::NATRON_NAMESPACE::ViewerColorSpaceEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_ViewerColorSpaceEnum_PythonToCpp_NATRON_NAMESPACE_ViewerColorSpaceEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX])) - return NATRON_NAMESPACE_ViewerColorSpaceEnum_PythonToCpp_NATRON_NAMESPACE_ViewerColorSpaceEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_ViewerColorSpaceEnum_CppToPython_NATRON_NAMESPACE_ViewerColorSpaceEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::ViewerColorSpaceEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_ImageBitDepthEnum_PythonToCpp_NATRON_NAMESPACE_ImageBitDepthEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::ImageBitDepthEnum*)cppOut) = (::NATRON_NAMESPACE::ImageBitDepthEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_ImageBitDepthEnum_PythonToCpp_NATRON_NAMESPACE_ImageBitDepthEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX])) - return NATRON_NAMESPACE_ImageBitDepthEnum_PythonToCpp_NATRON_NAMESPACE_ImageBitDepthEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_ImageBitDepthEnum_CppToPython_NATRON_NAMESPACE_ImageBitDepthEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::ImageBitDepthEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_OrientationEnum_PythonToCpp_NATRON_NAMESPACE_OrientationEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::OrientationEnum*)cppOut) = (::NATRON_NAMESPACE::OrientationEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_OrientationEnum_PythonToCpp_NATRON_NAMESPACE_OrientationEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX])) - return NATRON_NAMESPACE_OrientationEnum_PythonToCpp_NATRON_NAMESPACE_OrientationEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_OrientationEnum_CppToPython_NATRON_NAMESPACE_OrientationEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::OrientationEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_PlaybackModeEnum_PythonToCpp_NATRON_NAMESPACE_PlaybackModeEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::PlaybackModeEnum*)cppOut) = (::NATRON_NAMESPACE::PlaybackModeEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_PlaybackModeEnum_PythonToCpp_NATRON_NAMESPACE_PlaybackModeEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX])) - return NATRON_NAMESPACE_PlaybackModeEnum_PythonToCpp_NATRON_NAMESPACE_PlaybackModeEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_PlaybackModeEnum_CppToPython_NATRON_NAMESPACE_PlaybackModeEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::PlaybackModeEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_DisplayChannelsEnum_PythonToCpp_NATRON_NAMESPACE_DisplayChannelsEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::DisplayChannelsEnum*)cppOut) = (::NATRON_NAMESPACE::DisplayChannelsEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_DisplayChannelsEnum_PythonToCpp_NATRON_NAMESPACE_DisplayChannelsEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX])) - return NATRON_NAMESPACE_DisplayChannelsEnum_PythonToCpp_NATRON_NAMESPACE_DisplayChannelsEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_DisplayChannelsEnum_CppToPython_NATRON_NAMESPACE_DisplayChannelsEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::DisplayChannelsEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], castCppIn); - -} - -static void NATRON_NAMESPACE_MergingFunctionEnum_PythonToCpp_NATRON_NAMESPACE_MergingFunctionEnum(PyObject* pyIn, void* cppOut) { - *((::NATRON_NAMESPACE::MergingFunctionEnum*)cppOut) = (::NATRON_NAMESPACE::MergingFunctionEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_NATRON_NAMESPACE_MergingFunctionEnum_PythonToCpp_NATRON_NAMESPACE_MergingFunctionEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX])) - return NATRON_NAMESPACE_MergingFunctionEnum_PythonToCpp_NATRON_NAMESPACE_MergingFunctionEnum; - return 0; -} -static PyObject* NATRON_NAMESPACE_MergingFunctionEnum_CppToPython_NATRON_NAMESPACE_MergingFunctionEnum(const void* cppIn) { - int castCppIn = *((::NATRON_NAMESPACE::MergingFunctionEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], castCppIn); - -} - -void init_NATRON_NAMESPACE(PyObject* module) -{ - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IDX] = reinterpret_cast(&Sbk_NATRON_NAMESPACE_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Natron", "Natron", - &Sbk_NATRON_NAMESPACE_Type)) { - return; - } - - - // Initialization of enums. - - // Initialization of enum 'StatusEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "StatusEnum", - "NatronEngine.Natron.StatusEnum", - "Natron::StatusEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStatusOK", (long) NATRON_NAMESPACE::eStatusOK)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStatusFailed", (long) NATRON_NAMESPACE::eStatusFailed)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStatusOutOfMemory", (long) NATRON_NAMESPACE::eStatusOutOfMemory)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStatusReplyDefault", (long) NATRON_NAMESPACE::eStatusReplyDefault)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::StatusEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], - NATRON_NAMESPACE_StatusEnum_CppToPython_NATRON_NAMESPACE_StatusEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_StatusEnum_PythonToCpp_NATRON_NAMESPACE_StatusEnum, - is_NATRON_NAMESPACE_StatusEnum_PythonToCpp_NATRON_NAMESPACE_StatusEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::StatusEnum"); - Shiboken::Conversions::registerConverterName(converter, "StatusEnum"); - } - // End of 'StatusEnum' enum. - - // Initialization of enum 'StandardButtonEnum'. - SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX] = PySide::QFlags::create("StandardButtons", &SbkNatronEngine_NATRON_NAMESPACE_StandardButtonEnum_as_number); - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "StandardButtonEnum", - "NatronEngine.Natron.StandardButtonEnum", - "Natron::StandardButtonEnum", - SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonNoButton", (long) NATRON_NAMESPACE::eStandardButtonNoButton)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonEscape", (long) NATRON_NAMESPACE::eStandardButtonEscape)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonOk", (long) NATRON_NAMESPACE::eStandardButtonOk)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonSave", (long) NATRON_NAMESPACE::eStandardButtonSave)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonSaveAll", (long) NATRON_NAMESPACE::eStandardButtonSaveAll)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonOpen", (long) NATRON_NAMESPACE::eStandardButtonOpen)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonYes", (long) NATRON_NAMESPACE::eStandardButtonYes)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonYesToAll", (long) NATRON_NAMESPACE::eStandardButtonYesToAll)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonNo", (long) NATRON_NAMESPACE::eStandardButtonNo)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonNoToAll", (long) NATRON_NAMESPACE::eStandardButtonNoToAll)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonAbort", (long) NATRON_NAMESPACE::eStandardButtonAbort)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonRetry", (long) NATRON_NAMESPACE::eStandardButtonRetry)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonIgnore", (long) NATRON_NAMESPACE::eStandardButtonIgnore)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonClose", (long) NATRON_NAMESPACE::eStandardButtonClose)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonCancel", (long) NATRON_NAMESPACE::eStandardButtonCancel)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonDiscard", (long) NATRON_NAMESPACE::eStandardButtonDiscard)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonHelp", (long) NATRON_NAMESPACE::eStandardButtonHelp)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonApply", (long) NATRON_NAMESPACE::eStandardButtonApply)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonReset", (long) NATRON_NAMESPACE::eStandardButtonReset)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eStandardButtonRestoreDefaults", (long) NATRON_NAMESPACE::eStandardButtonRestoreDefaults)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::StandardButtonEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], - NATRON_NAMESPACE_StandardButtonEnum_CppToPython_NATRON_NAMESPACE_StandardButtonEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_NATRON_NAMESPACE_StandardButtonEnum, - is_NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_NATRON_NAMESPACE_StandardButtonEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::StandardButtonEnum"); - Shiboken::Conversions::registerConverterName(converter, "StandardButtonEnum"); - } - // Register converter for flag 'QFlags'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX], - QFlags_NATRON_NAMESPACE_StandardButtonEnum__CppToPython_QFlags_NATRON_NAMESPACE_StandardButtonEnum_); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_, - is_NATRON_NAMESPACE_StandardButtonEnum_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - QFlags_NATRON_NAMESPACE_StandardButtonEnum__PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_, - is_QFlags_NATRON_NAMESPACE_StandardButtonEnum__PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - number_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum_, - is_number_PythonToCpp_QFlags_NATRON_NAMESPACE_StandardButtonEnum__Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "QFlags"); - Shiboken::Conversions::registerConverterName(converter, "QFlags"); - } - // End of 'StandardButtonEnum' enum/flags. - - // Initialization of enum 'KeyframeTypeEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "KeyframeTypeEnum", - "NatronEngine.Natron.KeyframeTypeEnum", - "Natron::KeyframeTypeEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeConstant", (long) NATRON_NAMESPACE::eKeyframeTypeConstant)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeLinear", (long) NATRON_NAMESPACE::eKeyframeTypeLinear)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeSmooth", (long) NATRON_NAMESPACE::eKeyframeTypeSmooth)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeCatmullRom", (long) NATRON_NAMESPACE::eKeyframeTypeCatmullRom)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeCubic", (long) NATRON_NAMESPACE::eKeyframeTypeCubic)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeHorizontal", (long) NATRON_NAMESPACE::eKeyframeTypeHorizontal)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeFree", (long) NATRON_NAMESPACE::eKeyframeTypeFree)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeBroken", (long) NATRON_NAMESPACE::eKeyframeTypeBroken)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eKeyframeTypeNone", (long) NATRON_NAMESPACE::eKeyframeTypeNone)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::KeyframeTypeEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], - NATRON_NAMESPACE_KeyframeTypeEnum_CppToPython_NATRON_NAMESPACE_KeyframeTypeEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_KeyframeTypeEnum_PythonToCpp_NATRON_NAMESPACE_KeyframeTypeEnum, - is_NATRON_NAMESPACE_KeyframeTypeEnum_PythonToCpp_NATRON_NAMESPACE_KeyframeTypeEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::KeyframeTypeEnum"); - Shiboken::Conversions::registerConverterName(converter, "KeyframeTypeEnum"); - } - // End of 'KeyframeTypeEnum' enum. - - // Initialization of enum 'PixmapEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "PixmapEnum", - "NatronEngine.Natron.PixmapEnum", - "Natron::PixmapEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PREVIOUS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PREVIOUS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_FIRST_FRAME", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_FIRST_FRAME)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_NEXT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_NEXT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_LAST_FRAME", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_LAST_FRAME)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_NEXT_INCR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_NEXT_INCR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_NEXT_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_NEXT_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PREVIOUS_INCR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PREVIOUS_INCR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PREVIOUS_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PREVIOUS_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_REWIND_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_REWIND_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_REWIND_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_REWIND_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PLAY_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PLAY_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PLAY_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PLAY_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_STOP_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_STOP_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_STOP_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_STOP_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PAUSE_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PAUSE_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PAUSE_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PAUSE_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_LOOP_MODE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_LOOP_MODE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_BOUNCE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_BOUNCE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_PLAY_ONCE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_PLAY_ONCE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_TIMELINE_IN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_TIMELINE_IN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PLAYER_TIMELINE_OUT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PLAYER_TIMELINE_OUT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MAXIMIZE_WIDGET", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MAXIMIZE_WIDGET)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MINIMIZE_WIDGET", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MINIMIZE_WIDGET)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CLOSE_WIDGET", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CLOSE_WIDGET)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_HELP_WIDGET", (long) NATRON_NAMESPACE::NATRON_PIXMAP_HELP_WIDGET)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CLOSE_PANEL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CLOSE_PANEL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_HIDE_UNMODIFIED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_HIDE_UNMODIFIED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNHIDE_UNMODIFIED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNHIDE_UNMODIFIED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_GROUPBOX_FOLDED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_GROUPBOX_FOLDED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_GROUPBOX_UNFOLDED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_GROUPBOX_UNFOLDED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNDO", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNDO)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REDO", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REDO)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNDO_GRAYSCALE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNDO_GRAYSCALE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REDO_GRAYSCALE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REDO_GRAYSCALE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RESTORE_DEFAULTS_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RESTORE_DEFAULTS_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RESTORE_DEFAULTS_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RESTORE_DEFAULTS_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TAB_WIDGET_LAYOUT_BUTTON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TAB_WIDGET_LAYOUT_BUTTON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TAB_WIDGET_LAYOUT_BUTTON_ANCHOR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TAB_WIDGET_LAYOUT_BUTTON_ANCHOR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TAB_WIDGET_SPLIT_HORIZONTALLY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TAB_WIDGET_SPLIT_HORIZONTALLY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TAB_WIDGET_SPLIT_VERTICALLY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TAB_WIDGET_SPLIT_VERTICALLY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_CENTER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_CENTER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_CLIP_TO_PROJECT_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_CLIP_TO_PROJECT_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_CLIP_TO_PROJECT_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_CLIP_TO_PROJECT_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_FULL_FRAME_ON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_FULL_FRAME_ON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_FULL_FRAME_OFF", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_FULL_FRAME_OFF)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_REFRESH", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_REFRESH)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_REFRESH_ACTIVE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_REFRESH_ACTIVE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_ROI_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_ROI_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_ROI_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_ROI_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_RENDER_SCALE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_RENDER_SCALE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_RENDER_SCALE_CHECKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_RENDER_SCALE_CHECKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_AUTOCONTRAST_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_AUTOCONTRAST_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_AUTOCONTRAST_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_AUTOCONTRAST_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_OPEN_FILE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_OPEN_FILE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_COLORWHEEL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_COLORWHEEL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_OVERLAY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_OVERLAY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTO_MERGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTO_MERGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_COLOR_PICKER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_COLOR_PICKER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_IO_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_IO_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_3D_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_3D_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CHANNEL_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CHANNEL_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_COLOR_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_COLOR_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRANSFORM_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRANSFORM_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_DEEP_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_DEEP_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FILTER_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FILTER_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MULTIVIEW_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MULTIVIEW_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TOOLSETS_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TOOLSETS_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MISC_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MISC_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_OPEN_EFFECTS_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_OPEN_EFFECTS_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TIME_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TIME_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PAINT_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PAINT_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_KEYER_GROUPING", (long) NATRON_NAMESPACE::NATRON_PIXMAP_KEYER_GROUPING)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_OTHER_PLUGINS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_OTHER_PLUGINS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_READ_IMAGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_READ_IMAGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_WRITE_IMAGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_WRITE_IMAGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_COMBOBOX", (long) NATRON_NAMESPACE::NATRON_PIXMAP_COMBOBOX)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_COMBOBOX_PRESSED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_COMBOBOX_PRESSED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ADD_KEYFRAME", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ADD_KEYFRAME)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REMOVE_KEYFRAME", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REMOVE_KEYFRAME)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INVERTED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INVERTED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNINVERTED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNINVERTED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VISIBLE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VISIBLE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNVISIBLE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNVISIBLE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_LOCKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_LOCKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UNLOCKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UNLOCKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_LAYER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_LAYER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_BEZIER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_BEZIER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PENCIL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PENCIL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CURVE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CURVE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_BEZIER_32", (long) NATRON_NAMESPACE::NATRON_PIXMAP_BEZIER_32)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ELLIPSE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ELLIPSE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RECTANGLE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RECTANGLE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ADD_POINTS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ADD_POINTS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REMOVE_POINTS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REMOVE_POINTS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CUSP_POINTS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CUSP_POINTS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SMOOTH_POINTS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SMOOTH_POINTS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REMOVE_FEATHER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REMOVE_FEATHER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_OPEN_CLOSE_CURVE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_OPEN_CLOSE_CURVE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SELECT_ALL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SELECT_ALL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SELECT_POINTS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SELECT_POINTS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SELECT_FEATHER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SELECT_FEATHER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SELECT_CURVES", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SELECT_CURVES)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_AUTO_KEYING_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_AUTO_KEYING_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_AUTO_KEYING_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_AUTO_KEYING_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_STICKY_SELECTION_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_STICKY_SELECTION_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_STICKY_SELECTION_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_STICKY_SELECTION_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FEATHER_LINK_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FEATHER_LINK_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FEATHER_LINK_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FEATHER_LINK_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FEATHER_VISIBLE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FEATHER_VISIBLE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FEATHER_UNVISIBLE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FEATHER_UNVISIBLE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RIPPLE_EDIT_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RIPPLE_EDIT_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RIPPLE_EDIT_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RIPPLE_EDIT_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_BLUR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_BLUR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_BUILDUP_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_BUILDUP_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_BUILDUP_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_BUILDUP_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_BURN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_BURN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_CLONE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_CLONE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_DODGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_DODGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_ERASER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_ERASER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_PRESSURE_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_PRESSURE_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_PRESSURE_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_PRESSURE_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_REVEAL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_REVEAL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_SHARPEN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_SHARPEN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_SMEAR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_SMEAR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTOPAINT_SOLID", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTOPAINT_SOLID)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_BOLD_CHECKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_BOLD_CHECKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_BOLD_UNCHECKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_BOLD_UNCHECKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ITALIC_CHECKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ITALIC_CHECKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ITALIC_UNCHECKED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ITALIC_UNCHECKED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CLEAR_ALL_ANIMATION", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CLEAR_ALL_ANIMATION)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CLEAR_BACKWARD_ANIMATION", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CLEAR_BACKWARD_ANIMATION)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CLEAR_FORWARD_ANIMATION", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CLEAR_FORWARD_ANIMATION)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UPDATE_VIEWER_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UPDATE_VIEWER_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_UPDATE_VIEWER_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_UPDATE_VIEWER_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ADD_TRACK", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ADD_TRACK)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ADD_USER_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ADD_USER_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_REMOVE_USER_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_REMOVE_USER_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SHOW_TRACK_ERROR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SHOW_TRACK_ERROR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_HIDE_TRACK_ERROR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_HIDE_TRACK_ERROR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RESET_TRACK_OFFSET", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RESET_TRACK_OFFSET)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CREATE_USER_KEY_ON_MOVE_ON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CREATE_USER_KEY_ON_MOVE_ON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CREATE_USER_KEY_ON_MOVE_OFF", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CREATE_USER_KEY_ON_MOVE_OFF)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_RESET_USER_KEYS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_RESET_USER_KEYS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_CENTER_VIEWER_ON_TRACK", (long) NATRON_NAMESPACE::NATRON_PIXMAP_CENTER_VIEWER_ON_TRACK)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_BACKWARD_ON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_BACKWARD_ON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_BACKWARD_OFF", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_BACKWARD_OFF)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_FORWARD_ON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_FORWARD_ON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_FORWARD_OFF", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_FORWARD_OFF)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_PREVIOUS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_PREVIOUS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_NEXT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_NEXT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_RANGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_RANGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_ALL_KEYS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_ALL_KEYS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_TRACK_CURRENT_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_TRACK_CURRENT_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_NEXT_USER_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_NEXT_USER_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_PREV_USER_KEY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_PREV_USER_KEY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ENTER_GROUP", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ENTER_GROUP)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SETTINGS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SETTINGS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FREEZE_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FREEZE_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_FREEZE_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_FREEZE_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_ICON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_ICON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_CHECKERBOARD_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_CHECKERBOARD_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_CHECKERBOARD_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_CHECKERBOARD_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_ZEBRA_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_ZEBRA_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_ZEBRA_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_ZEBRA_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_GAMMA_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_GAMMA_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_GAMMA_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_GAMMA_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_GAIN_ENABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_GAIN_ENABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_VIEWER_GAIN_DISABLED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_VIEWER_GAIN_DISABLED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_CLEAR_OUTPUT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_CLEAR_OUTPUT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_EXEC_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_EXEC_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_LOAD_EXEC_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_LOAD_EXEC_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_LOAD_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_LOAD_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_NEXT_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_NEXT_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_OUTPUT_PANE_ACTIVATED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_OUTPUT_PANE_ACTIVATED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_OUTPUT_PANE_DEACTIVATED", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_OUTPUT_PANE_DEACTIVATED)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_PREVIOUS_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_PREVIOUS_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_SCRIPT_SAVE_SCRIPT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_SCRIPT_SAVE_SCRIPT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_ATOP", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_ATOP)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_AVERAGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_AVERAGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_COLOR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_COLOR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_COLOR_BURN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_COLOR_BURN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_COLOR_DODGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_COLOR_DODGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_CONJOINT_OVER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_CONJOINT_OVER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_COPY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_COPY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_DIFFERENCE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_DIFFERENCE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_DISJOINT_OVER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_DISJOINT_OVER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_DIVIDE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_DIVIDE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_EXCLUSION", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_EXCLUSION)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_FREEZE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_FREEZE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_FROM", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_FROM)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_GEOMETRIC", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_GEOMETRIC)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_GRAIN_EXTRACT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_GRAIN_EXTRACT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_GRAIN_MERGE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_GRAIN_MERGE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_HARD_LIGHT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_HARD_LIGHT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_HUE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_HUE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_HYPOT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_HYPOT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_IN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_IN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_LUMINOSITY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_LUMINOSITY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MASK", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MASK)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MATTE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MATTE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MAX", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MAX)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MIN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MIN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MINUS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MINUS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_MULTIPLY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_MULTIPLY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_OUT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_OUT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_OVER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_OVER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_OVERLAY", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_OVERLAY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_PINLIGHT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_PINLIGHT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_PLUS", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_PLUS)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_REFLECT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_REFLECT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_SATURATION", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_SATURATION)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_SCREEN", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_SCREEN)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_SOFT_LIGHT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_SOFT_LIGHT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_STENCIL", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_STENCIL)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_UNDER", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_UNDER)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_MERGE_XOR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_MERGE_XOR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_ROTO_NODE_ICON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_ROTO_NODE_ICON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_LINK_CURSOR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_LINK_CURSOR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_LINK_MULT_CURSOR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_LINK_MULT_CURSOR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_APP_ICON", (long) NATRON_NAMESPACE::NATRON_PIXMAP_APP_ICON)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_LINEAR", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_LINEAR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CURVE", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CURVE)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CONSTANT", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CONSTANT)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_BREAK", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_BREAK)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CURVE_C", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CURVE_C)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CURVE_H", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CURVE_H)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CURVE_R", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CURVE_R)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "NATRON_PIXMAP_INTERP_CURVE_Z", (long) NATRON_NAMESPACE::NATRON_PIXMAP_INTERP_CURVE_Z)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::PixmapEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], - NATRON_NAMESPACE_PixmapEnum_CppToPython_NATRON_NAMESPACE_PixmapEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_PixmapEnum_PythonToCpp_NATRON_NAMESPACE_PixmapEnum, - is_NATRON_NAMESPACE_PixmapEnum_PythonToCpp_NATRON_NAMESPACE_PixmapEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::PixmapEnum"); - Shiboken::Conversions::registerConverterName(converter, "PixmapEnum"); - } - // End of 'PixmapEnum' enum. - - // Initialization of enum 'ValueChangedReasonEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "ValueChangedReasonEnum", - "NatronEngine.Natron.ValueChangedReasonEnum", - "Natron::ValueChangedReasonEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonUserEdited", (long) NATRON_NAMESPACE::eValueChangedReasonUserEdited)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonPluginEdited", (long) NATRON_NAMESPACE::eValueChangedReasonPluginEdited)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonNatronGuiEdited", (long) NATRON_NAMESPACE::eValueChangedReasonNatronGuiEdited)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonNatronInternalEdited", (long) NATRON_NAMESPACE::eValueChangedReasonNatronInternalEdited)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonTimeChanged", (long) NATRON_NAMESPACE::eValueChangedReasonTimeChanged)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonSlaveRefresh", (long) NATRON_NAMESPACE::eValueChangedReasonSlaveRefresh)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eValueChangedReasonRestoreDefault", (long) NATRON_NAMESPACE::eValueChangedReasonRestoreDefault)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::ValueChangedReasonEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], - NATRON_NAMESPACE_ValueChangedReasonEnum_CppToPython_NATRON_NAMESPACE_ValueChangedReasonEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_ValueChangedReasonEnum_PythonToCpp_NATRON_NAMESPACE_ValueChangedReasonEnum, - is_NATRON_NAMESPACE_ValueChangedReasonEnum_PythonToCpp_NATRON_NAMESPACE_ValueChangedReasonEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::ValueChangedReasonEnum"); - Shiboken::Conversions::registerConverterName(converter, "ValueChangedReasonEnum"); - } - // End of 'ValueChangedReasonEnum' enum. - - // Initialization of enum 'AnimationLevelEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "AnimationLevelEnum", - "NatronEngine.Natron.AnimationLevelEnum", - "Natron::AnimationLevelEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eAnimationLevelNone", (long) NATRON_NAMESPACE::eAnimationLevelNone)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eAnimationLevelInterpolatedValue", (long) NATRON_NAMESPACE::eAnimationLevelInterpolatedValue)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eAnimationLevelOnKeyframe", (long) NATRON_NAMESPACE::eAnimationLevelOnKeyframe)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::AnimationLevelEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], - NATRON_NAMESPACE_AnimationLevelEnum_CppToPython_NATRON_NAMESPACE_AnimationLevelEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_AnimationLevelEnum_PythonToCpp_NATRON_NAMESPACE_AnimationLevelEnum, - is_NATRON_NAMESPACE_AnimationLevelEnum_PythonToCpp_NATRON_NAMESPACE_AnimationLevelEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::AnimationLevelEnum"); - Shiboken::Conversions::registerConverterName(converter, "AnimationLevelEnum"); - } - // End of 'AnimationLevelEnum' enum. - - // Initialization of enum 'ImagePremultiplicationEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "ImagePremultiplicationEnum", - "NatronEngine.Natron.ImagePremultiplicationEnum", - "Natron::ImagePremultiplicationEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImagePremultiplicationOpaque", (long) NATRON_NAMESPACE::eImagePremultiplicationOpaque)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImagePremultiplicationPremultiplied", (long) NATRON_NAMESPACE::eImagePremultiplicationPremultiplied)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImagePremultiplicationUnPremultiplied", (long) NATRON_NAMESPACE::eImagePremultiplicationUnPremultiplied)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::ImagePremultiplicationEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], - NATRON_NAMESPACE_ImagePremultiplicationEnum_CppToPython_NATRON_NAMESPACE_ImagePremultiplicationEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_ImagePremultiplicationEnum_PythonToCpp_NATRON_NAMESPACE_ImagePremultiplicationEnum, - is_NATRON_NAMESPACE_ImagePremultiplicationEnum_PythonToCpp_NATRON_NAMESPACE_ImagePremultiplicationEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::ImagePremultiplicationEnum"); - Shiboken::Conversions::registerConverterName(converter, "ImagePremultiplicationEnum"); - } - // End of 'ImagePremultiplicationEnum' enum. - - // Initialization of enum 'ViewerCompositingOperatorEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "ViewerCompositingOperatorEnum", - "NatronEngine.Natron.ViewerCompositingOperatorEnum", - "Natron::ViewerCompositingOperatorEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorNone", (long) NATRON_NAMESPACE::eViewerCompositingOperatorNone)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorWipeUnder", (long) NATRON_NAMESPACE::eViewerCompositingOperatorWipeUnder)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorWipeOver", (long) NATRON_NAMESPACE::eViewerCompositingOperatorWipeOver)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorWipeMinus", (long) NATRON_NAMESPACE::eViewerCompositingOperatorWipeMinus)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorWipeOnionSkin", (long) NATRON_NAMESPACE::eViewerCompositingOperatorWipeOnionSkin)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorStackUnder", (long) NATRON_NAMESPACE::eViewerCompositingOperatorStackUnder)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorStackOver", (long) NATRON_NAMESPACE::eViewerCompositingOperatorStackOver)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorStackMinus", (long) NATRON_NAMESPACE::eViewerCompositingOperatorStackMinus)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerCompositingOperatorStackOnionSkin", (long) NATRON_NAMESPACE::eViewerCompositingOperatorStackOnionSkin)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::ViewerCompositingOperatorEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], - NATRON_NAMESPACE_ViewerCompositingOperatorEnum_CppToPython_NATRON_NAMESPACE_ViewerCompositingOperatorEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_ViewerCompositingOperatorEnum_PythonToCpp_NATRON_NAMESPACE_ViewerCompositingOperatorEnum, - is_NATRON_NAMESPACE_ViewerCompositingOperatorEnum_PythonToCpp_NATRON_NAMESPACE_ViewerCompositingOperatorEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::ViewerCompositingOperatorEnum"); - Shiboken::Conversions::registerConverterName(converter, "ViewerCompositingOperatorEnum"); - } - // End of 'ViewerCompositingOperatorEnum' enum. - - // Initialization of enum 'ViewerColorSpaceEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "ViewerColorSpaceEnum", - "NatronEngine.Natron.ViewerColorSpaceEnum", - "Natron::ViewerColorSpaceEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerColorSpaceSRGB", (long) NATRON_NAMESPACE::eViewerColorSpaceSRGB)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerColorSpaceLinear", (long) NATRON_NAMESPACE::eViewerColorSpaceLinear)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eViewerColorSpaceRec709", (long) NATRON_NAMESPACE::eViewerColorSpaceRec709)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::ViewerColorSpaceEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], - NATRON_NAMESPACE_ViewerColorSpaceEnum_CppToPython_NATRON_NAMESPACE_ViewerColorSpaceEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_ViewerColorSpaceEnum_PythonToCpp_NATRON_NAMESPACE_ViewerColorSpaceEnum, - is_NATRON_NAMESPACE_ViewerColorSpaceEnum_PythonToCpp_NATRON_NAMESPACE_ViewerColorSpaceEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::ViewerColorSpaceEnum"); - Shiboken::Conversions::registerConverterName(converter, "ViewerColorSpaceEnum"); - } - // End of 'ViewerColorSpaceEnum' enum. - - // Initialization of enum 'ImageBitDepthEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "ImageBitDepthEnum", - "NatronEngine.Natron.ImageBitDepthEnum", - "Natron::ImageBitDepthEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImageBitDepthNone", (long) NATRON_NAMESPACE::eImageBitDepthNone)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImageBitDepthByte", (long) NATRON_NAMESPACE::eImageBitDepthByte)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImageBitDepthShort", (long) NATRON_NAMESPACE::eImageBitDepthShort)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImageBitDepthHalf", (long) NATRON_NAMESPACE::eImageBitDepthHalf)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eImageBitDepthFloat", (long) NATRON_NAMESPACE::eImageBitDepthFloat)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::ImageBitDepthEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], - NATRON_NAMESPACE_ImageBitDepthEnum_CppToPython_NATRON_NAMESPACE_ImageBitDepthEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_ImageBitDepthEnum_PythonToCpp_NATRON_NAMESPACE_ImageBitDepthEnum, - is_NATRON_NAMESPACE_ImageBitDepthEnum_PythonToCpp_NATRON_NAMESPACE_ImageBitDepthEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::ImageBitDepthEnum"); - Shiboken::Conversions::registerConverterName(converter, "ImageBitDepthEnum"); - } - // End of 'ImageBitDepthEnum' enum. - - // Initialization of enum 'OrientationEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "OrientationEnum", - "NatronEngine.Natron.OrientationEnum", - "Natron::OrientationEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eOrientationHorizontal", (long) NATRON_NAMESPACE::eOrientationHorizontal)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eOrientationVertical", (long) NATRON_NAMESPACE::eOrientationVertical)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::OrientationEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], - NATRON_NAMESPACE_OrientationEnum_CppToPython_NATRON_NAMESPACE_OrientationEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_OrientationEnum_PythonToCpp_NATRON_NAMESPACE_OrientationEnum, - is_NATRON_NAMESPACE_OrientationEnum_PythonToCpp_NATRON_NAMESPACE_OrientationEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::OrientationEnum"); - Shiboken::Conversions::registerConverterName(converter, "OrientationEnum"); - } - // End of 'OrientationEnum' enum. - - // Initialization of enum 'PlaybackModeEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "PlaybackModeEnum", - "NatronEngine.Natron.PlaybackModeEnum", - "Natron::PlaybackModeEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "ePlaybackModeLoop", (long) NATRON_NAMESPACE::ePlaybackModeLoop)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "ePlaybackModeBounce", (long) NATRON_NAMESPACE::ePlaybackModeBounce)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "ePlaybackModeOnce", (long) NATRON_NAMESPACE::ePlaybackModeOnce)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::PlaybackModeEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], - NATRON_NAMESPACE_PlaybackModeEnum_CppToPython_NATRON_NAMESPACE_PlaybackModeEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_PlaybackModeEnum_PythonToCpp_NATRON_NAMESPACE_PlaybackModeEnum, - is_NATRON_NAMESPACE_PlaybackModeEnum_PythonToCpp_NATRON_NAMESPACE_PlaybackModeEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::PlaybackModeEnum"); - Shiboken::Conversions::registerConverterName(converter, "PlaybackModeEnum"); - } - // End of 'PlaybackModeEnum' enum. - - // Initialization of enum 'DisplayChannelsEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "DisplayChannelsEnum", - "NatronEngine.Natron.DisplayChannelsEnum", - "Natron::DisplayChannelsEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsRGB", (long) NATRON_NAMESPACE::eDisplayChannelsRGB)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsR", (long) NATRON_NAMESPACE::eDisplayChannelsR)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsG", (long) NATRON_NAMESPACE::eDisplayChannelsG)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsB", (long) NATRON_NAMESPACE::eDisplayChannelsB)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsA", (long) NATRON_NAMESPACE::eDisplayChannelsA)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsY", (long) NATRON_NAMESPACE::eDisplayChannelsY)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eDisplayChannelsMatte", (long) NATRON_NAMESPACE::eDisplayChannelsMatte)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::DisplayChannelsEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], - NATRON_NAMESPACE_DisplayChannelsEnum_CppToPython_NATRON_NAMESPACE_DisplayChannelsEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_DisplayChannelsEnum_PythonToCpp_NATRON_NAMESPACE_DisplayChannelsEnum, - is_NATRON_NAMESPACE_DisplayChannelsEnum_PythonToCpp_NATRON_NAMESPACE_DisplayChannelsEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::DisplayChannelsEnum"); - Shiboken::Conversions::registerConverterName(converter, "DisplayChannelsEnum"); - } - // End of 'DisplayChannelsEnum' enum. - - // Initialization of enum 'MergingFunctionEnum'. - SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_NATRON_NAMESPACE_Type, - "MergingFunctionEnum", - "NatronEngine.Natron.MergingFunctionEnum", - "Natron::MergingFunctionEnum"); - if (!SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeATop", (long) NATRON_NAMESPACE::eMergeATop)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeAverage", (long) NATRON_NAMESPACE::eMergeAverage)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeColor", (long) NATRON_NAMESPACE::eMergeColor)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeColorBurn", (long) NATRON_NAMESPACE::eMergeColorBurn)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeColorDodge", (long) NATRON_NAMESPACE::eMergeColorDodge)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeConjointOver", (long) NATRON_NAMESPACE::eMergeConjointOver)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeCopy", (long) NATRON_NAMESPACE::eMergeCopy)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeDifference", (long) NATRON_NAMESPACE::eMergeDifference)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeDisjointOver", (long) NATRON_NAMESPACE::eMergeDisjointOver)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeDivide", (long) NATRON_NAMESPACE::eMergeDivide)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeExclusion", (long) NATRON_NAMESPACE::eMergeExclusion)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeFreeze", (long) NATRON_NAMESPACE::eMergeFreeze)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeFrom", (long) NATRON_NAMESPACE::eMergeFrom)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeGeometric", (long) NATRON_NAMESPACE::eMergeGeometric)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeGrainExtract", (long) NATRON_NAMESPACE::eMergeGrainExtract)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeGrainMerge", (long) NATRON_NAMESPACE::eMergeGrainMerge)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeHardLight", (long) NATRON_NAMESPACE::eMergeHardLight)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeHue", (long) NATRON_NAMESPACE::eMergeHue)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeHypot", (long) NATRON_NAMESPACE::eMergeHypot)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeIn", (long) NATRON_NAMESPACE::eMergeIn)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeLuminosity", (long) NATRON_NAMESPACE::eMergeLuminosity)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMask", (long) NATRON_NAMESPACE::eMergeMask)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMatte", (long) NATRON_NAMESPACE::eMergeMatte)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMax", (long) NATRON_NAMESPACE::eMergeMax)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMin", (long) NATRON_NAMESPACE::eMergeMin)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMinus", (long) NATRON_NAMESPACE::eMergeMinus)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeMultiply", (long) NATRON_NAMESPACE::eMergeMultiply)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeOut", (long) NATRON_NAMESPACE::eMergeOut)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeOver", (long) NATRON_NAMESPACE::eMergeOver)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeOverlay", (long) NATRON_NAMESPACE::eMergeOverlay)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergePinLight", (long) NATRON_NAMESPACE::eMergePinLight)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergePlus", (long) NATRON_NAMESPACE::eMergePlus)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeReflect", (long) NATRON_NAMESPACE::eMergeReflect)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeSaturation", (long) NATRON_NAMESPACE::eMergeSaturation)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeScreen", (long) NATRON_NAMESPACE::eMergeScreen)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeSoftLight", (long) NATRON_NAMESPACE::eMergeSoftLight)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeStencil", (long) NATRON_NAMESPACE::eMergeStencil)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeUnder", (long) NATRON_NAMESPACE::eMergeUnder)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - &Sbk_NATRON_NAMESPACE_Type, "eMergeXOR", (long) NATRON_NAMESPACE::eMergeXOR)) - return ; - // Register converter for enum 'NATRON_NAMESPACE::MergingFunctionEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], - NATRON_NAMESPACE_MergingFunctionEnum_CppToPython_NATRON_NAMESPACE_MergingFunctionEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - NATRON_NAMESPACE_MergingFunctionEnum_PythonToCpp_NATRON_NAMESPACE_MergingFunctionEnum, - is_NATRON_NAMESPACE_MergingFunctionEnum_PythonToCpp_NATRON_NAMESPACE_MergingFunctionEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "Natron::MergingFunctionEnum"); - Shiboken::Conversions::registerConverterName(converter, "MergingFunctionEnum"); - } - // End of 'MergingFunctionEnum' enum. - - - qRegisterMetaType< ::NATRON_NAMESPACE::StatusEnum >("Natron::StatusEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::StandardButtonEnum >("Natron::StandardButtonEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::StandardButtons >("Natron::StandardButtons"); - qRegisterMetaType< ::NATRON_NAMESPACE::KeyframeTypeEnum >("Natron::KeyframeTypeEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::PixmapEnum >("Natron::PixmapEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::ValueChangedReasonEnum >("Natron::ValueChangedReasonEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::AnimationLevelEnum >("Natron::AnimationLevelEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::ImagePremultiplicationEnum >("Natron::ImagePremultiplicationEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::ViewerCompositingOperatorEnum >("Natron::ViewerCompositingOperatorEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::ViewerColorSpaceEnum >("Natron::ViewerColorSpaceEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::ImageBitDepthEnum >("Natron::ImageBitDepthEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::OrientationEnum >("Natron::OrientationEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::PlaybackModeEnum >("Natron::PlaybackModeEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::DisplayChannelsEnum >("Natron::DisplayChannelsEnum"); - qRegisterMetaType< ::NATRON_NAMESPACE::MergingFunctionEnum >("Natron::MergingFunctionEnum"); -} diff --git a/Engine/Qt4/NatronEngine/natron_enum_wrapper.h b/Engine/Qt4/NatronEngine/natron_enum_wrapper.h deleted file mode 100644 index 0efd31f209..0000000000 --- a/Engine/Qt4/NatronEngine/natron_enum_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_NATRON_NAMESPACE_H -#define SBK_NATRON_NAMESPACE_H - -#include - -#include - -#endif // SBK_NATRON_NAMESPACE_H - diff --git a/Engine/Qt4/NatronEngine/natronengine_module_wrapper.cpp b/Engine/Qt4/NatronEngine/natronengine_module_wrapper.cpp deleted file mode 100644 index 2eb0114924..0000000000 --- a/Engine/Qt4/NatronEngine/natronengine_module_wrapper.cpp +++ /dev/null @@ -1,1077 +0,0 @@ - -#include -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include "natronengine_python.h" - - - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - -// Current module's type array. -PyTypeObject** SbkNatronEngineTypes; -// Current module's converter array. -SbkConverter** SbkNatronEngineTypeConverters; -void cleanTypesAttributes(void) { - for (int i = 0, imax = SBK_NatronEngine_IDX_COUNT; i < imax; i++) { - PyObject *pyType = reinterpret_cast(SbkNatronEngineTypes[i]); - if (pyType && PyObject_HasAttrString(pyType, "staticMetaObject")) - PyObject_SetAttrString(pyType, "staticMetaObject", Py_None); - } -} -// Global functions ------------------------------------------------------------ - -static PyMethodDef NatronEngine_methods[] = { - {0} // Sentinel -}; - -// Classes initialization functions ------------------------------------------------------------ -void init_RectD(PyObject* module); -void init_ExprUtils(PyObject* module); -void init_PyCoreApplication(PyObject* module); -void init_Group(PyObject* module); -void init_App(PyObject* module); -void init_AppSettings(PyObject* module); -void init_NodeCreationProperty(PyObject* module); -void init_StringNodeCreationProperty(PyObject* module); -void init_IntNodeCreationProperty(PyObject* module); -void init_BoolNodeCreationProperty(PyObject* module); -void init_FloatNodeCreationProperty(PyObject* module); -void init_ItemBase(PyObject* module); -void init_Layer(PyObject* module); -void init_BezierCurve(PyObject* module); -void init_Roto(PyObject* module); -void init_Track(PyObject* module); -void init_Tracker(PyObject* module); -void init_ImageLayer(PyObject* module); -void init_UserParamHolder(PyObject* module); -void init_Effect(PyObject* module); -void init_Param(PyObject* module); -void init_GroupParam(PyObject* module); -void init_AnimatedParam(PyObject* module); -void init_StringParamBase(PyObject* module); -void init_FileParam(PyObject* module); -void init_OutputFileParam(PyObject* module); -void init_PathParam(PyObject* module); -void init_StringParam(PyObject* module); -void init_IntParam(PyObject* module); -void init_Int2DParam(PyObject* module); -void init_Int3DParam(PyObject* module); -void init_DoubleParam(PyObject* module); -void init_Double2DParam(PyObject* module); -void init_Double3DParam(PyObject* module); -void init_ColorParam(PyObject* module); -void init_ChoiceParam(PyObject* module); -void init_BooleanParam(PyObject* module); -void init_PageParam(PyObject* module); -void init_ButtonParam(PyObject* module); -void init_ParametricParam(PyObject* module); -void init_SeparatorParam(PyObject* module); -void init_Int2DTuple(PyObject* module); -void init_Int3DTuple(PyObject* module); -void init_Double2DTuple(PyObject* module); -void init_Double3DTuple(PyObject* module); -void init_ColorTuple(PyObject* module); -void init_RectI(PyObject* module); -void init_NATRON_NAMESPACE(PyObject* module); - -// Required modules' type and converter arrays. -PyTypeObject** SbkPySide_QtCoreTypes; -SbkConverter** SbkPySide_QtCoreTypeConverters; - -// Module initialization ------------------------------------------------------------ - -// Primitive Type converters. - -// C++ to Python conversion for type 'std::size_t'. -static PyObject* std_size_t_CppToPython_std_size_t(const void* cppIn) { - ::std::size_t& cppInRef = *((::std::size_t*)cppIn); - - return PyLong_FromSize_t(cppInRef); - -} -// Python to C++ conversions for type 'std::size_t'. -static void PyLong_PythonToCpp_std_size_t(PyObject* pyIn, void* cppOut) { - - *((::std::size_t*)cppOut) = std::size_t(PyLong_AsSsize_t(pyIn)); - -} -static PythonToCppFunc is_PyLong_PythonToCpp_std_size_t_Convertible(PyObject* pyIn) { - if (PyLong_Check(pyIn)) - return PyLong_PythonToCpp_std_size_t; - return 0; -} - - -// Container Type converters. - -// C++ to Python conversion for type 'std::vector'. -static PyObject* std_vector_RectI__CppToPython_std_vector_RectI_(const void* cppIn) { - ::std::vector& cppInRef = *((::std::vector*)cppIn); - - // TEMPLATE - stdVectorToPyList - START - ::std::vector::size_type vectorSize = cppInRef.size(); - PyObject* pyOut = PyList_New((int) vectorSize); - for (::std::vector::size_type idx = 0; idx < vectorSize; ++idx) { - ::RectI cppItem(cppInRef[idx]); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdVectorToPyList - END - -} -static void std_vector_RectI__PythonToCpp_std_vector_RectI_(PyObject* pyIn, void* cppOut) { - ::std::vector& cppOutRef = *((::std::vector*)cppOut); - - // TEMPLATE - pySeqToStdVector - START - int vectorSize = PySequence_Size(pyIn); - cppOutRef.reserve(vectorSize); - for (int idx = 0; idx < vectorSize; ++idx) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, idx)); - ::RectI cppItem = ::RectI(); - Shiboken::Conversions::pythonToCppCopy((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pySeqToStdVector - END - -} -static PythonToCppFunc is_std_vector_RectI__PythonToCpp_std_vector_RectI__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], pyIn)) - return std_vector_RectI__PythonToCpp_std_vector_RectI_; - return 0; -} - -// C++ to Python conversion for type 'std::vector'. -static PyObject* std_vector_std_string__CppToPython_std_vector_std_string_(const void* cppIn) { - ::std::vector& cppInRef = *((::std::vector*)cppIn); - - // TEMPLATE - stdVectorToPyList - START - ::std::vector::size_type vectorSize = cppInRef.size(); - PyObject* pyOut = PyList_New((int) vectorSize); - for (::std::vector::size_type idx = 0; idx < vectorSize; ++idx) { - ::std::string cppItem(cppInRef[idx]); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdVectorToPyList - END - -} -static void std_vector_std_string__PythonToCpp_std_vector_std_string_(PyObject* pyIn, void* cppOut) { - ::std::vector& cppOutRef = *((::std::vector*)cppOut); - - // TEMPLATE - pySeqToStdVector - START - int vectorSize = PySequence_Size(pyIn); - cppOutRef.reserve(vectorSize); - for (int idx = 0; idx < vectorSize; ++idx) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, idx)); - ::std::string cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pySeqToStdVector - END - -} -static PythonToCppFunc is_std_vector_std_string__PythonToCpp_std_vector_std_string__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return std_vector_std_string__PythonToCpp_std_vector_std_string_; - return 0; -} - -// C++ to Python conversion for type 'std::list > *'. -static PyObject* std_list_std_vector_std_string__PTR_CppToPython_std_list_std_vector_std_string__PTR(const void* cppIn) { - ::std::list >& cppInRef = *((::std::list >*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list >::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::std::vector cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_std_vector_std_string__PTR_PythonToCpp_std_list_std_vector_std_string__PTR(PyObject* pyIn, void* cppOut) { - ::std::list >& cppOutRef = *((::std::list >*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::std::vector cppItem = ::std::vector(); - Shiboken::Conversions::pythonToCppCopy(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_std_vector_std_string__PTR_PythonToCpp_std_list_std_vector_std_string__PTR_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], pyIn)) - return std_list_std_vector_std_string__PTR_PythonToCpp_std_list_std_vector_std_string__PTR; - return 0; -} - -// C++ to Python conversion for type 'std::pair'. -static PyObject* std_pair_QString_QString__CppToPython_std_pair_QString_QString_(const void* cppIn) { - ::std::pair& cppInRef = *((::std::pair*)cppIn); - - PyObject* pyOut = PyTuple_New(2); - PyTuple_SET_ITEM(pyOut, 0, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppInRef.first)); - PyTuple_SET_ITEM(pyOut, 1, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppInRef.second)); - return pyOut; - -} -static void std_pair_QString_QString__PythonToCpp_std_pair_QString_QString_(PyObject* pyIn, void* cppOut) { - ::std::pair& cppOutRef = *((::std::pair*)cppOut); - - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], PySequence_Fast_GET_ITEM(pyIn, 0), &(cppOutRef.first)); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], PySequence_Fast_GET_ITEM(pyIn, 1), &(cppOutRef.second)); - -} -static PythonToCppFunc is_std_pair_QString_QString__PythonToCpp_std_pair_QString_QString__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertiblePairTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, pyIn)) - return std_pair_QString_QString__PythonToCpp_std_pair_QString_QString_; - return 0; -} - -// C++ to Python conversion for type 'const std::list > &'. -static PyObject* conststd_list_std_pair_QString_QString__REF_CppToPython_conststd_list_std_pair_QString_QString__REF(const void* cppIn) { - ::std::list >& cppInRef = *((::std::list >*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list >::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::std::pair cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void conststd_list_std_pair_QString_QString__REF_PythonToCpp_conststd_list_std_pair_QString_QString__REF(PyObject* pyIn, void* cppOut) { - ::std::list >& cppOutRef = *((::std::list >*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::std::pair cppItem = ::std::pair(); - Shiboken::Conversions::pythonToCppCopy(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_conststd_list_std_pair_QString_QString__REF_PythonToCpp_conststd_list_std_pair_QString_QString__REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX], pyIn)) - return conststd_list_std_pair_QString_QString__REF_PythonToCpp_conststd_list_std_pair_QString_QString__REF; - return 0; -} - -// C++ to Python conversion for type 'std::list *'. -static PyObject* std_list_TrackPTR_PTR_CppToPython_std_list_TrackPTR_PTR(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::Track* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_TrackPTR_PTR_PythonToCpp_std_list_TrackPTR_PTR(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::Track* cppItem = ((::Track*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_TrackPTR_PTR_PythonToCpp_std_list_TrackPTR_PTR_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_TRACK_IDX], pyIn)) - return std_list_TrackPTR_PTR_PythonToCpp_std_list_TrackPTR_PTR; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* std_list_ParamPTR__CppToPython_std_list_ParamPTR_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::Param* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_ParamPTR__PythonToCpp_std_list_ParamPTR_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::Param* cppItem = ((::Param*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_ParamPTR__PythonToCpp_std_list_ParamPTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_PARAM_IDX], pyIn)) - return std_list_ParamPTR__PythonToCpp_std_list_ParamPTR_; - return 0; -} - -// C++ to Python conversion for type 'std::list *'. -static PyObject* std_list_double_PTR_CppToPython_std_list_double_PTR(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - double cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_double_PTR_PythonToCpp_std_list_double_PTR(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - double cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_double_PTR_PythonToCpp_std_list_double_PTR_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return std_list_double_PTR_PythonToCpp_std_list_double_PTR; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* std_list_ItemBasePTR__CppToPython_std_list_ItemBasePTR_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::ItemBase* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_ItemBasePTR__PythonToCpp_std_list_ItemBasePTR_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::ItemBase* cppItem = ((::ItemBase*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_ItemBasePTR__PythonToCpp_std_list_ItemBasePTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_ITEMBASE_IDX], pyIn)) - return std_list_ItemBasePTR__PythonToCpp_std_list_ItemBasePTR_; - return 0; -} - -// C++ to Python conversion for type 'const std::vector &'. -static PyObject* conststd_vector_double_REF_CppToPython_conststd_vector_double_REF(const void* cppIn) { - ::std::vector& cppInRef = *((::std::vector*)cppIn); - - // TEMPLATE - stdVectorToPyList - START - ::std::vector::size_type vectorSize = cppInRef.size(); - PyObject* pyOut = PyList_New((int) vectorSize); - for (::std::vector::size_type idx = 0; idx < vectorSize; ++idx) { - double cppItem(cppInRef[idx]); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdVectorToPyList - END - -} -static void conststd_vector_double_REF_PythonToCpp_conststd_vector_double_REF(PyObject* pyIn, void* cppOut) { - ::std::vector& cppOutRef = *((::std::vector*)cppOut); - - // TEMPLATE - pySeqToStdVector - START - int vectorSize = PySequence_Size(pyIn); - cppOutRef.reserve(vectorSize); - for (int idx = 0; idx < vectorSize; ++idx) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, idx)); - double cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pySeqToStdVector - END - -} -static PythonToCppFunc is_conststd_vector_double_REF_PythonToCpp_conststd_vector_double_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return conststd_vector_double_REF_PythonToCpp_conststd_vector_double_REF; - return 0; -} - -// C++ to Python conversion for type 'const std::vector &'. -static PyObject* conststd_vector_bool_REF_CppToPython_conststd_vector_bool_REF(const void* cppIn) { - ::std::vector& cppInRef = *((::std::vector*)cppIn); - - // TEMPLATE - stdVectorToPyList - START - ::std::vector::size_type vectorSize = cppInRef.size(); - PyObject* pyOut = PyList_New((int) vectorSize); - for (::std::vector::size_type idx = 0; idx < vectorSize; ++idx) { - bool cppItem(cppInRef[idx]); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdVectorToPyList - END - -} -static void conststd_vector_bool_REF_PythonToCpp_conststd_vector_bool_REF(PyObject* pyIn, void* cppOut) { - ::std::vector& cppOutRef = *((::std::vector*)cppOut); - - // TEMPLATE - pySeqToStdVector - START - int vectorSize = PySequence_Size(pyIn); - cppOutRef.reserve(vectorSize); - for (int idx = 0; idx < vectorSize; ++idx) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, idx)); - bool cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pySeqToStdVector - END - -} -static PythonToCppFunc is_conststd_vector_bool_REF_PythonToCpp_conststd_vector_bool_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return conststd_vector_bool_REF_PythonToCpp_conststd_vector_bool_REF; - return 0; -} - -// C++ to Python conversion for type 'const std::vector &'. -static PyObject* conststd_vector_int_REF_CppToPython_conststd_vector_int_REF(const void* cppIn) { - ::std::vector& cppInRef = *((::std::vector*)cppIn); - - // TEMPLATE - stdVectorToPyList - START - ::std::vector::size_type vectorSize = cppInRef.size(); - PyObject* pyOut = PyList_New((int) vectorSize); - for (::std::vector::size_type idx = 0; idx < vectorSize; ++idx) { - int cppItem(cppInRef[idx]); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdVectorToPyList - END - -} -static void conststd_vector_int_REF_PythonToCpp_conststd_vector_int_REF(PyObject* pyIn, void* cppOut) { - ::std::vector& cppOutRef = *((::std::vector*)cppOut); - - // TEMPLATE - pySeqToStdVector - START - int vectorSize = PySequence_Size(pyIn); - cppOutRef.reserve(vectorSize); - for (int idx = 0; idx < vectorSize; ++idx) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, idx)); - int cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pySeqToStdVector - END - -} -static PythonToCppFunc is_conststd_vector_int_REF_PythonToCpp_conststd_vector_int_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return conststd_vector_int_REF_PythonToCpp_conststd_vector_int_REF; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* std_list_EffectPTR__CppToPython_std_list_EffectPTR_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::Effect* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_EffectPTR__PythonToCpp_std_list_EffectPTR_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::Effect* cppItem = ((::Effect*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_EffectPTR__PythonToCpp_std_list_EffectPTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_EFFECT_IDX], pyIn)) - return std_list_EffectPTR__PythonToCpp_std_list_EffectPTR_; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* std_list_ImageLayer__CppToPython_std_list_ImageLayer_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::ImageLayer cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_ImageLayer__PythonToCpp_std_list_ImageLayer_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::ImageLayer cppItem = ::ImageLayer(::QString(), ::QString(), ::QStringList()); - Shiboken::Conversions::pythonToCppCopy((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_ImageLayer__PythonToCpp_std_list_ImageLayer__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes((SbkObjectType*)SbkNatronEngineTypes[SBK_IMAGELAYER_IDX], pyIn)) - return std_list_ImageLayer__PythonToCpp_std_list_ImageLayer_; - return 0; -} - -// C++ to Python conversion for type 'const std::map &'. -static PyObject* conststd_map_QString_NodeCreationPropertyPTR_REF_CppToPython_conststd_map_QString_NodeCreationPropertyPTR_REF(const void* cppIn) { - ::std::map& cppInRef = *((::std::map*)cppIn); - - // TEMPLATE - stdMapToPyDict - START - PyObject* pyOut = PyDict_New(); - ::std::map::const_iterator it = cppInRef.begin(); - for (; it != cppInRef.end(); ++it) { - ::QString key = it->first; - ::NodeCreationProperty* value = it->second; - PyObject* pyKey = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &key); - PyObject* pyValue = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX], value); - PyDict_SetItem(pyOut, pyKey, pyValue); - Py_DECREF(pyKey); - Py_DECREF(pyValue); - } - return pyOut; - // TEMPLATE - stdMapToPyDict - END - -} -static void conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp_conststd_map_QString_NodeCreationPropertyPTR_REF(PyObject* pyIn, void* cppOut) { - ::std::map& cppOutRef = *((::std::map*)cppOut); - - // TEMPLATE - pyDictToStdMap - START - PyObject* key; - PyObject* value; - Py_ssize_t pos = 0; - while (PyDict_Next(pyIn, &pos, &key, &value)) { - ::QString cppKey = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey)); - ::NodeCreationProperty* cppValue = ((::NodeCreationProperty*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX], value, &(cppValue)); - cppOutRef.insert(std::make_pair(cppKey, cppValue)); - } - // TEMPLATE - pyDictToStdMap - END - -} -static PythonToCppFunc is_conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp_conststd_map_QString_NodeCreationPropertyPTR_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleDictTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SBK_CONVERTER(SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX]), true, pyIn)) - return conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp_conststd_map_QString_NodeCreationPropertyPTR_REF; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* std_list_QString__CppToPython_std_list_QString_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QString cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void std_list_QString__PythonToCpp_std_list_QString_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QString cppItem = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_std_list_QString__PythonToCpp_std_list_QString__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn)) - return std_list_QString__PythonToCpp_std_list_QString_; - return 0; -} - -// C++ to Python conversion for type 'const std::list &'. -static PyObject* conststd_list_int_REF_CppToPython_conststd_list_int_REF(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - int cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void conststd_list_int_REF_PythonToCpp_conststd_list_int_REF(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - int cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is_conststd_list_int_REF_PythonToCpp_conststd_list_int_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return conststd_list_int_REF_PythonToCpp_conststd_list_int_REF; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QVariant__CppToPython__QList_QVariant_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QVariant cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QVariant__PythonToCpp__QList_QVariant_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QVariant cppItem = ::QVariant(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyIn)) - return _QList_QVariant__PythonToCpp__QList_QVariant_; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QString__CppToPython__QList_QString_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QString cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QString__PythonToCpp__QList_QString_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QString cppItem = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QString__PythonToCpp__QList_QString__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn)) - return _QList_QString__PythonToCpp__QList_QString_; - return 0; -} - -// C++ to Python conversion for type 'QMap'. -static PyObject* _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_(const void* cppIn) { - ::QMap& cppInRef = *((::QMap*)cppIn); - - // TEMPLATE - cppmap_to_pymap_conversion - START - PyObject* pyOut = PyDict_New(); - ::QMap::const_iterator it = cppInRef.begin(); - for (; it != cppInRef.end(); ++it) { - ::QString key = it.key(); - ::QVariant value = it.value(); - PyObject* pyKey = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &key); - PyObject* pyValue = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], &value); - PyDict_SetItem(pyOut, pyKey, pyValue); - Py_DECREF(pyKey); - Py_DECREF(pyValue); - } - return pyOut; - // TEMPLATE - cppmap_to_pymap_conversion - END - -} -static void _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_(PyObject* pyIn, void* cppOut) { - ::QMap& cppOutRef = *((::QMap*)cppOut); - - // TEMPLATE - pydict_to_cppmap_conversion - START - PyObject* key; - PyObject* value; - Py_ssize_t pos = 0; - while (PyDict_Next(pyIn, &pos, &key, &value)) { - ::QString cppKey = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey)); - ::QVariant cppValue = ::QVariant(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], value, &(cppValue)); - cppOutRef.insert(cppKey, cppValue); - } - // TEMPLATE - pydict_to_cppmap_conversion - END - -} -static PythonToCppFunc is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleDictTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], false, pyIn)) - return _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_; - return 0; -} - - -#if defined _WIN32 || defined __CYGWIN__ - #define SBK_EXPORT_MODULE __declspec(dllexport) -#elif __GNUC__ >= 4 - #define SBK_EXPORT_MODULE __attribute__ ((visibility("default"))) -#else - #define SBK_EXPORT_MODULE -#endif - -#ifdef IS_PY3K -static struct PyModuleDef moduledef = { - /* m_base */ PyModuleDef_HEAD_INIT, - /* m_name */ "NatronEngine", - /* m_doc */ 0, - /* m_size */ -1, - /* m_methods */ NatronEngine_methods, - /* m_reload */ 0, - /* m_traverse */ 0, - /* m_clear */ 0, - /* m_free */ 0 -}; - -#endif -SBK_MODULE_INIT_FUNCTION_BEGIN(NatronEngine) - { - Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide.QtCore")); - if (requiredModule.isNull()) - return SBK_MODULE_INIT_ERROR; - SbkPySide_QtCoreTypes = Shiboken::Module::getTypes(requiredModule); - SbkPySide_QtCoreTypeConverters = Shiboken::Module::getTypeConverters(requiredModule); - } - - // Create an array of wrapper types for the current module. - static PyTypeObject* cppApi[SBK_NatronEngine_IDX_COUNT]; - SbkNatronEngineTypes = cppApi; - - // Create an array of primitive type converters for the current module. - static SbkConverter* sbkConverters[SBK_NatronEngine_CONVERTERS_IDX_COUNT]; - SbkNatronEngineTypeConverters = sbkConverters; - -#ifdef IS_PY3K - PyObject* module = Shiboken::Module::create("NatronEngine", &moduledef); -#else - PyObject* module = Shiboken::Module::create("NatronEngine", NatronEngine_methods); -#endif - - // Initialize classes in the type system - init_RectD(module); - init_ExprUtils(module); - init_PyCoreApplication(module); - init_Group(module); - init_App(module); - init_AppSettings(module); - init_NodeCreationProperty(module); - init_StringNodeCreationProperty(module); - init_IntNodeCreationProperty(module); - init_BoolNodeCreationProperty(module); - init_FloatNodeCreationProperty(module); - init_ItemBase(module); - init_Layer(module); - init_BezierCurve(module); - init_Roto(module); - init_Track(module); - init_Tracker(module); - init_ImageLayer(module); - init_UserParamHolder(module); - init_Effect(module); - init_Param(module); - init_GroupParam(module); - init_AnimatedParam(module); - init_StringParamBase(module); - init_FileParam(module); - init_OutputFileParam(module); - init_PathParam(module); - init_StringParam(module); - init_IntParam(module); - init_Int2DParam(module); - init_Int3DParam(module); - init_DoubleParam(module); - init_Double2DParam(module); - init_Double3DParam(module); - init_ColorParam(module); - init_ChoiceParam(module); - init_BooleanParam(module); - init_PageParam(module); - init_ButtonParam(module); - init_ParametricParam(module); - init_SeparatorParam(module); - init_Int2DTuple(module); - init_Int3DTuple(module); - init_Double2DTuple(module); - init_Double3DTuple(module); - init_ColorTuple(module); - init_RectI(module); - init_NATRON_NAMESPACE(module); - - // Register converter for type 'NatronEngine.std::size_t'. - SbkNatronEngineTypeConverters[SBK_STD_SIZE_T_IDX] = Shiboken::Conversions::createConverter(&PyLong_Type, std_size_t_CppToPython_std_size_t); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_STD_SIZE_T_IDX], "std::size_t"); - // Add user defined implicit conversions to type converter. - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_STD_SIZE_T_IDX], - PyLong_PythonToCpp_std_size_t, - is_PyLong_PythonToCpp_std_size_t_Convertible); - - - // Register converter for type 'std::vector'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_RECTI_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_vector_RectI__CppToPython_std_vector_RectI_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_RECTI_IDX], "std::vector"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_RECTI_IDX], - std_vector_RectI__PythonToCpp_std_vector_RectI_, - is_std_vector_RectI__PythonToCpp_std_vector_RectI__Convertible); - - // Register converter for type 'std::vector'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_vector_std_string__CppToPython_std_vector_std_string_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], "std::vector"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], - std_vector_std_string__PythonToCpp_std_vector_std_string_, - is_std_vector_std_string__PythonToCpp_std_vector_std_string__Convertible); - - // Register converter for type 'std::list>*'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_VECTOR_STD_STRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_std_vector_std_string__PTR_CppToPython_std_list_std_vector_std_string__PTR); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_VECTOR_STD_STRING_IDX], "std::list>*"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_VECTOR_STD_STRING_IDX], - std_list_std_vector_std_string__PTR_PythonToCpp_std_list_std_vector_std_string__PTR, - is_std_list_std_vector_std_string__PTR_PythonToCpp_std_list_std_vector_std_string__PTR_Convertible); - - // Register converter for type 'std::pair'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_pair_QString_QString__CppToPython_std_pair_QString_QString_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX], "std::pair"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX], - std_pair_QString_QString__PythonToCpp_std_pair_QString_QString_, - is_std_pair_QString_QString__PythonToCpp_std_pair_QString_QString__Convertible); - - // Register converter for type 'const std::list>&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, conststd_list_std_pair_QString_QString__REF_CppToPython_conststd_list_std_pair_QString_QString__REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX], "const std::list>&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX], "std::list>"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX], - conststd_list_std_pair_QString_QString__REF_PythonToCpp_conststd_list_std_pair_QString_QString__REF, - is_conststd_list_std_pair_QString_QString__REF_PythonToCpp_conststd_list_std_pair_QString_QString__REF_Convertible); - - // Register converter for type 'std::list*'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_TRACKPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_TrackPTR_PTR_CppToPython_std_list_TrackPTR_PTR); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_TRACKPTR_IDX], "std::list*"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_TRACKPTR_IDX], - std_list_TrackPTR_PTR_PythonToCpp_std_list_TrackPTR_PTR, - is_std_list_TrackPTR_PTR_PythonToCpp_std_list_TrackPTR_PTR_Convertible); - - // Register converter for type 'std::list'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_PARAMPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_ParamPTR__CppToPython_std_list_ParamPTR_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_PARAMPTR_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_PARAMPTR_IDX], - std_list_ParamPTR__PythonToCpp_std_list_ParamPTR_, - is_std_list_ParamPTR__PythonToCpp_std_list_ParamPTR__Convertible); - - // Register converter for type 'std::list*'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_DOUBLE_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_double_PTR_CppToPython_std_list_double_PTR); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_DOUBLE_IDX], "std::list*"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_DOUBLE_IDX], - std_list_double_PTR_PythonToCpp_std_list_double_PTR, - is_std_list_double_PTR_PythonToCpp_std_list_double_PTR_Convertible); - - // Register converter for type 'std::list'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_ITEMBASEPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_ItemBasePTR__CppToPython_std_list_ItemBasePTR_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_ITEMBASEPTR_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_ITEMBASEPTR_IDX], - std_list_ItemBasePTR__PythonToCpp_std_list_ItemBasePTR_, - is_std_list_ItemBasePTR__PythonToCpp_std_list_ItemBasePTR__Convertible); - - // Register converter for type 'const std::vector&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, conststd_vector_double_REF_CppToPython_conststd_vector_double_REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], "const std::vector&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], "std::vector"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX], - conststd_vector_double_REF_PythonToCpp_conststd_vector_double_REF, - is_conststd_vector_double_REF_PythonToCpp_conststd_vector_double_REF_Convertible); - - // Register converter for type 'const std::vector&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, conststd_vector_bool_REF_CppToPython_conststd_vector_bool_REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], "const std::vector&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], "std::vector"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX], - conststd_vector_bool_REF_PythonToCpp_conststd_vector_bool_REF, - is_conststd_vector_bool_REF_PythonToCpp_conststd_vector_bool_REF_Convertible); - - // Register converter for type 'const std::vector&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, conststd_vector_int_REF_CppToPython_conststd_vector_int_REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], "const std::vector&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], "std::vector"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_INT_IDX], - conststd_vector_int_REF_PythonToCpp_conststd_vector_int_REF, - is_conststd_vector_int_REF_PythonToCpp_conststd_vector_int_REF_Convertible); - - // Register converter for type 'std::list'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_EFFECTPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_EffectPTR__CppToPython_std_list_EffectPTR_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_EFFECTPTR_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_EFFECTPTR_IDX], - std_list_EffectPTR__PythonToCpp_std_list_EffectPTR_, - is_std_list_EffectPTR__PythonToCpp_std_list_EffectPTR__Convertible); - - // Register converter for type 'std::list'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_IMAGELAYER_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_ImageLayer__CppToPython_std_list_ImageLayer_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_IMAGELAYER_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_IMAGELAYER_IDX], - std_list_ImageLayer__PythonToCpp_std_list_ImageLayer_, - is_std_list_ImageLayer__PythonToCpp_std_list_ImageLayer__Convertible); - - // Register converter for type 'const std::map&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, conststd_map_QString_NodeCreationPropertyPTR_REF_CppToPython_conststd_map_QString_NodeCreationPropertyPTR_REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], "const std::map&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], "std::map"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], - conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp_conststd_map_QString_NodeCreationPropertyPTR_REF, - is_conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp_conststd_map_QString_NodeCreationPropertyPTR_REF_Convertible); - - // Register converter for type 'std::list'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, std_list_QString__CppToPython_std_list_QString_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_QSTRING_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_QSTRING_IDX], - std_list_QString__PythonToCpp_std_list_QString_, - is_std_list_QString__PythonToCpp_std_list_QString__Convertible); - - // Register converter for type 'const std::list&'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_INT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, conststd_list_int_REF_CppToPython_conststd_list_int_REF); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_INT_IDX], "const std::list&"); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_INT_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_INT_IDX], - conststd_list_int_REF_PythonToCpp_conststd_list_int_REF, - is_conststd_list_int_REF_PythonToCpp_conststd_list_int_REF_Convertible); - - // Register converter for type 'QList'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QVariant__CppToPython__QList_QVariant_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QVARIANT_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QVARIANT_IDX], - _QList_QVariant__PythonToCpp__QList_QVariant_, - is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible); - - // Register converter for type 'QList'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QString__CppToPython__QList_QString_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QSTRING_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QLIST_QSTRING_IDX], - _QList_QString__PythonToCpp__QList_QString_, - is__QList_QString__PythonToCpp__QList_QString__Convertible); - - // Register converter for type 'QMap'. - SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QMAP_QSTRING_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_); - Shiboken::Conversions::registerConverterName(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QMAP_QSTRING_QVARIANT_IDX], "QMap"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_QMAP_QSTRING_QVARIANT_IDX], - _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_, - is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible); - - // Register primitive types converters. - - Shiboken::Module::registerTypes(module, SbkNatronEngineTypes); - Shiboken::Module::registerTypeConverters(module, SbkNatronEngineTypeConverters); - - if (PyErr_Occurred()) { - PyErr_Print(); - Py_FatalError("can't initialize module NatronEngine"); - } - PySide::registerCleanupFunction(cleanTypesAttributes); -SBK_MODULE_INIT_FUNCTION_END diff --git a/Engine/Qt4/NatronEngine/natronengine_python.h b/Engine/Qt4/NatronEngine/natronengine_python.h deleted file mode 100644 index b414cc720f..0000000000 --- a/Engine/Qt4/NatronEngine/natronengine_python.h +++ /dev/null @@ -1,231 +0,0 @@ - - -#ifndef SBK_NATRONENGINE_PYTHON_H -#define SBK_NATRONENGINE_PYTHON_H - -#include -#include -#include -#include -#include -#include - -#include -// Module Includes -CLANG_DIAG_OFF(deprecated) -CLANG_DIAG_OFF(uninitialized) -CLANG_DIAG_OFF(keyword-macro) -#include // produces warnings -CLANG_DIAG_ON(deprecated) -CLANG_DIAG_ON(uninitialized) -CLANG_DIAG_ON(keyword-macro) - -// Binded library includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// Conversion Includes - Primitive Types -#include -#include -#include -#include -#include -#include - -// Conversion Includes - Container Types -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Type indices -#define SBK_NATRON_NAMESPACE_IDX 30 -#define SBK_NATRON_NAMESPACE_STATUSENUM_IDX 41 -#define SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX 40 -#define SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX 52 -#define SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX 35 -#define SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX 38 -#define SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX 42 -#define SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX 31 -#define SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX 34 -#define SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX 44 -#define SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX 43 -#define SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX 33 -#define SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX 37 -#define SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX 39 -#define SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX 32 -#define SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX 36 -#define SBK_PARAM_IDX 48 -#define SBK_USERPARAMHOLDER_IDX 63 -#define SBK_IMAGELAYER_IDX 21 -#define SBK_TRACKER_IDX 62 -#define SBK_TRACK_IDX 61 -#define SBK_GROUP_IDX 19 -#define SBK_EFFECT_IDX 15 -#define SBK_RECTD_IDX 53 -#define SBK_RECTI_IDX 54 -#define SBK_PARAMETRICPARAM_IDX 49 -#define SBK_PAGEPARAM_IDX 47 -#define SBK_GROUPPARAM_IDX 20 -#define SBK_SEPARATORPARAM_IDX 56 -#define SBK_BUTTONPARAM_IDX 6 -#define SBK_COLORTUPLE_IDX 9 -#define SBK_DOUBLE3DTUPLE_IDX 13 -#define SBK_DOUBLE2DTUPLE_IDX 11 -#define SBK_INT3DTUPLE_IDX 25 -#define SBK_INT2DTUPLE_IDX 23 -#define SBK_ANIMATEDPARAM_IDX 0 -#define SBK_BOOLEANPARAM_IDX 5 -#define SBK_CHOICEPARAM_IDX 7 -#define SBK_COLORPARAM_IDX 8 -#define SBK_DOUBLEPARAM_IDX 14 -#define SBK_DOUBLE2DPARAM_IDX 10 -#define SBK_DOUBLE3DPARAM_IDX 12 -#define SBK_INTPARAM_IDX 27 -#define SBK_INT2DPARAM_IDX 22 -#define SBK_INT3DPARAM_IDX 24 -#define SBK_STRINGPARAMBASE_IDX 60 -#define SBK_PATHPARAM_IDX 50 -#define SBK_OUTPUTFILEPARAM_IDX 46 -#define SBK_FILEPARAM_IDX 17 -#define SBK_STRINGPARAM_IDX 58 -#define SBK_STRINGPARAM_TYPEENUM_IDX 59 -#define SBK_PYCOREAPPLICATION_IDX 51 -#define SBK_ROTO_IDX 55 -#define SBK_ITEMBASE_IDX 28 -#define SBK_BEZIERCURVE_IDX 3 -#define SBK_LAYER_IDX 29 -#define SBK_APP_IDX 1 -#define SBK_NODECREATIONPROPERTY_IDX 45 -#define SBK_STRINGNODECREATIONPROPERTY_IDX 57 -#define SBK_FLOATNODECREATIONPROPERTY_IDX 18 -#define SBK_BOOLNODECREATIONPROPERTY_IDX 4 -#define SBK_INTNODECREATIONPROPERTY_IDX 26 -#define SBK_APPSETTINGS_IDX 2 -#define SBK_EXPRUTILS_IDX 16 -#define SBK_NatronEngine_IDX_COUNT 64 - -// This variable stores all Python types exported by this module. -extern PyTypeObject** SbkNatronEngineTypes; - -// This variable stores all type converters exported by this module. -extern SbkConverter** SbkNatronEngineTypeConverters; - -// Converter indices -#define SBK_STD_SIZE_T_IDX 0 -#define SBK_NATRONENGINE_STD_LIST_TRACKPTR_IDX 1 // std::list * -#define SBK_NATRONENGINE_STD_LIST_PARAMPTR_IDX 2 // std::list -#define SBK_NATRONENGINE_STD_LIST_EFFECTPTR_IDX 3 // std::list -#define SBK_NATRONENGINE_STD_LIST_IMAGELAYER_IDX 4 // std::list -#define SBK_NATRONENGINE_STD_VECTOR_RECTI_IDX 5 // std::vector -#define SBK_NATRONENGINE_STD_PAIR_QSTRING_QSTRING_IDX 6 // std::pair -#define SBK_NATRONENGINE_STD_LIST_STD_PAIR_QSTRING_QSTRING_IDX 7 // const std::list > & -#define SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX 8 // std::vector -#define SBK_NATRONENGINE_STD_LIST_STD_VECTOR_STD_STRING_IDX 9 // std::list > * -#define SBK_NATRONENGINE_STD_LIST_DOUBLE_IDX 10 // std::list * -#define SBK_NATRONENGINE_STD_LIST_ITEMBASEPTR_IDX 11 // std::list -#define SBK_NATRONENGINE_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX 12 // const std::map & -#define SBK_NATRONENGINE_STD_LIST_QSTRING_IDX 13 // std::list -#define SBK_NATRONENGINE_STD_LIST_INT_IDX 14 // const std::list & -#define SBK_NATRONENGINE_STD_VECTOR_DOUBLE_IDX 15 // const std::vector & -#define SBK_NATRONENGINE_STD_VECTOR_BOOL_IDX 16 // const std::vector & -#define SBK_NATRONENGINE_STD_VECTOR_INT_IDX 17 // const std::vector & -#define SBK_NATRONENGINE_QLIST_QVARIANT_IDX 18 // QList -#define SBK_NATRONENGINE_QLIST_QSTRING_IDX 19 // QList -#define SBK_NATRONENGINE_QMAP_QSTRING_QVARIANT_IDX 20 // QMap -#define SBK_NatronEngine_CONVERTERS_IDX_COUNT 21 - -// Macros for type check - -namespace Shiboken -{ - -// PyType functions, to get the PyObjectType for a type T -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX]; } -template<> inline PyTypeObject* SbkType< ::QFlags >() { return SbkNatronEngineTypes[SBK_QFLAGS_NATRON_NAMESPACE_STANDARDBUTTONENUM__IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VALUECHANGEDREASONENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ANIMATIONLEVELENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEPREMULTIPLICATIONENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOLORSPACEENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_IMAGEBITDEPTHENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_ORIENTATIONENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_MERGINGFUNCTIONENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_PARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_IMAGELAYER_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_TRACKER_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_TRACK_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_GROUP_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_EFFECT_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_RECTD_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_RECTI_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_PAGEPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_GROUPPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_SEPARATORPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_BUTTONPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_COLORTUPLE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_DOUBLE3DTUPLE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_DOUBLE2DTUPLE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INT3DTUPLE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INT2DTUPLE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_COLORPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_DOUBLE3DPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INTPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INT2DPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INT3DPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_PATHPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_OUTPUTFILEPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_FILEPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX]; } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_STRINGPARAM_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_ROTO_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_ITEMBASE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_LAYER_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_APP_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_STRINGNODECREATIONPROPERTY_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_FLOATNODECREATIONPROPERTY_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_BOOLNODECREATIONPROPERTY_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_INTNODECREATIONPROPERTY_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_APPSETTINGS_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronEngineTypes[SBK_EXPRUTILS_IDX]); } - -} // namespace Shiboken - -#endif // SBK_NATRONENGINE_PYTHON_H - diff --git a/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.cpp b/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.cpp deleted file mode 100644 index 6d81a395b1..0000000000 --- a/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.cpp +++ /dev/null @@ -1,193 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "nodecreationproperty_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - -// Native --------------------------------------------------------- - -void NodeCreationPropertyWrapper::pysideInitQtMetaTypes() -{ -} - -NodeCreationPropertyWrapper::NodeCreationPropertyWrapper() : NodeCreationProperty() { - // ... middle -} - -NodeCreationPropertyWrapper::~NodeCreationPropertyWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_NodeCreationProperty_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::NodeCreationProperty >())) - return -1; - - ::NodeCreationPropertyWrapper* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // NodeCreationProperty() - cptr = new ::NodeCreationPropertyWrapper(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::NodeCreationProperty >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyMethodDef Sbk_NodeCreationProperty_methods[] = { - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_NodeCreationProperty_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_NodeCreationProperty_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_NodeCreationProperty_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.NodeCreationProperty", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_NodeCreationProperty_traverse, - /*tp_clear*/ Sbk_NodeCreationProperty_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_NodeCreationProperty_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_NodeCreationProperty_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void NodeCreationProperty_PythonToCpp_NodeCreationProperty_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_NodeCreationProperty_Type, pyIn, cppOut); -} -static PythonToCppFunc is_NodeCreationProperty_PythonToCpp_NodeCreationProperty_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_NodeCreationProperty_Type)) - return NodeCreationProperty_PythonToCpp_NodeCreationProperty_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* NodeCreationProperty_PTR_CppToPython_NodeCreationProperty(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::NodeCreationProperty*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_NodeCreationProperty_Type, const_cast(cppIn), false, false, typeName); -} - -void init_NodeCreationProperty(PyObject* module) -{ - SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX] = reinterpret_cast(&Sbk_NodeCreationProperty_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "NodeCreationProperty", "NodeCreationProperty*", - &Sbk_NodeCreationProperty_Type, &Shiboken::callCppDestructor< ::NodeCreationProperty >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_NodeCreationProperty_Type, - NodeCreationProperty_PythonToCpp_NodeCreationProperty_PTR, - is_NodeCreationProperty_PythonToCpp_NodeCreationProperty_PTR_Convertible, - NodeCreationProperty_PTR_CppToPython_NodeCreationProperty); - - Shiboken::Conversions::registerConverterName(converter, "NodeCreationProperty"); - Shiboken::Conversions::registerConverterName(converter, "NodeCreationProperty*"); - Shiboken::Conversions::registerConverterName(converter, "NodeCreationProperty&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::NodeCreationProperty).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::NodeCreationPropertyWrapper).name()); - - - - NodeCreationPropertyWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.h b/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.h deleted file mode 100644 index c6c3f4e7d6..0000000000 --- a/Engine/Qt4/NatronEngine/nodecreationproperty_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_NODECREATIONPROPERTYWRAPPER_H -#define SBK_NODECREATIONPROPERTYWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class NodeCreationPropertyWrapper : public NodeCreationProperty -{ -public: - NodeCreationPropertyWrapper(); - virtual ~NodeCreationPropertyWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_NODECREATIONPROPERTYWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/outputfileparam_wrapper.cpp b/Engine/Qt4/NatronEngine/outputfileparam_wrapper.cpp deleted file mode 100644 index 54ea59c360..0000000000 --- a/Engine/Qt4/NatronEngine/outputfileparam_wrapper.cpp +++ /dev/null @@ -1,236 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "outputfileparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void OutputFileParamWrapper::pysideInitQtMetaTypes() -{ -} - -OutputFileParamWrapper::~OutputFileParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_OutputFileParamFunc_openFile(PyObject* self) -{ - OutputFileParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (OutputFileParamWrapper*)((::OutputFileParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_OUTPUTFILEPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // openFile() - cppSelf->openFile(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_OutputFileParamFunc_setSequenceEnabled(PyObject* self, PyObject* pyArg) -{ - OutputFileParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (OutputFileParamWrapper*)((::OutputFileParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_OUTPUTFILEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setSequenceEnabled(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setSequenceEnabled(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_OutputFileParamFunc_setSequenceEnabled_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setSequenceEnabled(bool) - cppSelf->setSequenceEnabled(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_OutputFileParamFunc_setSequenceEnabled_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.OutputFileParam.setSequenceEnabled", overloads); - return 0; -} - -static PyMethodDef Sbk_OutputFileParam_methods[] = { - {"openFile", (PyCFunction)Sbk_OutputFileParamFunc_openFile, METH_NOARGS}, - {"setSequenceEnabled", (PyCFunction)Sbk_OutputFileParamFunc_setSequenceEnabled, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_OutputFileParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_OutputFileParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_OutputFileParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.OutputFileParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_OutputFileParam_traverse, - /*tp_clear*/ Sbk_OutputFileParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_OutputFileParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_OutputFileParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::OutputFileParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void OutputFileParam_PythonToCpp_OutputFileParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_OutputFileParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_OutputFileParam_PythonToCpp_OutputFileParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_OutputFileParam_Type)) - return OutputFileParam_PythonToCpp_OutputFileParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* OutputFileParam_PTR_CppToPython_OutputFileParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::OutputFileParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_OutputFileParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_OutputFileParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_OUTPUTFILEPARAM_IDX] = reinterpret_cast(&Sbk_OutputFileParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "OutputFileParam", "OutputFileParam*", - &Sbk_OutputFileParam_Type, &Shiboken::callCppDestructor< ::OutputFileParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_OutputFileParam_Type, - OutputFileParam_PythonToCpp_OutputFileParam_PTR, - is_OutputFileParam_PythonToCpp_OutputFileParam_PTR_Convertible, - OutputFileParam_PTR_CppToPython_OutputFileParam); - - Shiboken::Conversions::registerConverterName(converter, "OutputFileParam"); - Shiboken::Conversions::registerConverterName(converter, "OutputFileParam*"); - Shiboken::Conversions::registerConverterName(converter, "OutputFileParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::OutputFileParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::OutputFileParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_OutputFileParam_Type, &Sbk_OutputFileParam_typeDiscovery); - - - OutputFileParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/outputfileparam_wrapper.h b/Engine/Qt4/NatronEngine/outputfileparam_wrapper.h deleted file mode 100644 index 49a1ef3ee7..0000000000 --- a/Engine/Qt4/NatronEngine/outputfileparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_OUTPUTFILEPARAMWRAPPER_H -#define SBK_OUTPUTFILEPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class OutputFileParamWrapper : public OutputFileParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { OutputFileParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~OutputFileParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_OUTPUTFILEPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/pageparam_wrapper.cpp b/Engine/Qt4/NatronEngine/pageparam_wrapper.cpp deleted file mode 100644 index 541752f70c..0000000000 --- a/Engine/Qt4/NatronEngine/pageparam_wrapper.cpp +++ /dev/null @@ -1,214 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "pageparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void PageParamWrapper::pysideInitQtMetaTypes() -{ -} - -PageParamWrapper::~PageParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_PageParamFunc_addParam(PyObject* self, PyObject* pyArg) -{ - PageParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PageParamWrapper*)((::PageParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PAGEPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addParam(const Param*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArg)))) { - overloadId = 0; // addParam(const Param*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PageParamFunc_addParam_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::Param* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addParam(const Param*) - cppSelf->addParam(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PageParamFunc_addParam_TypeError: - const char* overloads[] = {"NatronEngine.Param", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PageParam.addParam", overloads); - return 0; -} - -static PyMethodDef Sbk_PageParam_methods[] = { - {"addParam", (PyCFunction)Sbk_PageParamFunc_addParam, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PageParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PageParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PageParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.PageParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PageParam_traverse, - /*tp_clear*/ Sbk_PageParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PageParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_PageParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::PageParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PageParam_PythonToCpp_PageParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PageParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PageParam_PythonToCpp_PageParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PageParam_Type)) - return PageParam_PythonToCpp_PageParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PageParam_PTR_CppToPython_PageParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PageParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PageParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PageParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_PAGEPARAM_IDX] = reinterpret_cast(&Sbk_PageParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PageParam", "PageParam*", - &Sbk_PageParam_Type, &Shiboken::callCppDestructor< ::PageParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PageParam_Type, - PageParam_PythonToCpp_PageParam_PTR, - is_PageParam_PythonToCpp_PageParam_PTR_Convertible, - PageParam_PTR_CppToPython_PageParam); - - Shiboken::Conversions::registerConverterName(converter, "PageParam"); - Shiboken::Conversions::registerConverterName(converter, "PageParam*"); - Shiboken::Conversions::registerConverterName(converter, "PageParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PageParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PageParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_PageParam_Type, &Sbk_PageParam_typeDiscovery); - - - PageParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/pageparam_wrapper.h b/Engine/Qt4/NatronEngine/pageparam_wrapper.h deleted file mode 100644 index b770c85678..0000000000 --- a/Engine/Qt4/NatronEngine/pageparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PAGEPARAMWRAPPER_H -#define SBK_PAGEPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PageParamWrapper : public PageParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { PageParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~PageParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PAGEPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/param_wrapper.cpp b/Engine/Qt4/NatronEngine/param_wrapper.cpp deleted file mode 100644 index 79b91b1a8c..0000000000 --- a/Engine/Qt4/NatronEngine/param_wrapper.cpp +++ /dev/null @@ -1,1661 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "param_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void ParamWrapper::pysideInitQtMetaTypes() -{ -} - -ParamWrapper::~ParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ParamFunc__addAsDependencyOf(PyObject* self, PyObject* args) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "_addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: _addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // _addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc__addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // _addAsDependencyOf(int,Param*,int) - ((::ParamWrapper*) cppSelf)->ParamWrapper::_addAsDependencyOf_protected(cppArg0, cppArg1, cppArg2); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc__addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param._addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_copy(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.copy(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.copy(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:copy", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: copy(Param*,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // copy(Param*,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // copy(Param*,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_copy_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.copy(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ParamFunc_copy_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Param* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = -1; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // copy(Param*,int) - bool cppResult = cppSelf->copy(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_copy_TypeError: - const char* overloads[] = {"NatronEngine.Param, int = -1", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.copy", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_curve(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.curve(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.curve(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:curve", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: curve(double,int)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // curve(double,int)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // curve(double,int)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_curve_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.curve(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ParamFunc_curve_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // curve(double,int)const - double cppResult = const_cast(cppSelf)->curve(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_curve_TypeError: - const char* overloads[] = {"float, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.curve", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_getAddNewLine(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getAddNewLine() - bool cppResult = cppSelf->getAddNewLine(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getCanAnimate(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCanAnimate()const - bool cppResult = const_cast(cppSelf)->getCanAnimate(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getEvaluateOnChange(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getEvaluateOnChange()const - bool cppResult = const_cast(cppSelf)->getEvaluateOnChange(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getHelp(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getHelp()const - QString cppResult = const_cast(cppSelf)->getHelp(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getIsAnimationEnabled(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getIsAnimationEnabled()const - bool cppResult = const_cast(cppSelf)->getIsAnimationEnabled(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getIsEnabled(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.getIsEnabled(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getIsEnabled", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getIsEnabled(int)const - if (numArgs == 0) { - overloadId = 0; // getIsEnabled(int)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // getIsEnabled(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_getIsEnabled_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.getIsEnabled(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ParamFunc_getIsEnabled_TypeError; - } - } - int cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getIsEnabled(int)const - bool cppResult = const_cast(cppSelf)->getIsEnabled(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_getIsEnabled_TypeError: - const char* overloads[] = {"int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.getIsEnabled", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_getIsPersistent(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getIsPersistent()const - bool cppResult = const_cast(cppSelf)->getIsPersistent(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getIsVisible(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getIsVisible()const - bool cppResult = const_cast(cppSelf)->getIsVisible(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getLabel(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getLabel()const - QString cppResult = const_cast(cppSelf)->getLabel(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getNumDimensions(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumDimensions()const - int cppResult = const_cast(cppSelf)->getNumDimensions(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getParent(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParent()const - Param * cppResult = const_cast(cppSelf)->getParent(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getScriptName(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getScriptName()const - QString cppResult = const_cast(cppSelf)->getScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_getTypeName(PyObject* self) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getTypeName()const - QString cppResult = const_cast(cppSelf)->getTypeName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_ParamFunc_random(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.random(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:random", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: random(double,double)const - // 1: random(double,double,double,uint)const - if (numArgs == 0) { - overloadId = 0; // random(double,double)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // random(double,double)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // random(double,double)const - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 1; // random(double,double,double,uint)const - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // random(double,double,double,uint)const - } - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_random_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // random(double min, double max) const - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "min"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.random(): got multiple values for keyword argument 'min'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ParamFunc_random_TypeError; - } - value = PyDict_GetItemString(kwds, "max"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.random(): got multiple values for keyword argument 'max'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ParamFunc_random_TypeError; - } - } - double cppArg0 = 0.; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1 = 1.; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // random(double,double)const - double cppResult = const_cast(cppSelf)->random(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // random(double min, double max, double time, unsigned int seed) const - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "seed"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.random(): got multiple values for keyword argument 'seed'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ParamFunc_random_TypeError; - } - } - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - unsigned int cppArg3 = 0; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // random(double,double,double,uint)const - double cppResult = const_cast(cppSelf)->random(cppArg0, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_random_TypeError: - const char* overloads[] = {"float = 0., float = 1.", "float, float, float, unsigned int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.random", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_randomInt(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.randomInt(): too many arguments"); - return 0; - } else if (numArgs < 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.randomInt(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOO:randomInt", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: randomInt(int,int) - // 1: randomInt(int,int,double,uint)const - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // randomInt(int,int) - } else if ((pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 1; // randomInt(int,int,double,uint)const - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // randomInt(int,int,double,uint)const - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_randomInt_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // randomInt(int min, int max) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // randomInt(int,int) - int cppResult = cppSelf->randomInt(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // randomInt(int min, int max, double time, unsigned int seed) const - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "seed"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.randomInt(): got multiple values for keyword argument 'seed'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_ParamFunc_randomInt_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - unsigned int cppArg3 = 0; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // randomInt(int,int,double,uint)const - int cppResult = const_cast(cppSelf)->randomInt(cppArg0, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_randomInt_TypeError: - const char* overloads[] = {"int, int", "int, int, float, unsigned int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.randomInt", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setAddNewLine(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setAddNewLine(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setAddNewLine(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setAddNewLine_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setAddNewLine(bool) - cppSelf->setAddNewLine(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setAddNewLine_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setAddNewLine", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setAnimationEnabled(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setAnimationEnabled(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setAnimationEnabled(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setAnimationEnabled_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setAnimationEnabled(bool) - cppSelf->setAnimationEnabled(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setAnimationEnabled_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setAnimationEnabled", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setAsAlias(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setAsAlias(Param*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArg)))) { - overloadId = 0; // setAsAlias(Param*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setAsAlias_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::Param* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setAsAlias(Param*) - bool cppResult = cppSelf->setAsAlias(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_setAsAlias_TypeError: - const char* overloads[] = {"NatronEngine.Param", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setAsAlias", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setEnabled(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.setEnabled(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.setEnabled(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setEnabled", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setEnabled(bool,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setEnabled(bool,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setEnabled(bool,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setEnabled_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "dimension"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.setEnabled(): got multiple values for keyword argument 'dimension'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_ParamFunc_setEnabled_TypeError; - } - } - bool cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setEnabled(bool,int) - cppSelf->setEnabled(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setEnabled_TypeError: - const char* overloads[] = {"bool, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.setEnabled", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setEnabledByDefault(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.setEnabledByDefault(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:setEnabledByDefault", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: setEnabledByDefault(bool) - if (numArgs == 0) { - overloadId = 0; // setEnabledByDefault(bool) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // setEnabledByDefault(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setEnabledByDefault_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "enabled"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.Param.setEnabledByDefault(): got multiple values for keyword argument 'enabled'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_ParamFunc_setEnabledByDefault_TypeError; - } - } - bool cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // setEnabledByDefault(bool) - cppSelf->setEnabledByDefault(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setEnabledByDefault_TypeError: - const char* overloads[] = {"bool = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.setEnabledByDefault", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setEvaluateOnChange(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setEvaluateOnChange(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setEvaluateOnChange(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setEvaluateOnChange_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setEvaluateOnChange(bool) - cppSelf->setEvaluateOnChange(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setEvaluateOnChange_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setEvaluateOnChange", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setHelp(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setHelp(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setHelp(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setHelp_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setHelp(QString) - cppSelf->setHelp(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setHelp_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setHelp", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setIconFilePath(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setIconFilePath(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setIconFilePath(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setIconFilePath_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setIconFilePath(QString) - cppSelf->setIconFilePath(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setIconFilePath_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setIconFilePath", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setPersistent(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setPersistent(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setPersistent(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setPersistent_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setPersistent(bool) - cppSelf->setPersistent(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setPersistent_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setPersistent", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setVisible(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setVisible(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setVisible(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setVisible_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setVisible(bool) - cppSelf->setVisible(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setVisible_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setVisible", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_setVisibleByDefault(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setVisibleByDefault(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setVisibleByDefault(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_setVisibleByDefault_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setVisibleByDefault(bool) - cppSelf->setVisibleByDefault(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_setVisibleByDefault_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.setVisibleByDefault", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_slaveTo(PyObject* self, PyObject* args) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "slaveTo", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: slaveTo(Param*,int,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // slaveTo(Param*,int,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_slaveTo_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Param* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // slaveTo(Param*,int,int) - bool cppResult = cppSelf->slaveTo(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParamFunc_slaveTo_TypeError: - const char* overloads[] = {"NatronEngine.Param, int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Param.slaveTo", overloads); - return 0; -} - -static PyObject* Sbk_ParamFunc_unslave(PyObject* self, PyObject* pyArg) -{ - ParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParamWrapper*)((::Param*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: unslave(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // unslave(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParamFunc_unslave_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // unslave(int) - cppSelf->unslave(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParamFunc_unslave_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Param.unslave", overloads); - return 0; -} - -static PyMethodDef Sbk_Param_methods[] = { - {"_addAsDependencyOf", (PyCFunction)Sbk_ParamFunc__addAsDependencyOf, METH_VARARGS}, - {"copy", (PyCFunction)Sbk_ParamFunc_copy, METH_VARARGS|METH_KEYWORDS}, - {"curve", (PyCFunction)Sbk_ParamFunc_curve, METH_VARARGS|METH_KEYWORDS}, - {"getAddNewLine", (PyCFunction)Sbk_ParamFunc_getAddNewLine, METH_NOARGS}, - {"getCanAnimate", (PyCFunction)Sbk_ParamFunc_getCanAnimate, METH_NOARGS}, - {"getEvaluateOnChange", (PyCFunction)Sbk_ParamFunc_getEvaluateOnChange, METH_NOARGS}, - {"getHelp", (PyCFunction)Sbk_ParamFunc_getHelp, METH_NOARGS}, - {"getIsAnimationEnabled", (PyCFunction)Sbk_ParamFunc_getIsAnimationEnabled, METH_NOARGS}, - {"getIsEnabled", (PyCFunction)Sbk_ParamFunc_getIsEnabled, METH_VARARGS|METH_KEYWORDS}, - {"getIsPersistent", (PyCFunction)Sbk_ParamFunc_getIsPersistent, METH_NOARGS}, - {"getIsVisible", (PyCFunction)Sbk_ParamFunc_getIsVisible, METH_NOARGS}, - {"getLabel", (PyCFunction)Sbk_ParamFunc_getLabel, METH_NOARGS}, - {"getNumDimensions", (PyCFunction)Sbk_ParamFunc_getNumDimensions, METH_NOARGS}, - {"getParent", (PyCFunction)Sbk_ParamFunc_getParent, METH_NOARGS}, - {"getScriptName", (PyCFunction)Sbk_ParamFunc_getScriptName, METH_NOARGS}, - {"getTypeName", (PyCFunction)Sbk_ParamFunc_getTypeName, METH_NOARGS}, - {"random", (PyCFunction)Sbk_ParamFunc_random, METH_VARARGS|METH_KEYWORDS}, - {"randomInt", (PyCFunction)Sbk_ParamFunc_randomInt, METH_VARARGS|METH_KEYWORDS}, - {"setAddNewLine", (PyCFunction)Sbk_ParamFunc_setAddNewLine, METH_O}, - {"setAnimationEnabled", (PyCFunction)Sbk_ParamFunc_setAnimationEnabled, METH_O}, - {"setAsAlias", (PyCFunction)Sbk_ParamFunc_setAsAlias, METH_O}, - {"setEnabled", (PyCFunction)Sbk_ParamFunc_setEnabled, METH_VARARGS|METH_KEYWORDS}, - {"setEnabledByDefault", (PyCFunction)Sbk_ParamFunc_setEnabledByDefault, METH_VARARGS|METH_KEYWORDS}, - {"setEvaluateOnChange", (PyCFunction)Sbk_ParamFunc_setEvaluateOnChange, METH_O}, - {"setHelp", (PyCFunction)Sbk_ParamFunc_setHelp, METH_O}, - {"setIconFilePath", (PyCFunction)Sbk_ParamFunc_setIconFilePath, METH_O}, - {"setPersistent", (PyCFunction)Sbk_ParamFunc_setPersistent, METH_O}, - {"setVisible", (PyCFunction)Sbk_ParamFunc_setVisible, METH_O}, - {"setVisibleByDefault", (PyCFunction)Sbk_ParamFunc_setVisibleByDefault, METH_O}, - {"slaveTo", (PyCFunction)Sbk_ParamFunc_slaveTo, METH_VARARGS}, - {"unslave", (PyCFunction)Sbk_ParamFunc_unslave, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Param_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Param_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Param_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Param", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Param_traverse, - /*tp_clear*/ Sbk_Param_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Param_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Param_PythonToCpp_Param_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Param_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Param_PythonToCpp_Param_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Param_Type)) - return Param_PythonToCpp_Param_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Param_PTR_CppToPython_Param(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Param*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Param_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Param(PyObject* module) -{ - SbkNatronEngineTypes[SBK_PARAM_IDX] = reinterpret_cast(&Sbk_Param_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Param", "Param*", - &Sbk_Param_Type, &Shiboken::callCppDestructor< ::Param >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Param_Type, - Param_PythonToCpp_Param_PTR, - is_Param_PythonToCpp_Param_PTR_Convertible, - Param_PTR_CppToPython_Param); - - Shiboken::Conversions::registerConverterName(converter, "Param"); - Shiboken::Conversions::registerConverterName(converter, "Param*"); - Shiboken::Conversions::registerConverterName(converter, "Param&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Param).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ParamWrapper).name()); - - - - ParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/param_wrapper.h b/Engine/Qt4/NatronEngine/param_wrapper.h deleted file mode 100644 index 0b4843e5cc..0000000000 --- a/Engine/Qt4/NatronEngine/param_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PARAMWRAPPER_H -#define SBK_PARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ParamWrapper : public Param -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { Param::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~ParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/parametricparam_wrapper.cpp b/Engine/Qt4/NatronEngine/parametricparam_wrapper.cpp deleted file mode 100644 index e003c4e9ea..0000000000 --- a/Engine/Qt4/NatronEngine/parametricparam_wrapper.cpp +++ /dev/null @@ -1,856 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "parametricparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void ParametricParamWrapper::pysideInitQtMetaTypes() -{ -} - -ParametricParamWrapper::~ParametricParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_ParametricParamFunc_addControlPoint(PyObject* self, PyObject* args, PyObject* kwds) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 6) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ParametricParam.addControlPoint(): too many arguments"); - return 0; - } else if (numArgs < 3) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ParametricParam.addControlPoint(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OOOOOO:addControlPoint", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]), &(pyArgs[5]))) - return 0; - - - // Overloaded function decisor - // 0: addControlPoint(int,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - // 1: addControlPoint(int,double,double,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - if (numArgs >= 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // addControlPoint(int,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[3])))) { - overloadId = 0; // addControlPoint(int,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - } else if (numArgs >= 5 - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4])))) { - if (numArgs == 5) { - overloadId = 1; // addControlPoint(int,double,double,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - } else if ((pythonToCpp[5] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[5])))) { - overloadId = 1; // addControlPoint(int,double,double,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - } - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_addControlPoint_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // addControlPoint(int dimension, double key, double value, NATRON_NAMESPACE::KeyframeTypeEnum interpolation) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "interpolation"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ParametricParam.addControlPoint(): got multiple values for keyword argument 'interpolation'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[3])))) - goto Sbk_ParametricParamFunc_addControlPoint_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - ::NATRON_NAMESPACE::KeyframeTypeEnum cppArg3 = NATRON_NAMESPACE::eKeyframeTypeSmooth; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // addControlPoint(int,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->addControlPoint(cppArg0, cppArg1, cppArg2, cppArg3)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - break; - } - case 1: // addControlPoint(int dimension, double key, double value, double leftDerivative, double rightDerivative, NATRON_NAMESPACE::KeyframeTypeEnum interpolation) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "interpolation"); - if (value && pyArgs[5]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.ParametricParam.addControlPoint(): got multiple values for keyword argument 'interpolation'."); - return 0; - } else if (value) { - pyArgs[5] = value; - if (!(pythonToCpp[5] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[5])))) - goto Sbk_ParametricParamFunc_addControlPoint_TypeError; - } - } - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - ::NATRON_NAMESPACE::KeyframeTypeEnum cppArg5 = NATRON_NAMESPACE::eKeyframeTypeSmooth; - if (pythonToCpp[5]) pythonToCpp[5](pyArgs[5], &cppArg5); - - if (!PyErr_Occurred()) { - // addControlPoint(int,double,double,double,double,NATRON_NAMESPACE::KeyframeTypeEnum) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->addControlPoint(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4, cppArg5)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_addControlPoint_TypeError: - const char* overloads[] = {"int, float, float, NatronEngine.Natron.KeyframeTypeEnum = eKeyframeTypeSmooth", "int, float, float, float, float, NatronEngine.Natron.KeyframeTypeEnum = eKeyframeTypeSmooth", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.addControlPoint", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_deleteAllControlPoints(PyObject* self, PyObject* pyArg) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: deleteAllControlPoints(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // deleteAllControlPoints(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_deleteAllControlPoints_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // deleteAllControlPoints(int) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->deleteAllControlPoints(cppArg0)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_deleteAllControlPoints_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ParametricParam.deleteAllControlPoints", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_deleteControlPoint(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "deleteControlPoint", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: deleteControlPoint(int,int) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // deleteControlPoint(int,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_deleteControlPoint_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // deleteControlPoint(int,int) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->deleteControlPoint(cppArg0, cppArg1)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_deleteControlPoint_TypeError: - const char* overloads[] = {"int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.deleteControlPoint", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_getCurveColor(PyObject* self, PyObject* pyArg) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getCurveColor(int,ColorTuple&)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getCurveColor(int,ColorTuple&)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_getCurveColor_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getCurveColor(int,ColorTuple&)const - // Begin code injection - - ColorTuple t; - cppSelf->getCurveColor(cppArg0,t); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], &t); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_getCurveColor_TypeError: - const char* overloads[] = {"int, NatronEngine.ColorTuple", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ParametricParam.getCurveColor", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_getNControlPoints(PyObject* self, PyObject* pyArg) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getNControlPoints(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getNControlPoints(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_getNControlPoints_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getNControlPoints(int)const - int cppResult = const_cast(cppSelf)->getNControlPoints(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_getNControlPoints_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.ParametricParam.getNControlPoints", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_getNthControlPoint(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getNthControlPoint", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getNthControlPoint(int,int,double*,double*,double*,double*)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getNthControlPoint(int,int,double*,double*,double*,double*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_getNthControlPoint_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getNthControlPoint(int,int,double*,double*,double*,double*)const - // Begin code injection - - double key,value,left,right; - NATRON_NAMESPACE::StatusEnum cppResult = cppSelf->getNthControlPoint(cppArg0, cppArg1,&key,&value, &left, &right); - pyResult = PyTuple_New(5); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &key)); - PyTuple_SET_ITEM(pyResult, 2, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &value)); - PyTuple_SET_ITEM(pyResult, 3, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &left)); - PyTuple_SET_ITEM(pyResult, 4, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &right)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_getNthControlPoint_TypeError: - const char* overloads[] = {"int, int, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double, PySide.QtCore.double", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.getNthControlPoint", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_getValue(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getValue", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getValue(int,double)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // getValue(int,double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_getValue_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getValue(int,double)const - double cppResult = const_cast(cppSelf)->getValue(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_getValue_TypeError: - const char* overloads[] = {"int, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.getValue", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_setCurveColor(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setCurveColor", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: setCurveColor(int,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // setCurveColor(int,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_setCurveColor_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // setCurveColor(int,double,double,double) - cppSelf->setCurveColor(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_ParametricParamFunc_setCurveColor_TypeError: - const char* overloads[] = {"int, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.setCurveColor", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_setDefaultCurvesFromCurrentCurves(PyObject* self) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setDefaultCurvesFromCurrentCurves() - cppSelf->setDefaultCurvesFromCurrentCurves(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_ParametricParamFunc_setNthControlPoint(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setNthControlPoint", 6, 6, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]), &(pyArgs[5]))) - return 0; - - - // Overloaded function decisor - // 0: setNthControlPoint(int,int,double,double,double,double) - if (numArgs == 6 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4]))) - && (pythonToCpp[5] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[5])))) { - overloadId = 0; // setNthControlPoint(int,int,double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_setNthControlPoint_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - double cppArg5; - pythonToCpp[5](pyArgs[5], &cppArg5); - - if (!PyErr_Occurred()) { - // setNthControlPoint(int,int,double,double,double,double) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->setNthControlPoint(cppArg0, cppArg1, cppArg2, cppArg3, cppArg4, cppArg5)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_setNthControlPoint_TypeError: - const char* overloads[] = {"int, int, float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.setNthControlPoint", overloads); - return 0; -} - -static PyObject* Sbk_ParametricParamFunc_setNthControlPointInterpolation(PyObject* self, PyObject* args) -{ - ParametricParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (ParametricParamWrapper*)((::ParametricParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setNthControlPointInterpolation", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: setNthControlPointInterpolation(int,int,NATRON_NAMESPACE::KeyframeTypeEnum) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_KEYFRAMETYPEENUM_IDX]), (pyArgs[2])))) { - overloadId = 0; // setNthControlPointInterpolation(int,int,NATRON_NAMESPACE::KeyframeTypeEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_ParametricParamFunc_setNthControlPointInterpolation_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - ::NATRON_NAMESPACE::KeyframeTypeEnum cppArg2 = ((::NATRON_NAMESPACE::KeyframeTypeEnum)0); - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // setNthControlPointInterpolation(int,int,NATRON_NAMESPACE::KeyframeTypeEnum) - NATRON_NAMESPACE::StatusEnum cppResult = NATRON_NAMESPACE::StatusEnum(cppSelf->setNthControlPointInterpolation(cppArg0, cppArg1, cppArg2)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STATUSENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_ParametricParamFunc_setNthControlPointInterpolation_TypeError: - const char* overloads[] = {"int, int, NatronEngine.Natron.KeyframeTypeEnum", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.ParametricParam.setNthControlPointInterpolation", overloads); - return 0; -} - -static PyMethodDef Sbk_ParametricParam_methods[] = { - {"addControlPoint", (PyCFunction)Sbk_ParametricParamFunc_addControlPoint, METH_VARARGS|METH_KEYWORDS}, - {"deleteAllControlPoints", (PyCFunction)Sbk_ParametricParamFunc_deleteAllControlPoints, METH_O}, - {"deleteControlPoint", (PyCFunction)Sbk_ParametricParamFunc_deleteControlPoint, METH_VARARGS}, - {"getCurveColor", (PyCFunction)Sbk_ParametricParamFunc_getCurveColor, METH_O}, - {"getNControlPoints", (PyCFunction)Sbk_ParametricParamFunc_getNControlPoints, METH_O}, - {"getNthControlPoint", (PyCFunction)Sbk_ParametricParamFunc_getNthControlPoint, METH_VARARGS}, - {"getValue", (PyCFunction)Sbk_ParametricParamFunc_getValue, METH_VARARGS}, - {"setCurveColor", (PyCFunction)Sbk_ParametricParamFunc_setCurveColor, METH_VARARGS}, - {"setDefaultCurvesFromCurrentCurves", (PyCFunction)Sbk_ParametricParamFunc_setDefaultCurvesFromCurrentCurves, METH_NOARGS}, - {"setNthControlPoint", (PyCFunction)Sbk_ParametricParamFunc_setNthControlPoint, METH_VARARGS}, - {"setNthControlPointInterpolation", (PyCFunction)Sbk_ParametricParamFunc_setNthControlPointInterpolation, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_ParametricParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_ParametricParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_ParametricParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.ParametricParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_ParametricParam_traverse, - /*tp_clear*/ Sbk_ParametricParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_ParametricParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_ParametricParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::ParametricParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void ParametricParam_PythonToCpp_ParametricParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_ParametricParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_ParametricParam_PythonToCpp_ParametricParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_ParametricParam_Type)) - return ParametricParam_PythonToCpp_ParametricParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* ParametricParam_PTR_CppToPython_ParametricParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::ParametricParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_ParametricParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_ParametricParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX] = reinterpret_cast(&Sbk_ParametricParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "ParametricParam", "ParametricParam*", - &Sbk_ParametricParam_Type, &Shiboken::callCppDestructor< ::ParametricParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_ParametricParam_Type, - ParametricParam_PythonToCpp_ParametricParam_PTR, - is_ParametricParam_PythonToCpp_ParametricParam_PTR_Convertible, - ParametricParam_PTR_CppToPython_ParametricParam); - - Shiboken::Conversions::registerConverterName(converter, "ParametricParam"); - Shiboken::Conversions::registerConverterName(converter, "ParametricParam*"); - Shiboken::Conversions::registerConverterName(converter, "ParametricParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::ParametricParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::ParametricParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_ParametricParam_Type, &Sbk_ParametricParam_typeDiscovery); - - - ParametricParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/parametricparam_wrapper.h b/Engine/Qt4/NatronEngine/parametricparam_wrapper.h deleted file mode 100644 index e927d8e6f6..0000000000 --- a/Engine/Qt4/NatronEngine/parametricparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PARAMETRICPARAMWRAPPER_H -#define SBK_PARAMETRICPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class ParametricParamWrapper : public ParametricParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { ParametricParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~ParametricParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PARAMETRICPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/pathparam_wrapper.cpp b/Engine/Qt4/NatronEngine/pathparam_wrapper.cpp deleted file mode 100644 index f6d60134c2..0000000000 --- a/Engine/Qt4/NatronEngine/pathparam_wrapper.cpp +++ /dev/null @@ -1,335 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "pathparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include - - -// Native --------------------------------------------------------- - -void PathParamWrapper::pysideInitQtMetaTypes() -{ -} - -PathParamWrapper::~PathParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_PathParamFunc_getTable(PyObject* self) -{ - PathParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PathParamWrapper*)((::PathParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PATHPARAM_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getTable(std::list >*)const - // Begin code injection - - std::list > table; - cppSelf->getTable(&table); - - std::size_t outListSize = table.size(); - PyObject* outList = PyList_New((int) outListSize); - - std::size_t i = 0; - for (std::list >::iterator it = table.begin(); it != table.end(); ++it, ++i) { - std::size_t subListSize = it->size(); - PyObject* subList = PyList_New((int) subListSize); - for (std::size_t j = 0; j < subListSize; ++j) { - std::string cppItem = (*it)[j]; - PyList_SET_ITEM(subList, j, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - PyList_SET_ITEM(outList, i, subList); - } - - return outList; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PathParamFunc_setAsMultiPathTable(PyObject* self) -{ - PathParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PathParamWrapper*)((::PathParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PATHPARAM_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setAsMultiPathTable() - cppSelf->setAsMultiPathTable(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PathParamFunc_setTable(PyObject* self, PyObject* pyArg) -{ - PathParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PathParamWrapper*)((::PathParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PATHPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setTable(std::list >) - if (PySequence_Check(pyArg)) { - overloadId = 0; // setTable(std::list >) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PathParamFunc_setTable_TypeError; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setTable(std::list >) - // Begin code injection - - - if (!PyList_Check(pyArg)) { - PyErr_SetString(PyExc_TypeError, "table must be a list of list objects."); - return 0; - } - - std::list > table; - - int size = (int)PyList_GET_SIZE(pyArg); - for (int i = 0; i < size; ++i) { - - - PyObject* subList = PyList_GET_ITEM(pyArg,i); - if (!subList || !PyList_Check(subList)) { - PyErr_SetString(PyExc_TypeError, "table must be a list of list objects."); - return 0; - } - int subSize = (int)PyList_GET_SIZE(subList); - std::vector rowVec(subSize); - - for (int j = 0; j < subSize; ++j) { - PyObject* py_val = PyList_GET_ITEM(subList,j); - PyObject* s = nullptr; - // The following should work with Python 2 and 3. - // https://stackoverflow.com/a/38600095 - if (PyUnicode_Check(py_val) ) { - s = PyUnicode_AsUTF8String(py_val); // newRef - } else if ( PyBytes_Check(py_val) ) { - s = PyObject_Bytes(py_val); - } - if (s) { - char* cstr = PyBytes_AS_STRING(s); // Borrowed pointer - std::string ret; - ret.append(cstr); - Py_DECREF(s); - rowVec[j] = ret; - } - } - table.push_back(rowVec); - } - - cppSelf->setTable(table); - - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PathParamFunc_setTable_TypeError: - const char* overloads[] = {"list", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PathParam.setTable", overloads); - return 0; -} - -static PyMethodDef Sbk_PathParam_methods[] = { - {"getTable", (PyCFunction)Sbk_PathParamFunc_getTable, METH_NOARGS}, - {"setAsMultiPathTable", (PyCFunction)Sbk_PathParamFunc_setAsMultiPathTable, METH_NOARGS}, - {"setTable", (PyCFunction)Sbk_PathParamFunc_setTable, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PathParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PathParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PathParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.PathParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PathParam_traverse, - /*tp_clear*/ Sbk_PathParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PathParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_PathParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::PathParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PathParam_PythonToCpp_PathParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PathParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PathParam_PythonToCpp_PathParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PathParam_Type)) - return PathParam_PythonToCpp_PathParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PathParam_PTR_CppToPython_PathParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PathParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PathParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PathParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_PATHPARAM_IDX] = reinterpret_cast(&Sbk_PathParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PathParam", "PathParam*", - &Sbk_PathParam_Type, &Shiboken::callCppDestructor< ::PathParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PathParam_Type, - PathParam_PythonToCpp_PathParam_PTR, - is_PathParam_PythonToCpp_PathParam_PTR_Convertible, - PathParam_PTR_CppToPython_PathParam); - - Shiboken::Conversions::registerConverterName(converter, "PathParam"); - Shiboken::Conversions::registerConverterName(converter, "PathParam*"); - Shiboken::Conversions::registerConverterName(converter, "PathParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PathParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PathParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_PathParam_Type, &Sbk_PathParam_typeDiscovery); - - - PathParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/pathparam_wrapper.h b/Engine/Qt4/NatronEngine/pathparam_wrapper.h deleted file mode 100644 index aa4c042843..0000000000 --- a/Engine/Qt4/NatronEngine/pathparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PATHPARAMWRAPPER_H -#define SBK_PATHPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PathParamWrapper : public PathParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { PathParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~PathParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PATHPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.cpp b/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.cpp deleted file mode 100644 index e3cb5e127c..0000000000 --- a/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.cpp +++ /dev/null @@ -1,937 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "pycoreapplication_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void PyCoreApplicationWrapper::pysideInitQtMetaTypes() -{ -} - -PyCoreApplicationWrapper::PyCoreApplicationWrapper() : PyCoreApplication() { - // ... middle -} - -PyCoreApplicationWrapper::~PyCoreApplicationWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_PyCoreApplication_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::PyCoreApplication >())) - return -1; - - ::PyCoreApplicationWrapper* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // PyCoreApplication() - cptr = new ::PyCoreApplicationWrapper(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::PyCoreApplication >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyObject* Sbk_PyCoreApplicationFunc_appendToNatronPath(PyObject* self, PyObject* pyArg) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: appendToNatronPath(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // appendToNatronPath(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyCoreApplicationFunc_appendToNatronPath_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // appendToNatronPath(QString) - cppSelf->appendToNatronPath(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyCoreApplicationFunc_appendToNatronPath_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PyCoreApplication.appendToNatronPath", overloads); - return 0; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getActiveInstance(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getActiveInstance()const - App * cppResult = const_cast(cppSelf)->getActiveInstance(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_APP_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getBuildNumber(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getBuildNumber()const - int cppResult = const_cast(cppSelf)->getBuildNumber(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getInstance(PyObject* self, PyObject* pyArg) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getInstance(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getInstance(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyCoreApplicationFunc_getInstance_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getInstance(int)const - App * cppResult = const_cast(cppSelf)->getInstance(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_APP_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyCoreApplicationFunc_getInstance_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PyCoreApplication.getInstance", overloads); - return 0; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronDevelopmentStatus(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronDevelopmentStatus()const - QString cppResult = const_cast(cppSelf)->getNatronDevelopmentStatus(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronPath(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronPath()const - QStringList cppResult = const_cast(cppSelf)->getNatronPath(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronVersionEncoded(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronVersionEncoded()const - int cppResult = const_cast(cppSelf)->getNatronVersionEncoded(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronVersionMajor(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronVersionMajor()const - int cppResult = const_cast(cppSelf)->getNatronVersionMajor(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronVersionMinor(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronVersionMinor()const - int cppResult = const_cast(cppSelf)->getNatronVersionMinor(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronVersionRevision(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronVersionRevision()const - int cppResult = const_cast(cppSelf)->getNatronVersionRevision(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNatronVersionString(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNatronVersionString()const - QString cppResult = const_cast(cppSelf)->getNatronVersionString(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNumCpus(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumCpus()const - int cppResult = const_cast(cppSelf)->getNumCpus(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getNumInstances(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getNumInstances()const - int cppResult = const_cast(cppSelf)->getNumInstances(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getPluginIDs(PyObject* self, PyObject* args) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "getPluginIDs", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getPluginIDs()const - // 1: getPluginIDs(QString)const - if (numArgs == 0) { - overloadId = 0; // getPluginIDs()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - overloadId = 1; // getPluginIDs(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyCoreApplicationFunc_getPluginIDs_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // getPluginIDs() const - { - - if (!PyErr_Occurred()) { - // getPluginIDs()const - QStringList cppResult = const_cast(cppSelf)->getPluginIDs(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult); - } - break; - } - case 1: // getPluginIDs(const QString & filter) const - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getPluginIDs(QString)const - QStringList cppResult = const_cast(cppSelf)->getPluginIDs(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyCoreApplicationFunc_getPluginIDs_TypeError: - const char* overloads[] = {"", "unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.PyCoreApplication.getPluginIDs", overloads); - return 0; -} - -static PyObject* Sbk_PyCoreApplicationFunc_getSettings(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getSettings()const - AppSettings * cppResult = const_cast(cppSelf)->getSettings(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_APPSETTINGS_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_is64Bit(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // is64Bit()const - bool cppResult = const_cast(cppSelf)->is64Bit(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_isBackground(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isBackground()const - bool cppResult = const_cast(cppSelf)->isBackground(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_isLinux(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isLinux()const - bool cppResult = const_cast(cppSelf)->isLinux(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_isMacOSX(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isMacOSX()const - bool cppResult = const_cast(cppSelf)->isMacOSX(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_isUnix(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isUnix()const - bool cppResult = const_cast(cppSelf)->isUnix(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_isWindows(PyObject* self) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isWindows()const - bool cppResult = const_cast(cppSelf)->isWindows(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyCoreApplicationFunc_setOnProjectCreatedCallback(PyObject* self, PyObject* pyArg) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setOnProjectCreatedCallback(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setOnProjectCreatedCallback(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyCoreApplicationFunc_setOnProjectCreatedCallback_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setOnProjectCreatedCallback(QString) - cppSelf->setOnProjectCreatedCallback(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyCoreApplicationFunc_setOnProjectCreatedCallback_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PyCoreApplication.setOnProjectCreatedCallback", overloads); - return 0; -} - -static PyObject* Sbk_PyCoreApplicationFunc_setOnProjectLoadedCallback(PyObject* self, PyObject* pyArg) -{ - ::PyCoreApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyCoreApplication*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setOnProjectLoadedCallback(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setOnProjectLoadedCallback(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyCoreApplicationFunc_setOnProjectLoadedCallback_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setOnProjectLoadedCallback(QString) - cppSelf->setOnProjectLoadedCallback(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyCoreApplicationFunc_setOnProjectLoadedCallback_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.PyCoreApplication.setOnProjectLoadedCallback", overloads); - return 0; -} - -static PyMethodDef Sbk_PyCoreApplication_methods[] = { - {"appendToNatronPath", (PyCFunction)Sbk_PyCoreApplicationFunc_appendToNatronPath, METH_O}, - {"getActiveInstance", (PyCFunction)Sbk_PyCoreApplicationFunc_getActiveInstance, METH_NOARGS}, - {"getBuildNumber", (PyCFunction)Sbk_PyCoreApplicationFunc_getBuildNumber, METH_NOARGS}, - {"getInstance", (PyCFunction)Sbk_PyCoreApplicationFunc_getInstance, METH_O}, - {"getNatronDevelopmentStatus", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronDevelopmentStatus, METH_NOARGS}, - {"getNatronPath", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronPath, METH_NOARGS}, - {"getNatronVersionEncoded", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronVersionEncoded, METH_NOARGS}, - {"getNatronVersionMajor", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronVersionMajor, METH_NOARGS}, - {"getNatronVersionMinor", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronVersionMinor, METH_NOARGS}, - {"getNatronVersionRevision", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronVersionRevision, METH_NOARGS}, - {"getNatronVersionString", (PyCFunction)Sbk_PyCoreApplicationFunc_getNatronVersionString, METH_NOARGS}, - {"getNumCpus", (PyCFunction)Sbk_PyCoreApplicationFunc_getNumCpus, METH_NOARGS}, - {"getNumInstances", (PyCFunction)Sbk_PyCoreApplicationFunc_getNumInstances, METH_NOARGS}, - {"getPluginIDs", (PyCFunction)Sbk_PyCoreApplicationFunc_getPluginIDs, METH_VARARGS}, - {"getSettings", (PyCFunction)Sbk_PyCoreApplicationFunc_getSettings, METH_NOARGS}, - {"is64Bit", (PyCFunction)Sbk_PyCoreApplicationFunc_is64Bit, METH_NOARGS}, - {"isBackground", (PyCFunction)Sbk_PyCoreApplicationFunc_isBackground, METH_NOARGS}, - {"isLinux", (PyCFunction)Sbk_PyCoreApplicationFunc_isLinux, METH_NOARGS}, - {"isMacOSX", (PyCFunction)Sbk_PyCoreApplicationFunc_isMacOSX, METH_NOARGS}, - {"isUnix", (PyCFunction)Sbk_PyCoreApplicationFunc_isUnix, METH_NOARGS}, - {"isWindows", (PyCFunction)Sbk_PyCoreApplicationFunc_isWindows, METH_NOARGS}, - {"setOnProjectCreatedCallback", (PyCFunction)Sbk_PyCoreApplicationFunc_setOnProjectCreatedCallback, METH_O}, - {"setOnProjectLoadedCallback", (PyCFunction)Sbk_PyCoreApplicationFunc_setOnProjectLoadedCallback, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyCoreApplication_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyCoreApplication_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyCoreApplication_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.PyCoreApplication", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyCoreApplication_traverse, - /*tp_clear*/ Sbk_PyCoreApplication_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyCoreApplication_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_PyCoreApplication_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyCoreApplication_PythonToCpp_PyCoreApplication_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyCoreApplication_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyCoreApplication_PythonToCpp_PyCoreApplication_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyCoreApplication_Type)) - return PyCoreApplication_PythonToCpp_PyCoreApplication_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyCoreApplication_PTR_CppToPython_PyCoreApplication(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PyCoreApplication*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PyCoreApplication_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PyCoreApplication(PyObject* module) -{ - SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX] = reinterpret_cast(&Sbk_PyCoreApplication_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyCoreApplication", "PyCoreApplication*", - &Sbk_PyCoreApplication_Type, &Shiboken::callCppDestructor< ::PyCoreApplication >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyCoreApplication_Type, - PyCoreApplication_PythonToCpp_PyCoreApplication_PTR, - is_PyCoreApplication_PythonToCpp_PyCoreApplication_PTR_Convertible, - PyCoreApplication_PTR_CppToPython_PyCoreApplication); - - Shiboken::Conversions::registerConverterName(converter, "PyCoreApplication"); - Shiboken::Conversions::registerConverterName(converter, "PyCoreApplication*"); - Shiboken::Conversions::registerConverterName(converter, "PyCoreApplication&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyCoreApplication).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyCoreApplicationWrapper).name()); - - - - PyCoreApplicationWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.h b/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.h deleted file mode 100644 index d7adaf81fd..0000000000 --- a/Engine/Qt4/NatronEngine/pycoreapplication_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PYCOREAPPLICATIONWRAPPER_H -#define SBK_PYCOREAPPLICATIONWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PyCoreApplicationWrapper : public PyCoreApplication -{ -public: - PyCoreApplicationWrapper(); - virtual ~PyCoreApplicationWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PYCOREAPPLICATIONWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/rectd_wrapper.cpp b/Engine/Qt4/NatronEngine/rectd_wrapper.cpp deleted file mode 100644 index b3b3ade866..0000000000 --- a/Engine/Qt4/NatronEngine/rectd_wrapper.cpp +++ /dev/null @@ -1,1433 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "rectd_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void RectDWrapper::pysideInitQtMetaTypes() -{ -} - -RectDWrapper::RectDWrapper() : RectD() { - // ... middle -} - -RectDWrapper::RectDWrapper(double l, double b, double r, double t) : RectD(l, b, r, t) { - // ... middle -} - -RectDWrapper::~RectDWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_RectD_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::RectD >())) - return -1; - - ::RectDWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectD_Init_TypeError; - - if (!PyArg_UnpackTuple(args, "RectD", 0, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return -1; - - - // Overloaded function decisor - // 0: RectD() - // 1: RectD(RectD) - // 2: RectD(double,double,double,double) - if (numArgs == 0) { - overloadId = 0; // RectD() - } else if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 2; // RectD(double,double,double,double) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 1; // RectD(RectD) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectD_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // RectD() - { - - if (!PyErr_Occurred()) { - // RectD() - cptr = new ::RectDWrapper(); - } - break; - } - case 1: // RectD(const RectD & b) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return -1; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // RectD(RectD) - cptr = new ::RectDWrapper(*cppArg0); - } - break; - } - case 2: // RectD(double l, double b, double r, double t) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // RectD(double,double,double,double) - cptr = new ::RectDWrapper(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::RectD >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_RectD_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_RectD_Init_TypeError: - const char* overloads[] = {"", "NatronEngine.RectD", "float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD", overloads); - return -1; -} - -static PyObject* Sbk_RectDFunc_area(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // area()const - double cppResult = const_cast(cppSelf)->area(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_bottom(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // bottom()const - double cppResult = const_cast(cppSelf)->bottom(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_clear(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // clear() - cppSelf->clear(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_RectDFunc_contains(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "contains", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: contains(RectD)const - // 1: contains(double,double)const - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // contains(double,double)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 0; // contains(RectD)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_contains_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // contains(const RectD & other) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // contains(RectD)const - bool cppResult = const_cast(cppSelf)->contains(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // contains(double x, double y) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // contains(double,double)const - bool cppResult = const_cast(cppSelf)->contains(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectDFunc_contains_TypeError: - const char* overloads[] = {"NatronEngine.RectD", "float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.contains", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_height(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // height()const - double cppResult = const_cast(cppSelf)->height(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_intersect(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectDFunc_intersect_TypeError; - - if (!PyArg_UnpackTuple(args, "intersect", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: intersect(RectD,RectD*)const - // 1: intersect(double,double,double,double,RectD*)const - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // intersect(double,double,double,double,RectD*)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 0; // intersect(RectD,RectD*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_intersect_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // intersect(const RectD & r, RectD * intersection) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // intersect(RectD,RectD*)const - // Begin code injection - - // Original: - //RectD t; - //cppSelf->intersect(*cppArg0,&t); - // Fix after https://github.com/NatronGitHub/Natron/pull/914 : - RectD t = cppSelf->intersect(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], &t); - return pyResult; - - // End of code injection - - - } - break; - } - case 1: // intersect(double l, double b, double r, double t, RectD * intersection) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // intersect(double,double,double,double,RectD*)const - // Begin code injection - - // Original: - //RectD t; - //cppSelf->intersect(cppArg0,cppArg1,cppArg2,cppArg3,&t); - // Fix after https://github.com/NatronGitHub/Natron/pull/914 : - RectD t = cppSelf->intersect(cppArg0,cppArg1,cppArg2,cppArg3); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], &t); - return pyResult; - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectDFunc_intersect_TypeError: - const char* overloads[] = {"NatronEngine.RectD, NatronEngine.RectD", "float, float, float, float, NatronEngine.RectD", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.intersect", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_intersects(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectDFunc_intersects_TypeError; - - if (!PyArg_UnpackTuple(args, "intersects", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: intersects(RectD)const - // 1: intersects(double,double,double,double)const - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // intersects(double,double,double,double)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 0; // intersects(RectD)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_intersects_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // intersects(const RectD & r) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // intersects(RectD)const - bool cppResult = const_cast(cppSelf)->intersects(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // intersects(double l, double b, double r, double t) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // intersects(double,double,double,double)const - bool cppResult = const_cast(cppSelf)->intersects(cppArg0, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectDFunc_intersects_TypeError: - const char* overloads[] = {"NatronEngine.RectD", "float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.intersects", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_isInfinite(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isInfinite()const - bool cppResult = const_cast(cppSelf)->isInfinite(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_isNull(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isNull()const - bool cppResult = const_cast(cppSelf)->isNull(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_left(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // left()const - double cppResult = const_cast(cppSelf)->left(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_merge(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectDFunc_merge_TypeError; - - if (!PyArg_UnpackTuple(args, "merge", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: merge(RectD) - // 1: merge(double,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // merge(double,double,double,double) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 0; // merge(RectD) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_merge_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // merge(const RectD & box) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // merge(RectD) - cppSelf->merge(*cppArg0); - } - break; - } - case 1: // merge(double l, double b, double r, double t) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // merge(double,double,double,double) - cppSelf->merge(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_merge_TypeError: - const char* overloads[] = {"NatronEngine.RectD", "float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.merge", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_right(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // right()const - double cppResult = const_cast(cppSelf)->right(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_set(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectDFunc_set_TypeError; - - if (!PyArg_UnpackTuple(args, "set", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: set(RectD) - // 1: set(double,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // set(double,double,double,double) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArgs[0])))) { - overloadId = 0; // set(RectD) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(const RectD & b) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectD* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(RectD) - cppSelf->set(*cppArg0); - } - break; - } - case 1: // set(double l, double b, double r, double t) - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // set(double,double,double,double) - cppSelf->set(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_set_TypeError: - const char* overloads[] = {"NatronEngine.RectD", "float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.set", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_set_bottom(PyObject* self, PyObject* pyArg) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_bottom(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_bottom(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_set_bottom_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_bottom(double) - cppSelf->set_bottom(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_set_bottom_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectD.set_bottom", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_set_left(PyObject* self, PyObject* pyArg) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_left(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_left(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_set_left_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_left(double) - cppSelf->set_left(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_set_left_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectD.set_left", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_set_right(PyObject* self, PyObject* pyArg) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_right(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_right(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_set_right_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_right(double) - cppSelf->set_right(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_set_right_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectD.set_right", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_set_top(PyObject* self, PyObject* pyArg) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_top(double) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_top(double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_set_top_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_top(double) - cppSelf->set_top(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_set_top_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectD.set_top", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_setupInfinity(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setupInfinity() - cppSelf->setupInfinity(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_RectDFunc_top(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // top()const - double cppResult = const_cast(cppSelf)->top(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectDFunc_translate(PyObject* self, PyObject* args) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "translate", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: translate(int,int) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // translate(int,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectDFunc_translate_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // translate(int,int) - cppSelf->translate(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectDFunc_translate_TypeError: - const char* overloads[] = {"int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectD.translate", overloads); - return 0; -} - -static PyObject* Sbk_RectDFunc_width(PyObject* self) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // width()const - double cppResult = const_cast(cppSelf)->width(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyMethodDef Sbk_RectD_methods[] = { - {"area", (PyCFunction)Sbk_RectDFunc_area, METH_NOARGS}, - {"bottom", (PyCFunction)Sbk_RectDFunc_bottom, METH_NOARGS}, - {"clear", (PyCFunction)Sbk_RectDFunc_clear, METH_NOARGS}, - {"contains", (PyCFunction)Sbk_RectDFunc_contains, METH_VARARGS}, - {"height", (PyCFunction)Sbk_RectDFunc_height, METH_NOARGS}, - {"intersect", (PyCFunction)Sbk_RectDFunc_intersect, METH_VARARGS}, - {"intersects", (PyCFunction)Sbk_RectDFunc_intersects, METH_VARARGS}, - {"isInfinite", (PyCFunction)Sbk_RectDFunc_isInfinite, METH_NOARGS}, - {"isNull", (PyCFunction)Sbk_RectDFunc_isNull, METH_NOARGS}, - {"left", (PyCFunction)Sbk_RectDFunc_left, METH_NOARGS}, - {"merge", (PyCFunction)Sbk_RectDFunc_merge, METH_VARARGS}, - {"right", (PyCFunction)Sbk_RectDFunc_right, METH_NOARGS}, - {"set", (PyCFunction)Sbk_RectDFunc_set, METH_VARARGS}, - {"set_bottom", (PyCFunction)Sbk_RectDFunc_set_bottom, METH_O}, - {"set_left", (PyCFunction)Sbk_RectDFunc_set_left, METH_O}, - {"set_right", (PyCFunction)Sbk_RectDFunc_set_right, METH_O}, - {"set_top", (PyCFunction)Sbk_RectDFunc_set_top, METH_O}, - {"setupInfinity", (PyCFunction)Sbk_RectDFunc_setupInfinity, METH_NOARGS}, - {"top", (PyCFunction)Sbk_RectDFunc_top, METH_NOARGS}, - {"translate", (PyCFunction)Sbk_RectDFunc_translate, METH_VARARGS}, - {"width", (PyCFunction)Sbk_RectDFunc_width, METH_NOARGS}, - - {0} // Sentinel -}; - -// Rich comparison -static PyObject* Sbk_RectD_richcompare(PyObject* self, PyObject* pyArg, int op) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::RectD& cppSelf = *(((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self))); - SBK_UNUSED(cppSelf) - PyObject* pyResult = 0; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - switch (op) { - case Py_NE: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArg)))) { - // operator!=(const RectD & b2) - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::RectD* cppArg0; - pythonToCpp(pyArg, &cppArg0); - bool cppResult = cppSelf != (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_True; - Py_INCREF(pyResult); - } - - break; - case Py_EQ: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTD_IDX], (pyArg)))) { - // operator==(const RectD & b2) - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::RectD* cppArg0; - pythonToCpp(pyArg, &cppArg0); - bool cppResult = cppSelf == (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_False; - Py_INCREF(pyResult); - } - - break; - default: - goto Sbk_RectD_RichComparison_TypeError; - } - - if (pyResult && !PyErr_Occurred()) - return pyResult; - Sbk_RectD_RichComparison_TypeError: - PyErr_SetString(PyExc_NotImplementedError, "operator not implemented."); - return 0; - -} - -static PyObject* Sbk_RectD_get_y1(PyObject* self, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->y1); - return pyOut; -} -static int Sbk_RectD_set_y1(PyObject* self, PyObject* pyIn, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y1' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y1', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->y1; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_RectD_get_x1(PyObject* self, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->x1); - return pyOut; -} -static int Sbk_RectD_set_x1(PyObject* self, PyObject* pyIn, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x1' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x1', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->x1; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_RectD_get_y2(PyObject* self, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->y2); - return pyOut; -} -static int Sbk_RectD_set_y2(PyObject* self, PyObject* pyIn, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y2' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y2', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->y2; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -static PyObject* Sbk_RectD_get_x2(PyObject* self, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppSelf->x2); - return pyOut; -} -static int Sbk_RectD_set_x2(PyObject* self, PyObject* pyIn, void*) -{ - ::RectD* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectD*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTD_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x2' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x2', 'double' or convertible type expected"); - return -1; - } - - double& cppOut_ptr = cppSelf->x2; - pythonToCpp(pyIn, &cppOut_ptr); - - return 0; -} - -// Getters and Setters for RectD -static PyGetSetDef Sbk_RectD_getsetlist[] = { - {const_cast("y1"), Sbk_RectD_get_y1, Sbk_RectD_set_y1}, - {const_cast("x1"), Sbk_RectD_get_x1, Sbk_RectD_set_x1}, - {const_cast("y2"), Sbk_RectD_get_y2, Sbk_RectD_set_y2}, - {const_cast("x2"), Sbk_RectD_get_x2, Sbk_RectD_set_x2}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_RectD_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_RectD_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_RectD_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.RectD", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_RectD_traverse, - /*tp_clear*/ Sbk_RectD_clear, - /*tp_richcompare*/ Sbk_RectD_richcompare, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_RectD_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_RectD_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_RectD_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void RectD_PythonToCpp_RectD_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_RectD_Type, pyIn, cppOut); -} -static PythonToCppFunc is_RectD_PythonToCpp_RectD_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_RectD_Type)) - return RectD_PythonToCpp_RectD_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* RectD_PTR_CppToPython_RectD(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::RectD*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_RectD_Type, const_cast(cppIn), false, false, typeName); -} - -void init_RectD(PyObject* module) -{ - SbkNatronEngineTypes[SBK_RECTD_IDX] = reinterpret_cast(&Sbk_RectD_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "RectD", "RectD*", - &Sbk_RectD_Type, &Shiboken::callCppDestructor< ::RectD >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_RectD_Type, - RectD_PythonToCpp_RectD_PTR, - is_RectD_PythonToCpp_RectD_PTR_Convertible, - RectD_PTR_CppToPython_RectD); - - Shiboken::Conversions::registerConverterName(converter, "RectD"); - Shiboken::Conversions::registerConverterName(converter, "RectD*"); - Shiboken::Conversions::registerConverterName(converter, "RectD&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::RectD).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::RectDWrapper).name()); - - - - RectDWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/rectd_wrapper.h b/Engine/Qt4/NatronEngine/rectd_wrapper.h deleted file mode 100644 index 331e9f144a..0000000000 --- a/Engine/Qt4/NatronEngine/rectd_wrapper.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SBK_RECTDWRAPPER_H -#define SBK_RECTDWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class RectDWrapper : public RectD -{ -public: - RectDWrapper(); - RectDWrapper(const RectD& self) : RectD(self) - { - } - - RectDWrapper(double l, double b, double r, double t); - virtual ~RectDWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_RECTDWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/recti_wrapper.cpp b/Engine/Qt4/NatronEngine/recti_wrapper.cpp deleted file mode 100644 index 6b8b924f86..0000000000 --- a/Engine/Qt4/NatronEngine/recti_wrapper.cpp +++ /dev/null @@ -1,1410 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "recti_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void RectIWrapper::pysideInitQtMetaTypes() -{ -} - -RectIWrapper::RectIWrapper() : RectI() { - // ... middle -} - -RectIWrapper::RectIWrapper(int x1_, int y1_, int x2_, int y2_) : RectI(x1_, y1_, x2_, y2_) { - // ... middle -} - -RectIWrapper::~RectIWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_RectI_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::RectI >())) - return -1; - - ::RectIWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectI_Init_TypeError; - - if (!PyArg_UnpackTuple(args, "RectI", 0, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return -1; - - - // Overloaded function decisor - // 0: RectI() - // 1: RectI(RectI) - // 2: RectI(int,int,int,int) - if (numArgs == 0) { - overloadId = 0; // RectI() - } else if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 2; // RectI(int,int,int,int) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 1; // RectI(RectI) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectI_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // RectI() - { - - if (!PyErr_Occurred()) { - // RectI() - cptr = new ::RectIWrapper(); - } - break; - } - case 1: // RectI(const RectI & b) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return -1; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // RectI(RectI) - cptr = new ::RectIWrapper(*cppArg0); - } - break; - } - case 2: // RectI(int x1_, int y1_, int x2_, int y2_) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // RectI(int,int,int,int) - cptr = new ::RectIWrapper(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::RectI >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_RectI_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_RectI_Init_TypeError: - const char* overloads[] = {"", "NatronEngine.RectI", "int, int, int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI", overloads); - return -1; -} - -static PyObject* Sbk_RectIFunc_bottom(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // bottom()const - int cppResult = const_cast(cppSelf)->bottom(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_clear(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // clear() - cppSelf->clear(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_RectIFunc_contains(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "contains", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: contains(RectI)const - // 1: contains(double,double)const - // 2: contains(int,int)const - if (numArgs == 2 - && PyFloat_Check(pyArgs[0]) && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // contains(double,double)const - } else if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 2; // contains(int,int)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 0; // contains(RectI)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_contains_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // contains(const RectI & other) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // contains(RectI)const - bool cppResult = const_cast(cppSelf)->contains(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // contains(double x, double y) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // contains(double,double)const - bool cppResult = const_cast(cppSelf)->contains(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 2: // contains(int x, int y) const - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // contains(int,int)const - bool cppResult = const_cast(cppSelf)->contains(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectIFunc_contains_TypeError: - const char* overloads[] = {"NatronEngine.RectI", "float, float", "int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.contains", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_height(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // height()const - int cppResult = const_cast(cppSelf)->height(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_intersect(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectIFunc_intersect_TypeError; - - if (!PyArg_UnpackTuple(args, "intersect", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: intersect(RectI,RectI*)const - // 1: intersect(int,int,int,int,RectI*)const - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // intersect(int,int,int,int,RectI*)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 0; // intersect(RectI,RectI*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_intersect_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // intersect(const RectI & r, RectI * intersection) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // intersect(RectI,RectI*)const - // Begin code injection - - // Original: - //RectI t; - //cppSelf->intersect(*cppArg0,&t); - // Fix after https://github.com/NatronGitHub/Natron/pull/914 : - RectI t = cppSelf->intersect(*cppArg0); - - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], &t); - return pyResult; - - // End of code injection - - - } - break; - } - case 1: // intersect(int x1_, int y1_, int x2_, int y2_, RectI * intersection) const - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // intersect(int,int,int,int,RectI*)const - // Begin code injection - - // Original: - //RectI t; - //cppSelf->intersect(cppArg0,cppArg1,cppArg2,cppArg3,&t); - // Fix after https://github.com/NatronGitHub/Natron/pull/914 : - RectI t = cppSelf->intersect(cppArg0,cppArg1,cppArg2,cppArg3); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], &t); - return pyResult; - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectIFunc_intersect_TypeError: - const char* overloads[] = {"NatronEngine.RectI, NatronEngine.RectI", "int, int, int, int, NatronEngine.RectI", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.intersect", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_intersects(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectIFunc_intersects_TypeError; - - if (!PyArg_UnpackTuple(args, "intersects", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: intersects(RectI)const - // 1: intersects(int,int,int,int)const - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // intersects(int,int,int,int)const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 0; // intersects(RectI)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_intersects_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // intersects(const RectI & r) const - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // intersects(RectI)const - bool cppResult = const_cast(cppSelf)->intersects(*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - case 1: // intersects(int x1_, int y1_, int x2_, int y2_) const - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // intersects(int,int,int,int)const - bool cppResult = const_cast(cppSelf)->intersects(cppArg0, cppArg1, cppArg2, cppArg3); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RectIFunc_intersects_TypeError: - const char* overloads[] = {"NatronEngine.RectI", "int, int, int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.intersects", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_isInfinite(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isInfinite()const - bool cppResult = const_cast(cppSelf)->isInfinite(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_isNull(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isNull()const - bool cppResult = const_cast(cppSelf)->isNull(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_left(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // left()const - int cppResult = const_cast(cppSelf)->left(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_merge(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectIFunc_merge_TypeError; - - if (!PyArg_UnpackTuple(args, "merge", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: merge(RectI) - // 1: merge(int,int,int,int) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // merge(int,int,int,int) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 0; // merge(RectI) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_merge_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // merge(const RectI & box) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // merge(RectI) - cppSelf->merge(*cppArg0); - } - break; - } - case 1: // merge(int x1_, int y1_, int x2_, int y2_) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // merge(int,int,int,int) - cppSelf->merge(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_merge_TypeError: - const char* overloads[] = {"NatronEngine.RectI", "int, int, int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.merge", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_right(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // right()const - int cppResult = const_cast(cppSelf)->right(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_set(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 2 || numArgs == 3) - goto Sbk_RectIFunc_set_TypeError; - - if (!PyArg_UnpackTuple(args, "set", 1, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: set(RectI) - // 1: set(int,int,int,int) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 1; // set(int,int,int,int) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArgs[0])))) { - overloadId = 0; // set(RectI) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(const RectI & b) - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::RectI* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(RectI) - cppSelf->set(*cppArg0); - } - break; - } - case 1: // set(int x1_, int y1_, int x2_, int y2_) - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // set(int,int,int,int) - cppSelf->set(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_set_TypeError: - const char* overloads[] = {"NatronEngine.RectI", "int, int, int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.set", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_set_bottom(PyObject* self, PyObject* pyArg) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_bottom(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_bottom(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_set_bottom_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_bottom(int) - cppSelf->set_bottom(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_set_bottom_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectI.set_bottom", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_set_left(PyObject* self, PyObject* pyArg) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_left(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_left(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_set_left_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_left(int) - cppSelf->set_left(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_set_left_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectI.set_left", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_set_right(PyObject* self, PyObject* pyArg) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_right(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_right(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_set_right_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_right(int) - cppSelf->set_right(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_set_right_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectI.set_right", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_set_top(PyObject* self, PyObject* pyArg) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: set_top(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // set_top(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_set_top_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // set_top(int) - cppSelf->set_top(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_set_top_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.RectI.set_top", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_top(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // top()const - int cppResult = const_cast(cppSelf)->top(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RectIFunc_translate(PyObject* self, PyObject* args) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "translate", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: translate(int,int) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // translate(int,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RectIFunc_translate_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // translate(int,int) - cppSelf->translate(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_RectIFunc_translate_TypeError: - const char* overloads[] = {"int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.RectI.translate", overloads); - return 0; -} - -static PyObject* Sbk_RectIFunc_width(PyObject* self) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // width()const - int cppResult = const_cast(cppSelf)->width(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyMethodDef Sbk_RectI_methods[] = { - {"bottom", (PyCFunction)Sbk_RectIFunc_bottom, METH_NOARGS}, - {"clear", (PyCFunction)Sbk_RectIFunc_clear, METH_NOARGS}, - {"contains", (PyCFunction)Sbk_RectIFunc_contains, METH_VARARGS}, - {"height", (PyCFunction)Sbk_RectIFunc_height, METH_NOARGS}, - {"intersect", (PyCFunction)Sbk_RectIFunc_intersect, METH_VARARGS}, - {"intersects", (PyCFunction)Sbk_RectIFunc_intersects, METH_VARARGS}, - {"isInfinite", (PyCFunction)Sbk_RectIFunc_isInfinite, METH_NOARGS}, - {"isNull", (PyCFunction)Sbk_RectIFunc_isNull, METH_NOARGS}, - {"left", (PyCFunction)Sbk_RectIFunc_left, METH_NOARGS}, - {"merge", (PyCFunction)Sbk_RectIFunc_merge, METH_VARARGS}, - {"right", (PyCFunction)Sbk_RectIFunc_right, METH_NOARGS}, - {"set", (PyCFunction)Sbk_RectIFunc_set, METH_VARARGS}, - {"set_bottom", (PyCFunction)Sbk_RectIFunc_set_bottom, METH_O}, - {"set_left", (PyCFunction)Sbk_RectIFunc_set_left, METH_O}, - {"set_right", (PyCFunction)Sbk_RectIFunc_set_right, METH_O}, - {"set_top", (PyCFunction)Sbk_RectIFunc_set_top, METH_O}, - {"top", (PyCFunction)Sbk_RectIFunc_top, METH_NOARGS}, - {"translate", (PyCFunction)Sbk_RectIFunc_translate, METH_VARARGS}, - {"width", (PyCFunction)Sbk_RectIFunc_width, METH_NOARGS}, - - {0} // Sentinel -}; - -// Rich comparison -static PyObject* Sbk_RectI_richcompare(PyObject* self, PyObject* pyArg, int op) -{ - if (!Shiboken::Object::isValid(self)) - return 0; - ::RectI& cppSelf = *(((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self))); - SBK_UNUSED(cppSelf) - PyObject* pyResult = 0; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - switch (op) { - case Py_NE: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArg)))) { - // operator!=(const RectI & b2) - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::RectI* cppArg0; - pythonToCpp(pyArg, &cppArg0); - bool cppResult = cppSelf != (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_True; - Py_INCREF(pyResult); - } - - break; - case Py_EQ: - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppReferenceConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_RECTI_IDX], (pyArg)))) { - // operator==(const RectI & b2) - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::RectI* cppArg0; - pythonToCpp(pyArg, &cppArg0); - bool cppResult = cppSelf == (*cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } else { - pyResult = Py_False; - Py_INCREF(pyResult); - } - - break; - default: - goto Sbk_RectI_RichComparison_TypeError; - } - - if (pyResult && !PyErr_Occurred()) - return pyResult; - Sbk_RectI_RichComparison_TypeError: - PyErr_SetString(PyExc_NotImplementedError, "operator not implemented."); - return 0; - -} - -static PyObject* Sbk_RectI_get_y1(PyObject* self, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->y1; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_RectI_set_y1(PyObject* self, PyObject* pyIn, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y1' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y1', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->y1; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->y1 = cppOut_local; - - return 0; -} - -static PyObject* Sbk_RectI_get_x1(PyObject* self, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->x1; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_RectI_set_x1(PyObject* self, PyObject* pyIn, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x1' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x1', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->x1; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->x1 = cppOut_local; - - return 0; -} - -static PyObject* Sbk_RectI_get_y2(PyObject* self, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->y2; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_RectI_set_y2(PyObject* self, PyObject* pyIn, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'y2' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'y2', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->y2; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->y2 = cppOut_local; - - return 0; -} - -static PyObject* Sbk_RectI_get_x2(PyObject* self, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - int cppOut_local = cppSelf->x2; - PyObject* pyOut = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppOut_local); - return pyOut; -} -static int Sbk_RectI_set_x2(PyObject* self, PyObject* pyIn, void*) -{ - ::RectI* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::RectI*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_RECTI_IDX], (SbkObject*)self)); - if (pyIn == 0) { - PyErr_SetString(PyExc_TypeError, "'x2' may not be deleted"); - return -1; - } - PythonToCppFunc pythonToCpp; - if (!(pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyIn)))) { - PyErr_SetString(PyExc_TypeError, "wrong type attributed to 'x2', 'int' or convertible type expected"); - return -1; - } - - int cppOut_local = cppSelf->x2; - pythonToCpp(pyIn, &cppOut_local); - cppSelf->x2 = cppOut_local; - - return 0; -} - -// Getters and Setters for RectI -static PyGetSetDef Sbk_RectI_getsetlist[] = { - {const_cast("y1"), Sbk_RectI_get_y1, Sbk_RectI_set_y1}, - {const_cast("x1"), Sbk_RectI_get_x1, Sbk_RectI_set_x1}, - {const_cast("y2"), Sbk_RectI_get_y2, Sbk_RectI_set_y2}, - {const_cast("x2"), Sbk_RectI_get_x2, Sbk_RectI_set_x2}, - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_RectI_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_RectI_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_RectI_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.RectI", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_RectI_traverse, - /*tp_clear*/ Sbk_RectI_clear, - /*tp_richcompare*/ Sbk_RectI_richcompare, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_RectI_methods, - /*tp_members*/ 0, - /*tp_getset*/ Sbk_RectI_getsetlist, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_RectI_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void RectI_PythonToCpp_RectI_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_RectI_Type, pyIn, cppOut); -} -static PythonToCppFunc is_RectI_PythonToCpp_RectI_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_RectI_Type)) - return RectI_PythonToCpp_RectI_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* RectI_PTR_CppToPython_RectI(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::RectI*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_RectI_Type, const_cast(cppIn), false, false, typeName); -} - -void init_RectI(PyObject* module) -{ - SbkNatronEngineTypes[SBK_RECTI_IDX] = reinterpret_cast(&Sbk_RectI_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "RectI", "RectI*", - &Sbk_RectI_Type, &Shiboken::callCppDestructor< ::RectI >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_RectI_Type, - RectI_PythonToCpp_RectI_PTR, - is_RectI_PythonToCpp_RectI_PTR_Convertible, - RectI_PTR_CppToPython_RectI); - - Shiboken::Conversions::registerConverterName(converter, "RectI"); - Shiboken::Conversions::registerConverterName(converter, "RectI*"); - Shiboken::Conversions::registerConverterName(converter, "RectI&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::RectI).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::RectIWrapper).name()); - - - - RectIWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/recti_wrapper.h b/Engine/Qt4/NatronEngine/recti_wrapper.h deleted file mode 100644 index 0e3cc35ac0..0000000000 --- a/Engine/Qt4/NatronEngine/recti_wrapper.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef SBK_RECTIWRAPPER_H -#define SBK_RECTIWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class RectIWrapper : public RectI -{ -public: - RectIWrapper(); - RectIWrapper(const RectI& self) : RectI(self) - { - } - - RectIWrapper(int x1_, int y1_, int x2_, int y2_); - virtual ~RectIWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_RECTIWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/roto_wrapper.cpp b/Engine/Qt4/NatronEngine/roto_wrapper.cpp deleted file mode 100644 index feb3228f41..0000000000 --- a/Engine/Qt4/NatronEngine/roto_wrapper.cpp +++ /dev/null @@ -1,484 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "roto_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_RotoFunc_createBezier(PyObject* self, PyObject* args) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createBezier", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: createBezier(double,double,double) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // createBezier(double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RotoFunc_createBezier_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // createBezier(double,double,double) - // Begin code injection - - BezierCurve * cppResult = cppSelf->createBezier(cppArg0,cppArg1,cppArg2); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RotoFunc_createBezier_TypeError: - const char* overloads[] = {"float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Roto.createBezier", overloads); - return 0; -} - -static PyObject* Sbk_RotoFunc_createEllipse(PyObject* self, PyObject* args) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createEllipse", 5, 5, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]), &(pyArgs[4]))) - return 0; - - - // Overloaded function decisor - // 0: createEllipse(double,double,double,bool,double) - if (numArgs == 5 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3]))) - && (pythonToCpp[4] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[4])))) { - overloadId = 0; // createEllipse(double,double,double,bool,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RotoFunc_createEllipse_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - bool cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - double cppArg4; - pythonToCpp[4](pyArgs[4], &cppArg4); - - if (!PyErr_Occurred()) { - // createEllipse(double,double,double,bool,double) - // Begin code injection - - BezierCurve * cppResult = cppSelf->createEllipse(cppArg0,cppArg1,cppArg2,cppArg3,cppArg4); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RotoFunc_createEllipse_TypeError: - const char* overloads[] = {"float, float, float, bool, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Roto.createEllipse", overloads); - return 0; -} - -static PyObject* Sbk_RotoFunc_createLayer(PyObject* self) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // createLayer() - // Begin code injection - - Layer * cppResult = cppSelf->createLayer(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_LAYER_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RotoFunc_createRectangle(PyObject* self, PyObject* args) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createRectangle", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: createRectangle(double,double,double,double) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // createRectangle(double,double,double,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RotoFunc_createRectangle_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - double cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - double cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // createRectangle(double,double,double,double) - // Begin code injection - - BezierCurve * cppResult = cppSelf->createRectangle(cppArg0,cppArg1,cppArg2,cppArg3); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BEZIERCURVE_IDX], cppResult); - - // End of code injection - - - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RotoFunc_createRectangle_TypeError: - const char* overloads[] = {"float, float, float, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Roto.createRectangle", overloads); - return 0; -} - -static PyObject* Sbk_RotoFunc_getBaseLayer(PyObject* self) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getBaseLayer()const - Layer * cppResult = const_cast(cppSelf)->getBaseLayer(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_LAYER_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_RotoFunc_getItemByName(PyObject* self, PyObject* pyArg) -{ - ::Roto* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Roto*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_ROTO_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getItemByName(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getItemByName(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_RotoFunc_getItemByName_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getItemByName(QString)const - ItemBase * cppResult = const_cast(cppSelf)->getItemByName(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_ITEMBASE_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_RotoFunc_getItemByName_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Roto.getItemByName", overloads); - return 0; -} - -static PyMethodDef Sbk_Roto_methods[] = { - {"createBezier", (PyCFunction)Sbk_RotoFunc_createBezier, METH_VARARGS}, - {"createEllipse", (PyCFunction)Sbk_RotoFunc_createEllipse, METH_VARARGS}, - {"createLayer", (PyCFunction)Sbk_RotoFunc_createLayer, METH_NOARGS}, - {"createRectangle", (PyCFunction)Sbk_RotoFunc_createRectangle, METH_VARARGS}, - {"getBaseLayer", (PyCFunction)Sbk_RotoFunc_getBaseLayer, METH_NOARGS}, - {"getItemByName", (PyCFunction)Sbk_RotoFunc_getItemByName, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Roto_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Roto_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Roto_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Roto", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Roto_traverse, - /*tp_clear*/ Sbk_Roto_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Roto_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Roto_PythonToCpp_Roto_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Roto_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Roto_PythonToCpp_Roto_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Roto_Type)) - return Roto_PythonToCpp_Roto_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Roto_PTR_CppToPython_Roto(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Roto*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Roto_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Roto(PyObject* module) -{ - SbkNatronEngineTypes[SBK_ROTO_IDX] = reinterpret_cast(&Sbk_Roto_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Roto", "Roto*", - &Sbk_Roto_Type, &Shiboken::callCppDestructor< ::Roto >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Roto_Type, - Roto_PythonToCpp_Roto_PTR, - is_Roto_PythonToCpp_Roto_PTR_Convertible, - Roto_PTR_CppToPython_Roto); - - Shiboken::Conversions::registerConverterName(converter, "Roto"); - Shiboken::Conversions::registerConverterName(converter, "Roto*"); - Shiboken::Conversions::registerConverterName(converter, "Roto&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Roto).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/roto_wrapper.h b/Engine/Qt4/NatronEngine/roto_wrapper.h deleted file mode 100644 index 89e1a77af0..0000000000 --- a/Engine/Qt4/NatronEngine/roto_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_ROTO_H -#define SBK_ROTO_H - -#include - -#include - -#endif // SBK_ROTO_H - diff --git a/Engine/Qt4/NatronEngine/separatorparam_wrapper.cpp b/Engine/Qt4/NatronEngine/separatorparam_wrapper.cpp deleted file mode 100644 index 560855c991..0000000000 --- a/Engine/Qt4/NatronEngine/separatorparam_wrapper.cpp +++ /dev/null @@ -1,169 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "separatorparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void SeparatorParamWrapper::pysideInitQtMetaTypes() -{ -} - -SeparatorParamWrapper::~SeparatorParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyMethodDef Sbk_SeparatorParam_methods[] = { - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_SeparatorParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_SeparatorParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_SeparatorParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.SeparatorParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_SeparatorParam_traverse, - /*tp_clear*/ Sbk_SeparatorParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_SeparatorParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_SeparatorParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::SeparatorParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void SeparatorParam_PythonToCpp_SeparatorParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_SeparatorParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_SeparatorParam_PythonToCpp_SeparatorParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_SeparatorParam_Type)) - return SeparatorParam_PythonToCpp_SeparatorParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* SeparatorParam_PTR_CppToPython_SeparatorParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::SeparatorParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_SeparatorParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_SeparatorParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_SEPARATORPARAM_IDX] = reinterpret_cast(&Sbk_SeparatorParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "SeparatorParam", "SeparatorParam*", - &Sbk_SeparatorParam_Type, &Shiboken::callCppDestructor< ::SeparatorParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_SeparatorParam_Type, - SeparatorParam_PythonToCpp_SeparatorParam_PTR, - is_SeparatorParam_PythonToCpp_SeparatorParam_PTR_Convertible, - SeparatorParam_PTR_CppToPython_SeparatorParam); - - Shiboken::Conversions::registerConverterName(converter, "SeparatorParam"); - Shiboken::Conversions::registerConverterName(converter, "SeparatorParam*"); - Shiboken::Conversions::registerConverterName(converter, "SeparatorParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::SeparatorParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::SeparatorParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_SeparatorParam_Type, &Sbk_SeparatorParam_typeDiscovery); - - - SeparatorParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/separatorparam_wrapper.h b/Engine/Qt4/NatronEngine/separatorparam_wrapper.h deleted file mode 100644 index b1967e36d6..0000000000 --- a/Engine/Qt4/NatronEngine/separatorparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_SEPARATORPARAMWRAPPER_H -#define SBK_SEPARATORPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class SeparatorParamWrapper : public SeparatorParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { SeparatorParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~SeparatorParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_SEPARATORPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.cpp b/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.cpp deleted file mode 100644 index bfde29b3e9..0000000000 --- a/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.cpp +++ /dev/null @@ -1,376 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "stringnodecreationproperty_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void StringNodeCreationPropertyWrapper::pysideInitQtMetaTypes() -{ -} - -StringNodeCreationPropertyWrapper::StringNodeCreationPropertyWrapper(const std::string & value) : StringNodeCreationProperty(value) { - // ... middle -} - -StringNodeCreationPropertyWrapper::StringNodeCreationPropertyWrapper(const std::vector & values) : StringNodeCreationProperty(values) { - // ... middle -} - -StringNodeCreationPropertyWrapper::~StringNodeCreationPropertyWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_StringNodeCreationProperty_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::StringNodeCreationProperty >())) - return -1; - - ::StringNodeCreationPropertyWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.StringNodeCreationProperty(): too many arguments"); - return -1; - } - - if (!PyArg_ParseTuple(args, "|O:StringNodeCreationProperty", &(pyArgs[0]))) - return -1; - - - // Overloaded function decisor - // 0: StringNodeCreationProperty(std::string) - // 1: StringNodeCreationProperty(std::vector) - if (numArgs == 0) { - overloadId = 1; // StringNodeCreationProperty(std::vector) - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // StringNodeCreationProperty(std::string) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], (pyArgs[0])))) { - overloadId = 1; // StringNodeCreationProperty(std::vector) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringNodeCreationProperty_Init_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // StringNodeCreationProperty(const std::string & value) - { - ::std::string cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // StringNodeCreationProperty(std::string) - cptr = new ::StringNodeCreationPropertyWrapper(cppArg0); - } - break; - } - case 1: // StringNodeCreationProperty(const std::vector & values) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "values"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.StringNodeCreationProperty(): got multiple values for keyword argument 'values'."); - return -1; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], (pyArgs[0])))) - goto Sbk_StringNodeCreationProperty_Init_TypeError; - } - } - ::std::vector cppArg0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // StringNodeCreationProperty(std::vector) - cptr = new ::StringNodeCreationPropertyWrapper(cppArg0); - } - break; - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::StringNodeCreationProperty >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_StringNodeCreationProperty_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; - - Sbk_StringNodeCreationProperty_Init_TypeError: - const char* overloads[] = {"std::string", "list = std.vector< std.string >()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringNodeCreationProperty", overloads); - return -1; -} - -static PyObject* Sbk_StringNodeCreationPropertyFunc_getValues(PyObject* self) -{ - ::StringNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::StringNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValues()const - const std::vector & cppResult = const_cast(cppSelf)->getValues(); - pyResult = Shiboken::Conversions::copyToPython(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_VECTOR_STD_STRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_StringNodeCreationPropertyFunc_setValue(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::StringNodeCreationProperty* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::StringNodeCreationProperty*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGNODECREATIONPROPERTY_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.StringNodeCreationProperty.setValue(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.StringNodeCreationProperty.setValue(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:setValue", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValue(std::string,int) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // setValue(std::string,int) - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValue(std::string,int) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringNodeCreationPropertyFunc_setValue_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "index"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronEngine.StringNodeCreationProperty.setValue(): got multiple values for keyword argument 'index'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) - goto Sbk_StringNodeCreationPropertyFunc_setValue_TypeError; - } - } - ::std::string cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1 = 0; - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValue(std::string,int) - cppSelf->setValue(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringNodeCreationPropertyFunc_setValue_TypeError: - const char* overloads[] = {"std::string, int = 0", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringNodeCreationProperty.setValue", overloads); - return 0; -} - -static PyMethodDef Sbk_StringNodeCreationProperty_methods[] = { - {"getValues", (PyCFunction)Sbk_StringNodeCreationPropertyFunc_getValues, METH_NOARGS}, - {"setValue", (PyCFunction)Sbk_StringNodeCreationPropertyFunc_setValue, METH_VARARGS|METH_KEYWORDS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_StringNodeCreationProperty_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_StringNodeCreationProperty_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_StringNodeCreationProperty_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.StringNodeCreationProperty", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_StringNodeCreationProperty_traverse, - /*tp_clear*/ Sbk_StringNodeCreationProperty_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_StringNodeCreationProperty_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_StringNodeCreationProperty_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_StringNodeCreationProperty_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::NodeCreationProperty >())) - return dynamic_cast< ::StringNodeCreationProperty*>(reinterpret_cast< ::NodeCreationProperty*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void StringNodeCreationProperty_PythonToCpp_StringNodeCreationProperty_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_StringNodeCreationProperty_Type, pyIn, cppOut); -} -static PythonToCppFunc is_StringNodeCreationProperty_PythonToCpp_StringNodeCreationProperty_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_StringNodeCreationProperty_Type)) - return StringNodeCreationProperty_PythonToCpp_StringNodeCreationProperty_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* StringNodeCreationProperty_PTR_CppToPython_StringNodeCreationProperty(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::StringNodeCreationProperty*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_StringNodeCreationProperty_Type, const_cast(cppIn), false, false, typeName); -} - -void init_StringNodeCreationProperty(PyObject* module) -{ - SbkNatronEngineTypes[SBK_STRINGNODECREATIONPROPERTY_IDX] = reinterpret_cast(&Sbk_StringNodeCreationProperty_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "StringNodeCreationProperty", "StringNodeCreationProperty*", - &Sbk_StringNodeCreationProperty_Type, &Shiboken::callCppDestructor< ::StringNodeCreationProperty >, (SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_StringNodeCreationProperty_Type, - StringNodeCreationProperty_PythonToCpp_StringNodeCreationProperty_PTR, - is_StringNodeCreationProperty_PythonToCpp_StringNodeCreationProperty_PTR_Convertible, - StringNodeCreationProperty_PTR_CppToPython_StringNodeCreationProperty); - - Shiboken::Conversions::registerConverterName(converter, "StringNodeCreationProperty"); - Shiboken::Conversions::registerConverterName(converter, "StringNodeCreationProperty*"); - Shiboken::Conversions::registerConverterName(converter, "StringNodeCreationProperty&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringNodeCreationProperty).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringNodeCreationPropertyWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_StringNodeCreationProperty_Type, &Sbk_StringNodeCreationProperty_typeDiscovery); - - - StringNodeCreationPropertyWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.h b/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.h deleted file mode 100644 index d4bbbd7f77..0000000000 --- a/Engine/Qt4/NatronEngine/stringnodecreationproperty_wrapper.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SBK_STRINGNODECREATIONPROPERTYWRAPPER_H -#define SBK_STRINGNODECREATIONPROPERTYWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class StringNodeCreationPropertyWrapper : public StringNodeCreationProperty -{ -public: - StringNodeCreationPropertyWrapper(const std::string & value); - StringNodeCreationPropertyWrapper(const std::vector & values = std::vector< std::string >()); - virtual ~StringNodeCreationPropertyWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_STRINGNODECREATIONPROPERTYWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/stringparam_wrapper.cpp b/Engine/Qt4/NatronEngine/stringparam_wrapper.cpp deleted file mode 100644 index 3c219df837..0000000000 --- a/Engine/Qt4/NatronEngine/stringparam_wrapper.cpp +++ /dev/null @@ -1,268 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "stringparam_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void StringParamWrapper::pysideInitQtMetaTypes() -{ - qRegisterMetaType< ::StringParam::TypeEnum >("StringParam::TypeEnum"); -} - -StringParamWrapper::~StringParamWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_StringParamFunc_setType(PyObject* self, PyObject* pyArg) -{ - StringParamWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamWrapper*)((::StringParam*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAM_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setType(StringParam::TypeEnum) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX]), (pyArg)))) { - overloadId = 0; // setType(StringParam::TypeEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamFunc_setType_TypeError; - - // Call function/method - { - ::StringParam::TypeEnum cppArg0 = ((::StringParam::TypeEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setType(StringParam::TypeEnum) - cppSelf->setType(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringParamFunc_setType_TypeError: - const char* overloads[] = {"NatronEngine.StringParam.TypeEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.StringParam.setType", overloads); - return 0; -} - -static PyMethodDef Sbk_StringParam_methods[] = { - {"setType", (PyCFunction)Sbk_StringParamFunc_setType, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_StringParam_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_StringParam_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_StringParam_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.StringParam", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_StringParam_traverse, - /*tp_clear*/ Sbk_StringParam_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_StringParam_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_StringParam_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::StringParam*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ enum conversion. -static void StringParam_TypeEnum_PythonToCpp_StringParam_TypeEnum(PyObject* pyIn, void* cppOut) { - *((::StringParam::TypeEnum*)cppOut) = (::StringParam::TypeEnum) Shiboken::Enum::getValue(pyIn); - -} -static PythonToCppFunc is_StringParam_TypeEnum_PythonToCpp_StringParam_TypeEnum_Convertible(PyObject* pyIn) { - if (PyObject_TypeCheck(pyIn, SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX])) - return StringParam_TypeEnum_PythonToCpp_StringParam_TypeEnum; - return 0; -} -static PyObject* StringParam_TypeEnum_CppToPython_StringParam_TypeEnum(const void* cppIn) { - int castCppIn = *((::StringParam::TypeEnum*)cppIn); - return Shiboken::Enum::newItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], castCppIn); - -} - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void StringParam_PythonToCpp_StringParam_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_StringParam_Type, pyIn, cppOut); -} -static PythonToCppFunc is_StringParam_PythonToCpp_StringParam_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_StringParam_Type)) - return StringParam_PythonToCpp_StringParam_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* StringParam_PTR_CppToPython_StringParam(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::StringParam*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_StringParam_Type, const_cast(cppIn), false, false, typeName); -} - -void init_StringParam(PyObject* module) -{ - SbkNatronEngineTypes[SBK_STRINGPARAM_IDX] = reinterpret_cast(&Sbk_StringParam_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "StringParam", "StringParam*", - &Sbk_StringParam_Type, &Shiboken::callCppDestructor< ::StringParam >, (SbkObjectType*)SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_StringParam_Type, - StringParam_PythonToCpp_StringParam_PTR, - is_StringParam_PythonToCpp_StringParam_PTR_Convertible, - StringParam_PTR_CppToPython_StringParam); - - Shiboken::Conversions::registerConverterName(converter, "StringParam"); - Shiboken::Conversions::registerConverterName(converter, "StringParam*"); - Shiboken::Conversions::registerConverterName(converter, "StringParam&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringParam).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringParamWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_StringParam_Type, &Sbk_StringParam_typeDiscovery); - - // Initialization of enums. - - // Initialization of enum 'TypeEnum'. - SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX] = Shiboken::Enum::createScopedEnum(&Sbk_StringParam_Type, - "TypeEnum", - "NatronEngine.StringParam.TypeEnum", - "StringParam::TypeEnum"); - if (!SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX]) - return ; - - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - &Sbk_StringParam_Type, "eStringTypeLabel", (long) StringParam::eStringTypeLabel)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - &Sbk_StringParam_Type, "eStringTypeMultiLine", (long) StringParam::eStringTypeMultiLine)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - &Sbk_StringParam_Type, "eStringTypeRichTextMultiLine", (long) StringParam::eStringTypeRichTextMultiLine)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - &Sbk_StringParam_Type, "eStringTypeCustom", (long) StringParam::eStringTypeCustom)) - return ; - if (!Shiboken::Enum::createScopedEnumItem(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - &Sbk_StringParam_Type, "eStringTypeDefault", (long) StringParam::eStringTypeDefault)) - return ; - // Register converter for enum 'StringParam::TypeEnum'. - { - SbkConverter* converter = Shiboken::Conversions::createConverter(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], - StringParam_TypeEnum_CppToPython_StringParam_TypeEnum); - Shiboken::Conversions::addPythonToCppValueConversion(converter, - StringParam_TypeEnum_PythonToCpp_StringParam_TypeEnum, - is_StringParam_TypeEnum_PythonToCpp_StringParam_TypeEnum_Convertible); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], converter); - Shiboken::Enum::setTypeConverter(SbkNatronEngineTypes[SBK_STRINGPARAM_TYPEENUM_IDX], converter); - Shiboken::Conversions::registerConverterName(converter, "StringParam::TypeEnum"); - Shiboken::Conversions::registerConverterName(converter, "TypeEnum"); - } - // End of 'TypeEnum' enum. - - - StringParamWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/stringparam_wrapper.h b/Engine/Qt4/NatronEngine/stringparam_wrapper.h deleted file mode 100644 index 9a6670fbdc..0000000000 --- a/Engine/Qt4/NatronEngine/stringparam_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_STRINGPARAMWRAPPER_H -#define SBK_STRINGPARAMWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class StringParamWrapper : public StringParam -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { StringParam::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~StringParamWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_STRINGPARAMWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/stringparambase_wrapper.cpp b/Engine/Qt4/NatronEngine/stringparambase_wrapper.cpp deleted file mode 100644 index 304fe9f78d..0000000000 --- a/Engine/Qt4/NatronEngine/stringparambase_wrapper.cpp +++ /dev/null @@ -1,647 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "stringparambase_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void StringParamBaseWrapper::pysideInitQtMetaTypes() -{ -} - -StringParamBaseWrapper::~StringParamBaseWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_StringParamBaseFunc_addAsDependencyOf(PyObject* self, PyObject* args) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "addAsDependencyOf", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: addAsDependencyOf(int,Param*,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // addAsDependencyOf(int,Param*,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_addAsDependencyOf_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::Param* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // addAsDependencyOf(int,Param*,int) - QString cppResult = cppSelf->addAsDependencyOf(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_StringParamBaseFunc_addAsDependencyOf_TypeError: - const char* overloads[] = {"int, NatronEngine.Param, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringParamBase.addAsDependencyOf", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_get(PyObject* self, PyObject* args) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "get", 0, 1, &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: get()const - // 1: get(double)const - if (numArgs == 0) { - overloadId = 0; // get()const - } else if (numArgs == 1 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 1; // get(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_get_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // get() const - { - - if (!PyErr_Occurred()) { - // get()const - QString cppResult = const_cast(cppSelf)->get(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - break; - } - case 1: // get(double frame) const - { - double cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // get(double)const - QString cppResult = const_cast(cppSelf)->get(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - break; - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_StringParamBaseFunc_get_TypeError: - const char* overloads[] = {"", "float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringParamBase.get", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_getDefaultValue(PyObject* self) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getDefaultValue()const - QString cppResult = const_cast(cppSelf)->getDefaultValue(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_StringParamBaseFunc_getValue(PyObject* self) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getValue()const - QString cppResult = const_cast(cppSelf)->getValue(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_StringParamBaseFunc_getValueAtTime(PyObject* self, PyObject* pyArg) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getValueAtTime(double)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getValueAtTime(double)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_getValueAtTime_TypeError; - - // Call function/method - { - double cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getValueAtTime(double)const - QString cppResult = const_cast(cppSelf)->getValueAtTime(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_StringParamBaseFunc_getValueAtTime_TypeError: - const char* overloads[] = {"float", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.StringParamBase.getValueAtTime", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_restoreDefaultValue(PyObject* self) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // restoreDefaultValue() - cppSelf->restoreDefaultValue(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_StringParamBaseFunc_set(PyObject* self, PyObject* args) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "set", 1, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: set(QString) - // 1: set(QString,double) - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // set(QString) - } else if (numArgs == 2 - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 1; // set(QString,double) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_set_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // set(const QString & x) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // set(QString) - cppSelf->set(cppArg0); - } - break; - } - case 1: // set(const QString & x, double frame) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // set(QString,double) - cppSelf->set(cppArg0, cppArg1); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringParamBaseFunc_set_TypeError: - const char* overloads[] = {"unicode", "unicode, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringParamBase.set", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_setDefaultValue(PyObject* self, PyObject* pyArg) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setDefaultValue(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setDefaultValue(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_setDefaultValue_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setDefaultValue(QString) - cppSelf->setDefaultValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringParamBaseFunc_setDefaultValue_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.StringParamBase.setDefaultValue", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_setValue(PyObject* self, PyObject* pyArg) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setValue(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setValue(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_setValue_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setValue(QString) - cppSelf->setValue(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringParamBaseFunc_setValue_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.StringParamBase.setValue", overloads); - return 0; -} - -static PyObject* Sbk_StringParamBaseFunc_setValueAtTime(PyObject* self, PyObject* args) -{ - StringParamBaseWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (StringParamBaseWrapper*)((::StringParamBase*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setValueAtTime", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setValueAtTime(QString,double) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setValueAtTime(QString,double) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_StringParamBaseFunc_setValueAtTime_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - double cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setValueAtTime(QString,double) - cppSelf->setValueAtTime(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_StringParamBaseFunc_setValueAtTime_TypeError: - const char* overloads[] = {"unicode, float", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.StringParamBase.setValueAtTime", overloads); - return 0; -} - -static PyMethodDef Sbk_StringParamBase_methods[] = { - {"addAsDependencyOf", (PyCFunction)Sbk_StringParamBaseFunc_addAsDependencyOf, METH_VARARGS}, - {"get", (PyCFunction)Sbk_StringParamBaseFunc_get, METH_VARARGS}, - {"getDefaultValue", (PyCFunction)Sbk_StringParamBaseFunc_getDefaultValue, METH_NOARGS}, - {"getValue", (PyCFunction)Sbk_StringParamBaseFunc_getValue, METH_NOARGS}, - {"getValueAtTime", (PyCFunction)Sbk_StringParamBaseFunc_getValueAtTime, METH_O}, - {"restoreDefaultValue", (PyCFunction)Sbk_StringParamBaseFunc_restoreDefaultValue, METH_NOARGS}, - {"set", (PyCFunction)Sbk_StringParamBaseFunc_set, METH_VARARGS}, - {"setDefaultValue", (PyCFunction)Sbk_StringParamBaseFunc_setDefaultValue, METH_O}, - {"setValue", (PyCFunction)Sbk_StringParamBaseFunc_setValue, METH_O}, - {"setValueAtTime", (PyCFunction)Sbk_StringParamBaseFunc_setValueAtTime, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_StringParamBase_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_StringParamBase_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_StringParamBase_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.StringParamBase", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_StringParamBase_traverse, - /*tp_clear*/ Sbk_StringParamBase_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_StringParamBase_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_StringParamBase_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Param >())) - return dynamic_cast< ::StringParamBase*>(reinterpret_cast< ::Param*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void StringParamBase_PythonToCpp_StringParamBase_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_StringParamBase_Type, pyIn, cppOut); -} -static PythonToCppFunc is_StringParamBase_PythonToCpp_StringParamBase_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_StringParamBase_Type)) - return StringParamBase_PythonToCpp_StringParamBase_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* StringParamBase_PTR_CppToPython_StringParamBase(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::StringParamBase*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_StringParamBase_Type, const_cast(cppIn), false, false, typeName); -} - -void init_StringParamBase(PyObject* module) -{ - SbkNatronEngineTypes[SBK_STRINGPARAMBASE_IDX] = reinterpret_cast(&Sbk_StringParamBase_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "StringParamBase", "StringParamBase*", - &Sbk_StringParamBase_Type, &Shiboken::callCppDestructor< ::StringParamBase >, (SbkObjectType*)SbkNatronEngineTypes[SBK_ANIMATEDPARAM_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_StringParamBase_Type, - StringParamBase_PythonToCpp_StringParamBase_PTR, - is_StringParamBase_PythonToCpp_StringParamBase_PTR_Convertible, - StringParamBase_PTR_CppToPython_StringParamBase); - - Shiboken::Conversions::registerConverterName(converter, "StringParamBase"); - Shiboken::Conversions::registerConverterName(converter, "StringParamBase*"); - Shiboken::Conversions::registerConverterName(converter, "StringParamBase&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringParamBase).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::StringParamBaseWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_StringParamBase_Type, &Sbk_StringParamBase_typeDiscovery); - - - StringParamBaseWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/stringparambase_wrapper.h b/Engine/Qt4/NatronEngine/stringparambase_wrapper.h deleted file mode 100644 index 7763e7cc6d..0000000000 --- a/Engine/Qt4/NatronEngine/stringparambase_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_STRINGPARAMBASEWRAPPER_H -#define SBK_STRINGPARAMBASEWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class StringParamBaseWrapper : public StringParamBase -{ -public: - inline void _addAsDependencyOf_protected(int fromExprDimension, Param * param, int thisDimension) { StringParamBase::_addAsDependencyOf(fromExprDimension, param, thisDimension); } - virtual ~StringParamBaseWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_STRINGPARAMBASEWRAPPER_H - diff --git a/Engine/Qt4/NatronEngine/track_wrapper.cpp b/Engine/Qt4/NatronEngine/track_wrapper.cpp deleted file mode 100644 index 57198a6e07..0000000000 --- a/Engine/Qt4/NatronEngine/track_wrapper.cpp +++ /dev/null @@ -1,332 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "track_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_TrackFunc_getParam(PyObject* self, PyObject* pyArg) -{ - ::Track* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Track*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACK_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_TrackFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_TrackFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Track.getParam", overloads); - return 0; -} - -static PyObject* Sbk_TrackFunc_getParams(PyObject* self) -{ - ::Track* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Track*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACK_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParams()const - // Begin code injection - - std::list params = cppSelf->getParams(); - PyObject* ret = PyList_New((int) params.size()); - int idx = 0; - for (std::list::iterator it = params.begin(); it!=params.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_TrackFunc_getScriptName(PyObject* self) -{ - ::Track* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Track*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACK_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getScriptName()const - QString cppResult = const_cast(cppSelf)->getScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_TrackFunc_reset(PyObject* self) -{ - ::Track* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Track*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACK_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // reset() - cppSelf->reset(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_TrackFunc_setScriptName(PyObject* self, PyObject* pyArg) -{ - ::Track* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Track*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACK_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setScriptName(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setScriptName(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_TrackFunc_setScriptName_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setScriptName(QString) - cppSelf->setScriptName(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_TrackFunc_setScriptName_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Track.setScriptName", overloads); - return 0; -} - -static PyMethodDef Sbk_Track_methods[] = { - {"getParam", (PyCFunction)Sbk_TrackFunc_getParam, METH_O}, - {"getParams", (PyCFunction)Sbk_TrackFunc_getParams, METH_NOARGS}, - {"getScriptName", (PyCFunction)Sbk_TrackFunc_getScriptName, METH_NOARGS}, - {"reset", (PyCFunction)Sbk_TrackFunc_reset, METH_NOARGS}, - {"setScriptName", (PyCFunction)Sbk_TrackFunc_setScriptName, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Track_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Track_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Track_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Track", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Track_traverse, - /*tp_clear*/ Sbk_Track_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Track_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Track_PythonToCpp_Track_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Track_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Track_PythonToCpp_Track_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Track_Type)) - return Track_PythonToCpp_Track_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Track_PTR_CppToPython_Track(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Track*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Track_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Track(PyObject* module) -{ - SbkNatronEngineTypes[SBK_TRACK_IDX] = reinterpret_cast(&Sbk_Track_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Track", "Track*", - &Sbk_Track_Type, &Shiboken::callCppDestructor< ::Track >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Track_Type, - Track_PythonToCpp_Track_PTR, - is_Track_PythonToCpp_Track_PTR_Convertible, - Track_PTR_CppToPython_Track); - - Shiboken::Conversions::registerConverterName(converter, "Track"); - Shiboken::Conversions::registerConverterName(converter, "Track*"); - Shiboken::Conversions::registerConverterName(converter, "Track&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Track).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/track_wrapper.h b/Engine/Qt4/NatronEngine/track_wrapper.h deleted file mode 100644 index f46d72b706..0000000000 --- a/Engine/Qt4/NatronEngine/track_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_TRACK_H -#define SBK_TRACK_H - -#include - -#include - -#endif // SBK_TRACK_H - diff --git a/Engine/Qt4/NatronEngine/tracker_wrapper.cpp b/Engine/Qt4/NatronEngine/tracker_wrapper.cpp deleted file mode 100644 index 68436caf5a..0000000000 --- a/Engine/Qt4/NatronEngine/tracker_wrapper.cpp +++ /dev/null @@ -1,401 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "tracker_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_TrackerFunc_createTrack(PyObject* self) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // createTrack() - Track * cppResult = cppSelf->createTrack(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_TrackerFunc_getAllTracks(PyObject* self) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getAllTracks(std::list*)const - // Begin code injection - - std::list tracks; - cppSelf->getAllTracks(&tracks); - PyObject* ret = PyList_New((int) tracks.size()); - int idx = 0; - for (std::list::iterator it = tracks.begin(); it!=tracks.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_TrackerFunc_getSelectedTracks(PyObject* self) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getSelectedTracks(std::list*)const - // Begin code injection - - std::list tracks; - cppSelf->getSelectedTracks(&tracks); - PyObject* ret = PyList_New((int) tracks.size()); - int idx = 0; - for (std::list::iterator it = tracks.begin(); it!=tracks.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - pyResult = Py_None; - Py_INCREF(Py_None); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_TrackerFunc_getTrackByName(PyObject* self, PyObject* pyArg) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getTrackByName(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getTrackByName(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_TrackerFunc_getTrackByName_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getTrackByName(QString)const - Track * cppResult = const_cast(cppSelf)->getTrackByName(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_TRACK_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_TrackerFunc_getTrackByName_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.Tracker.getTrackByName", overloads); - return 0; -} - -static PyObject* Sbk_TrackerFunc_startTracking(PyObject* self, PyObject* args) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "startTracking", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: startTracking(std::list,int,int,bool) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronEngineTypeConverters[SBK_NATRONENGINE_STD_LIST_TRACKPTR_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // startTracking(std::list,int,int,bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_TrackerFunc_startTracking_TypeError; - - // Call function/method - { - ::std::list cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - bool cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // startTracking(std::list,int,int,bool) - cppSelf->startTracking(cppArg0, cppArg1, cppArg2, cppArg3); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_TrackerFunc_startTracking_TypeError: - const char* overloads[] = {"list, int, int, bool", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.Tracker.startTracking", overloads); - return 0; -} - -static PyObject* Sbk_TrackerFunc_stopTracking(PyObject* self) -{ - ::Tracker* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::Tracker*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_TRACKER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // stopTracking() - cppSelf->stopTracking(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyMethodDef Sbk_Tracker_methods[] = { - {"createTrack", (PyCFunction)Sbk_TrackerFunc_createTrack, METH_NOARGS}, - {"getAllTracks", (PyCFunction)Sbk_TrackerFunc_getAllTracks, METH_NOARGS}, - {"getSelectedTracks", (PyCFunction)Sbk_TrackerFunc_getSelectedTracks, METH_NOARGS}, - {"getTrackByName", (PyCFunction)Sbk_TrackerFunc_getTrackByName, METH_O}, - {"startTracking", (PyCFunction)Sbk_TrackerFunc_startTracking, METH_VARARGS}, - {"stopTracking", (PyCFunction)Sbk_TrackerFunc_stopTracking, METH_NOARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_Tracker_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_Tracker_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_Tracker_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.Tracker", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_Tracker_traverse, - /*tp_clear*/ Sbk_Tracker_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_Tracker_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void Tracker_PythonToCpp_Tracker_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_Tracker_Type, pyIn, cppOut); -} -static PythonToCppFunc is_Tracker_PythonToCpp_Tracker_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_Tracker_Type)) - return Tracker_PythonToCpp_Tracker_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* Tracker_PTR_CppToPython_Tracker(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::Tracker*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_Tracker_Type, const_cast(cppIn), false, false, typeName); -} - -void init_Tracker(PyObject* module) -{ - SbkNatronEngineTypes[SBK_TRACKER_IDX] = reinterpret_cast(&Sbk_Tracker_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "Tracker", "Tracker*", - &Sbk_Tracker_Type, &Shiboken::callCppDestructor< ::Tracker >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_Tracker_Type, - Tracker_PythonToCpp_Tracker_PTR, - is_Tracker_PythonToCpp_Tracker_PTR_Convertible, - Tracker_PTR_CppToPython_Tracker); - - Shiboken::Conversions::registerConverterName(converter, "Tracker"); - Shiboken::Conversions::registerConverterName(converter, "Tracker*"); - Shiboken::Conversions::registerConverterName(converter, "Tracker&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::Tracker).name()); - - - -} diff --git a/Engine/Qt4/NatronEngine/tracker_wrapper.h b/Engine/Qt4/NatronEngine/tracker_wrapper.h deleted file mode 100644 index 1ee1edfaa5..0000000000 --- a/Engine/Qt4/NatronEngine/tracker_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_TRACKER_H -#define SBK_TRACKER_H - -#include - -#include - -#endif // SBK_TRACKER_H - diff --git a/Engine/Qt4/NatronEngine/userparamholder_wrapper.cpp b/Engine/Qt4/NatronEngine/userparamholder_wrapper.cpp deleted file mode 100644 index 235211c5a3..0000000000 --- a/Engine/Qt4/NatronEngine/userparamholder_wrapper.cpp +++ /dev/null @@ -1,1394 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natronengine_python.h" - -#include "userparamholder_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include - - -// Native --------------------------------------------------------- - -void UserParamHolderWrapper::pysideInitQtMetaTypes() -{ -} - -UserParamHolderWrapper::UserParamHolderWrapper() : UserParamHolder() { - // ... middle -} - -UserParamHolderWrapper::~UserParamHolderWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_UserParamHolder_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::UserParamHolder >())) - return -1; - - ::UserParamHolderWrapper* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // UserParamHolder() - cptr = new ::UserParamHolderWrapper(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::UserParamHolder >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyObject* Sbk_UserParamHolderFunc_createBooleanParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createBooleanParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createBooleanParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createBooleanParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createBooleanParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createBooleanParam(QString,QString) - BooleanParam * cppResult = cppSelf->createBooleanParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BOOLEANPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createBooleanParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createBooleanParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createButtonParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createButtonParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createButtonParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createButtonParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createButtonParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createButtonParam(QString,QString) - ButtonParam * cppResult = cppSelf->createButtonParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_BUTTONPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createButtonParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createButtonParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createChoiceParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createChoiceParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createChoiceParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createChoiceParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createChoiceParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createChoiceParam(QString,QString) - ChoiceParam * cppResult = cppSelf->createChoiceParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_CHOICEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createChoiceParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createChoiceParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createColorParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createColorParam", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: createColorParam(QString,QString,bool) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // createColorParam(QString,QString,bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createColorParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - bool cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // createColorParam(QString,QString,bool) - ColorParam * cppResult = cppSelf->createColorParam(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createColorParam_TypeError: - const char* overloads[] = {"unicode, unicode, bool", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createColorParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createDouble2DParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createDouble2DParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createDouble2DParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createDouble2DParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createDouble2DParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createDouble2DParam(QString,QString) - Double2DParam * cppResult = cppSelf->createDouble2DParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE2DPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createDouble2DParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createDouble2DParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createDouble3DParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createDouble3DParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createDouble3DParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createDouble3DParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createDouble3DParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createDouble3DParam(QString,QString) - Double3DParam * cppResult = cppSelf->createDouble3DParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLE3DPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createDouble3DParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createDouble3DParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createDoubleParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createDoubleParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createDoubleParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createDoubleParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createDoubleParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createDoubleParam(QString,QString) - DoubleParam * cppResult = cppSelf->createDoubleParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_DOUBLEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createDoubleParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createDoubleParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createFileParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createFileParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createFileParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createFileParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createFileParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createFileParam(QString,QString) - FileParam * cppResult = cppSelf->createFileParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_FILEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createFileParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createFileParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createGroupParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createGroupParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createGroupParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createGroupParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createGroupParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createGroupParam(QString,QString) - GroupParam * cppResult = cppSelf->createGroupParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUPPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createGroupParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createGroupParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createInt2DParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createInt2DParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createInt2DParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createInt2DParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createInt2DParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createInt2DParam(QString,QString) - Int2DParam * cppResult = cppSelf->createInt2DParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_INT2DPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createInt2DParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createInt2DParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createInt3DParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createInt3DParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createInt3DParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createInt3DParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createInt3DParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createInt3DParam(QString,QString) - Int3DParam * cppResult = cppSelf->createInt3DParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_INT3DPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createInt3DParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createInt3DParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createIntParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createIntParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createIntParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createIntParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createIntParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createIntParam(QString,QString) - IntParam * cppResult = cppSelf->createIntParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_INTPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createIntParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createIntParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createOutputFileParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createOutputFileParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createOutputFileParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createOutputFileParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createOutputFileParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createOutputFileParam(QString,QString) - OutputFileParam * cppResult = cppSelf->createOutputFileParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_OUTPUTFILEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createOutputFileParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createOutputFileParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createPageParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createPageParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createPageParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createPageParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createPageParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createPageParam(QString,QString) - PageParam * cppResult = cppSelf->createPageParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PAGEPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createPageParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createPageParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createParametricParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createParametricParam", 3, 3, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]))) - return 0; - - - // Overloaded function decisor - // 0: createParametricParam(QString,QString,int) - if (numArgs == 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - overloadId = 0; // createParametricParam(QString,QString,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createParametricParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - - if (!PyErr_Occurred()) { - // createParametricParam(QString,QString,int) - ParametricParam * cppResult = cppSelf->createParametricParam(cppArg0, cppArg1, cppArg2); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAMETRICPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createParametricParam_TypeError: - const char* overloads[] = {"unicode, unicode, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createParametricParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createPathParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createPathParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createPathParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createPathParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createPathParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createPathParam(QString,QString) - PathParam * cppResult = cppSelf->createPathParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PATHPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createPathParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createPathParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createSeparatorParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createSeparatorParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createSeparatorParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createSeparatorParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createSeparatorParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createSeparatorParam(QString,QString) - SeparatorParam * cppResult = cppSelf->createSeparatorParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_SEPARATORPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createSeparatorParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createSeparatorParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_createStringParam(PyObject* self, PyObject* args) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "createStringParam", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: createStringParam(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // createStringParam(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_createStringParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // createStringParam(QString,QString) - StringParam * cppResult = cppSelf->createStringParam(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_STRINGPARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_createStringParam_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronEngine.UserParamHolder.createStringParam", overloads); - return 0; -} - -static PyObject* Sbk_UserParamHolderFunc_refreshUserParamsGUI(PyObject* self) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // refreshUserParamsGUI() - // Begin code injection - - cppSelf->refreshUserParamsGUI(); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_UserParamHolderFunc_removeParam(PyObject* self, PyObject* pyArg) -{ - ::UserParamHolder* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::UserParamHolder*)Shiboken::Conversions::cppPointer(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: removeParam(Param*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], (pyArg)))) { - overloadId = 0; // removeParam(Param*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_UserParamHolderFunc_removeParam_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::Param* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // removeParam(Param*) - bool cppResult = cppSelf->removeParam(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_UserParamHolderFunc_removeParam_TypeError: - const char* overloads[] = {"NatronEngine.Param", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronEngine.UserParamHolder.removeParam", overloads); - return 0; -} - -static PyMethodDef Sbk_UserParamHolder_methods[] = { - {"createBooleanParam", (PyCFunction)Sbk_UserParamHolderFunc_createBooleanParam, METH_VARARGS}, - {"createButtonParam", (PyCFunction)Sbk_UserParamHolderFunc_createButtonParam, METH_VARARGS}, - {"createChoiceParam", (PyCFunction)Sbk_UserParamHolderFunc_createChoiceParam, METH_VARARGS}, - {"createColorParam", (PyCFunction)Sbk_UserParamHolderFunc_createColorParam, METH_VARARGS}, - {"createDouble2DParam", (PyCFunction)Sbk_UserParamHolderFunc_createDouble2DParam, METH_VARARGS}, - {"createDouble3DParam", (PyCFunction)Sbk_UserParamHolderFunc_createDouble3DParam, METH_VARARGS}, - {"createDoubleParam", (PyCFunction)Sbk_UserParamHolderFunc_createDoubleParam, METH_VARARGS}, - {"createFileParam", (PyCFunction)Sbk_UserParamHolderFunc_createFileParam, METH_VARARGS}, - {"createGroupParam", (PyCFunction)Sbk_UserParamHolderFunc_createGroupParam, METH_VARARGS}, - {"createInt2DParam", (PyCFunction)Sbk_UserParamHolderFunc_createInt2DParam, METH_VARARGS}, - {"createInt3DParam", (PyCFunction)Sbk_UserParamHolderFunc_createInt3DParam, METH_VARARGS}, - {"createIntParam", (PyCFunction)Sbk_UserParamHolderFunc_createIntParam, METH_VARARGS}, - {"createOutputFileParam", (PyCFunction)Sbk_UserParamHolderFunc_createOutputFileParam, METH_VARARGS}, - {"createPageParam", (PyCFunction)Sbk_UserParamHolderFunc_createPageParam, METH_VARARGS}, - {"createParametricParam", (PyCFunction)Sbk_UserParamHolderFunc_createParametricParam, METH_VARARGS}, - {"createPathParam", (PyCFunction)Sbk_UserParamHolderFunc_createPathParam, METH_VARARGS}, - {"createSeparatorParam", (PyCFunction)Sbk_UserParamHolderFunc_createSeparatorParam, METH_VARARGS}, - {"createStringParam", (PyCFunction)Sbk_UserParamHolderFunc_createStringParam, METH_VARARGS}, - {"refreshUserParamsGUI", (PyCFunction)Sbk_UserParamHolderFunc_refreshUserParamsGUI, METH_NOARGS}, - {"removeParam", (PyCFunction)Sbk_UserParamHolderFunc_removeParam, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_UserParamHolder_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_UserParamHolder_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_UserParamHolder_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronEngine.UserParamHolder", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_UserParamHolder_traverse, - /*tp_clear*/ Sbk_UserParamHolder_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_UserParamHolder_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_UserParamHolder_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void UserParamHolder_PythonToCpp_UserParamHolder_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_UserParamHolder_Type, pyIn, cppOut); -} -static PythonToCppFunc is_UserParamHolder_PythonToCpp_UserParamHolder_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_UserParamHolder_Type)) - return UserParamHolder_PythonToCpp_UserParamHolder_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* UserParamHolder_PTR_CppToPython_UserParamHolder(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::UserParamHolder*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_UserParamHolder_Type, const_cast(cppIn), false, false, typeName); -} - -void init_UserParamHolder(PyObject* module) -{ - SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX] = reinterpret_cast(&Sbk_UserParamHolder_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "UserParamHolder", "UserParamHolder*", - &Sbk_UserParamHolder_Type, &Shiboken::callCppDestructor< ::UserParamHolder >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_UserParamHolder_Type, - UserParamHolder_PythonToCpp_UserParamHolder_PTR, - is_UserParamHolder_PythonToCpp_UserParamHolder_PTR_Convertible, - UserParamHolder_PTR_CppToPython_UserParamHolder); - - Shiboken::Conversions::registerConverterName(converter, "UserParamHolder"); - Shiboken::Conversions::registerConverterName(converter, "UserParamHolder*"); - Shiboken::Conversions::registerConverterName(converter, "UserParamHolder&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::UserParamHolder).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::UserParamHolderWrapper).name()); - - - - UserParamHolderWrapper::pysideInitQtMetaTypes(); -} diff --git a/Engine/Qt4/NatronEngine/userparamholder_wrapper.h b/Engine/Qt4/NatronEngine/userparamholder_wrapper.h deleted file mode 100644 index c7b1be40ae..0000000000 --- a/Engine/Qt4/NatronEngine/userparamholder_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_USERPARAMHOLDERWRAPPER_H -#define SBK_USERPARAMHOLDERWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class UserParamHolderWrapper : public UserParamHolder -{ -public: - UserParamHolderWrapper(); - virtual ~UserParamHolderWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_USERPARAMHOLDERWRAPPER_H - diff --git a/Engine/RotoContext.cpp b/Engine/RotoContext.cpp index d1f850fc4b..e07710d6ef 100644 --- a/Engine/RotoContext.cpp +++ b/Engine/RotoContext.cpp @@ -4469,11 +4469,8 @@ RotoContextPrivate::bezulate(double time, QPointF intersectionPoint; for (; cur != polygon.end(); ++cur, ++last_pt) { QLineF polygonSegment( QPointF(last_pt->x, last_pt->y), QPointF(cur->x, cur->y) ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType intersectType = line.intersects(polygonSegment, &intersectionPoint); -#else - QLineF::IntersectType intersectType = line.intersect(polygonSegment, &intersectionPoint); -#endif + if (intersectType == QLineF::BoundedIntersection) { intersections.insert(intersectionPoint); } diff --git a/Engine/StandardPaths.cpp b/Engine/StandardPaths.cpp index d7a50c85b1..8c95536c65 100644 --- a/Engine/StandardPaths.cpp +++ b/Engine/StandardPaths.cpp @@ -31,9 +31,7 @@ #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include "Global/GlobalDefines.h" @@ -71,26 +69,6 @@ StandardPaths::StandardPaths() { } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -void -StandardPaths::appendOrganizationAndApp(QString &path) -{ -#ifndef QT_BOOTSTRAPPED - const QString org = QCoreApplication::organizationName(); - if ( !org.isEmpty() ) { - path += QLatin1Char('/') + org; - } - const QString appName = QCoreApplication::applicationName(); - if ( !appName.isEmpty() ) { - path += QLatin1Char('/') + appName; - } -#else - Q_UNUSED(path); -#endif -} - -#endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - NATRON_NAMESPACE_ANONYMOUS_ENTER @@ -297,15 +275,7 @@ macLocation(NATRON_NAMESPACE::StandardPaths::StandardLocationEnum type, short do return QString(); } - QString path = getFullPath(ref); - -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - if ( (type == NATRON_NAMESPACE::StandardPaths::eStandardLocationData) || (type == NATRON_NAMESPACE::StandardPaths::eStandardLocationCache) ) { - NATRON_NAMESPACE::StandardPaths::appendOrganizationAndApp(path); - } -#endif - - return path; + return getFullPath(ref); } CLANG_DIAG_ON(deprecated) @@ -317,311 +287,6 @@ NATRON_NAMESPACE_ANONYMOUS_EXIT QString StandardPaths::writableLocation(StandardLocationEnum type) { -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#if defined(Q_OS_DARWIN) - switch (type) { - case eStandardLocationHome: - - return QDir::homePath(); - case eStandardLocationTemp: - - return QDir::tempPath(); - case eStandardLocationGenericData: - case eStandardLocationData: - case eStandardLocationGenericCache: - case eStandardLocationCache: - case eStandardLocationRuntime: - - return macLocation(type, kUserDomain); - default: - - return macLocation(type, kOnAppropriateDisk); - } -#elif defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD) - switch (type) { - case eStandardLocationHome: - - return QDir::homePath(); - case eStandardLocationTemp: - - return QDir::tempPath(); - case eStandardLocationCache: - case eStandardLocationGenericCache: { - // http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html - QString xdgCacheHome = QFile::decodeName( qgetenv("XDG_CACHE_HOME") ); - if ( xdgCacheHome.isEmpty() ) { - xdgCacheHome = QDir::homePath() + QLatin1String("/.cache"); - } - if (type == StandardPaths::eStandardLocationCache) { - appendOrganizationAndApp(xdgCacheHome); - } - - return xdgCacheHome; - } - case eStandardLocationData: - case eStandardLocationGenericData: { - QString xdgDataHome = QFile::decodeName( qgetenv("XDG_DATA_HOME") ); - if ( xdgDataHome.isEmpty() ) { - xdgDataHome = QDir::homePath() + QLatin1String("/.local/share"); - } - if (type == StandardPaths::eStandardLocationData) { - appendOrganizationAndApp(xdgDataHome); - } - - return xdgDataHome; - } - case eStandardLocationConfig: { - // http://standards.freedesktop.org/basedir-spec/latest/ - QString xdgConfigHome = QFile::decodeName( qgetenv("XDG_CONFIG_HOME") ); - if ( xdgConfigHome.isEmpty() ) { - xdgConfigHome = QDir::homePath() + QLatin1String("/.config"); - } - - return xdgConfigHome; - } - case eStandardLocationRuntime: { - const uid_t myUid = geteuid(); - // http://standards.freedesktop.org/basedir-spec/latest/ - QString xdgRuntimeDir = QFile::decodeName( qgetenv("XDG_RUNTIME_DIR") ); - if ( xdgRuntimeDir.isEmpty() ) { - const QString userName = resolveUserName(myUid); - xdgRuntimeDir = QDir::tempPath() + QLatin1String("/runtime-") + userName; - QDir dir(xdgRuntimeDir); - if ( !dir.exists() ) { - if ( !QDir().mkdir(xdgRuntimeDir) ) { - qWarning( "QStandardPaths: error creating runtime directory %s: %s", qPrintable(xdgRuntimeDir), qPrintable( qt_error_string(errno) ) ); - - return QString(); - } - } - qWarning( "QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '%s'", qPrintable(xdgRuntimeDir) ); - } - // "The directory MUST be owned by the user" - QFileInfo fileInfo(xdgRuntimeDir); - if (fileInfo.ownerId() != myUid) { - qWarning("QStandardPaths: wrong ownership on runtime directory %s, %d instead of %d", qPrintable(xdgRuntimeDir), - fileInfo.ownerId(), myUid); - - return QString(); - } - // "and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700." - QFile file(xdgRuntimeDir); - const QFile::Permissions wantedPerms = QFile::ReadUser | QFile::WriteUser | QFile::ExeUser; - if ( (file.permissions() != wantedPerms) && !file.setPermissions(wantedPerms) ) { - qWarning( "QStandardPaths: wrong permissions on runtime directory %s", qPrintable(xdgRuntimeDir) ); - - return QString(); - } - - return xdgRuntimeDir; - } - default: - break; - } // switch - -#ifndef QT_BOOTSTRAPPED - // http://www.freedesktop.org/wiki/Software/xdg-user-dirs - QString xdgConfigHome = QFile::decodeName( qgetenv("XDG_CONFIG_HOME") ); - if ( xdgConfigHome.isEmpty() ) { - xdgConfigHome = QDir::homePath() + QLatin1String("/.config"); - } - QFile file( xdgConfigHome + QLatin1String("/user-dirs.dirs") ); - if ( file.open(QIODevice::ReadOnly) ) { - QHash lines; - QTextStream stream(&file); - // Only look for lines like: XDG_DESKTOP_DIR="$HOME/Desktop" - QRegExp exp( QLatin1String("^XDG_(.*)_DIR=(.*)$") ); - while ( !stream.atEnd() ) { - const QString &line = stream.readLine(); - if (exp.indexIn(line) != -1) { - const QStringList lst = exp.capturedTexts(); - const QString key = lst.at(1); - QString value = lst.at(2); - if ( (value.length() > 2) - && value.startsWith( QLatin1Char('\"') ) - && value.endsWith( QLatin1Char('\"') ) ) { - value = value.mid(1, value.length() - 2); - } - // Store the key and value: "DESKTOP", "$HOME/Desktop" - lines[key] = value; - } - } - - QString key; - switch (type) { - case eStandardLocationDesktop: - key = QLatin1String("DESKTOP"); - break; - case eStandardLocationDocuments: - key = QLatin1String("DOCUMENTS"); - break; - case eStandardLocationPictures: - key = QLatin1String("PICTURES"); - break; - case eStandardLocationMusic: - key = QLatin1String("MUSIC"); - break; - case eStandardLocationMovies: - key = QLatin1String("VIDEOS"); - break; - case eStandardLocationDownload: - key = QLatin1String("DOWNLOAD"); - break; - default: - break; - } - if ( !key.isEmpty() ) { - QString value = lines.value(key); - if ( !value.isEmpty() ) { - // value can start with $HOME - if ( value.startsWith( QLatin1String("$HOME") ) ) { - value = QDir::homePath() + value.mid(5); - } - - return value; - } - } - } -#endif // ifndef QT_BOOTSTRAPPED - - QString path; - switch (type) { - case eStandardLocationDesktop: - path = QDir::homePath() + QLatin1String("/Desktop"); - break; - case eStandardLocationDocuments: - path = QDir::homePath() + QLatin1String("/Documents"); - break; - case eStandardLocationPictures: - path = QDir::homePath() + QLatin1String("/Pictures"); - break; - - case eStandardLocationFonts: - path = QDir::homePath() + QLatin1String("/.fonts"); - break; - - case eStandardLocationMusic: - path = QDir::homePath() + QLatin1String("/Music"); - break; - - case eStandardLocationMovies: - path = QDir::homePath() + QLatin1String("/Videos"); - break; - case eStandardLocationDownload: - path = QDir::homePath() + QLatin1String("/Downloads"); - break; - case eStandardLocationApplications: - path = writableLocation(eStandardLocationGenericData) + QLatin1String("/applications"); - break; - - default: - break; - } - - return path; -#elif defined(Q_OS_WIN) - QString result; - static GetSpecialFolderPath SHGetSpecialFolderPath = resolveGetSpecialFolderPath(); - if (!SHGetSpecialFolderPath) { - return QString(); - } - - wchar_t path[MAX_PATH]; - - switch (type) { - case eStandardLocationConfig: // same as eStandardLocationData, on Windows - case eStandardLocationData: - case eStandardLocationGenericData: -#if defined Q_OS_WINCE - if ( SHGetSpecialFolderPath(0, path, CSIDL_APPDATA, FALSE) ) -#else - if ( SHGetSpecialFolderPath(0, path, CSIDL_LOCAL_APPDATA, FALSE) ) -#endif - { - result = convertCharArray(path); - } -#ifndef QT_BOOTSTRAPPED - if (type != eStandardLocationGenericData) { - if ( !QCoreApplication::organizationName().isEmpty() ) { - result += QLatin1Char('/') + QCoreApplication::organizationName(); - } - if ( !QCoreApplication::applicationName().isEmpty() ) { - result += QLatin1Char('/') + QCoreApplication::applicationName(); - } - } -#endif - break; - - case eStandardLocationDesktop: - if ( SHGetSpecialFolderPath(0, path, CSIDL_DESKTOPDIRECTORY, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationDownload: // TODO implement with SHGetKnownFolderPath(FOLDERID_Downloads) (starting from Vista) - case eStandardLocationDocuments: - if ( SHGetSpecialFolderPath(0, path, CSIDL_PERSONAL, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationFonts: - if ( SHGetSpecialFolderPath(0, path, CSIDL_FONTS, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationApplications: - if ( SHGetSpecialFolderPath(0, path, CSIDL_PROGRAMS, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationMusic: - if ( SHGetSpecialFolderPath(0, path, CSIDL_MYMUSIC, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationMovies: - if ( SHGetSpecialFolderPath(0, path, CSIDL_MYVIDEO, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationPictures: - if ( SHGetSpecialFolderPath(0, path, CSIDL_MYPICTURES, FALSE) ) { - result = convertCharArray(path); - } - break; - - case eStandardLocationCache: - // Although Microsoft has a Cache key it is a pointer to IE's cache, not a cache - // location for everyone. Most applications seem to be using a - - // cache directory located in their AppData directory - return writableLocation(eStandardLocationData) + QLatin1String("/cache"); - - case eStandardLocationGenericCache: - - return writableLocation(eStandardLocationGenericData) + QLatin1String("/cache"); - - case eStandardLocationRuntime: - case eStandardLocationHome: - result = QDir::homePath(); - break; - - case eStandardLocationTemp: - result = QDir::tempPath(); - break; - } // switch - - return result; -#else -#error "Unsupported operating system" -#endif - -#else // QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QStandardPaths::StandardLocation path; switch (type) { case StandardPaths::eStandardLocationDesktop: @@ -662,7 +327,6 @@ StandardPaths::writableLocation(StandardLocationEnum type) } return QStandardPaths::writableLocation(path); -#endif // QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) } // writableLocation NATRON_NAMESPACE_EXIT diff --git a/Engine/StandardPaths.h b/Engine/StandardPaths.h index e4545f8713..cc8092dd45 100644 --- a/Engine/StandardPaths.h +++ b/Engine/StandardPaths.h @@ -61,11 +61,6 @@ class StandardPaths static QString writableLocation(StandardLocationEnum type); - -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - static void appendOrganizationAndApp(QString &path); -#endif - private: #ifdef __NATRON_OSX__ diff --git a/Engine/pch.h b/Engine/pch.h index f86df23f3e..db89a8bb85 100644 --- a/Engine/pch.h +++ b/Engine/pch.h @@ -15,68 +15,6 @@ #include "Global/Macros.h" -#ifdef __clang__ -// fix clang warnings - -// /usr/include/qt5/QtCore/qgenericatomic.h:177:13: warning: 'register' storage class specifier is deprecated [-Wdeprecated] -// register T tmp = load(_q_value); -// ^~~~~~~~~ -// /usr/include/qt5/QtCore/qmetatype.h:688:5: warning: 'register' storage class specifier is deprecated [-Wdeprecated] -// register int id = qMetaTypeId(); -// ^~~~~~~~~ -// /usr/include/qt5/QtCore/qsharedpointer_impl.h:481:13: warning: 'register' storage class specifier is deprecated [-Wdeprecated] -// register int tmp = o->strongref.load(); -// ^~~~~~~~~ -// #if QT_VERSION >= 0x050000 -// CLANG_DIAG_OFF(deprecated); -// #include -// #include -// #include -// CLANG_DIAG_ON(deprecated); -// #else -// CLANG_DIAG_OFF(deprecated); -// #include -// // In file included from /opt/local/include/QtCore/qsharedpointer.h:50: -// // /opt/local/include/QtCore/qsharedpointer_impl.h:435:17: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register] -// // register int tmp = o->strongref; -// #include -// CLANG_DIAG_ON(deprecated); -// #endif - -// /opt/local/include/boost/serialization/smart_cast.hpp:254:25: warning: unused parameter 'u' [-Wunused-parameter] -// static T cast(U u){ -//CLANG_DIAG_OFF(unused-parameter); -//#include -//CLANG_DIAG_ON(unused-parameter); - -//In file included from /opt/local/include/boost/bimap/list_of.hpp:37: -//In file included from /opt/local/include/boost/bimap/views/list_map_view.hpp:22: -//In file included from /opt/local/include/boost/bimap/relation/support/pair_by.hpp:21: -//In file included from /opt/local/include/boost/bimap/relation/support/pair_type_by.hpp:21: -//In file included from /opt/local/include/boost/bimap/relation/detail/metadata_access_builder.hpp:21: -//In file included from /opt/local/include/boost/bimap/relation/support/is_tag_of_member_at.hpp:26: -///opt/local/include/boost/bimap/relation/support/member_with_tag.hpp:73:5: warning: class member cannot be redeclared [-Wredeclared-class-member] -// BOOST_BIMAP_STATIC_ERROR( MEMBER_WITH_TAG_FAILURE, (Relation,Tag) ); -//CLANG_DIAG_OFF(redeclared-class-member) -//#include -//CLANG_DIAG_ON(redeclared-class-member) - -//#if QT_VERSION < 0x050000 -//CLANG_DIAG_OFF(unused-private-field); -//#include -//CLANG_DIAG_ON(unused-private-field); -//#endif - -//In file included from ../Natron/Writers/ExrEncoder.cpp:20: -///opt/local/include/OpenEXR/half.h:471:2: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register] -// register int e = (x.i >> 23) & 0x000001ff; -// ^~~~~~~~~ -//CLANG_DIAG_OFF(deprecated-register); -//#include -//CLANG_DIAG_ON(deprecated-register); - -#endif // __clang__ - #ifdef __APPLE__ // Silence Apple's OpenGL deprecation warnings // diff --git a/Global/GlobalDefines.h b/Global/GlobalDefines.h index 3fe45350de..2b24765110 100644 --- a/Global/GlobalDefines.h +++ b/Global/GlobalDefines.h @@ -49,9 +49,6 @@ #undef isalnum #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#include -#endif #include CLANG_DIAG_OFF(deprecated) #include @@ -59,6 +56,10 @@ CLANG_DIAG_ON(deprecated) #include "Global/Enums.h" +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 3) +#error "Qt versions earlier than 5.15.3 are not supported." +#endif + // boost and C++11 also have a foreach. this breaks it. DON'T UNCOMMENT THIS. //#undef foreach //#define foreach Q_FOREACH diff --git a/Global/QtCompat.h b/Global/QtCompat.h index 007ac4d2a1..10a68eac28 100644 --- a/Global/QtCompat.h +++ b/Global/QtCompat.h @@ -22,42 +22,6 @@ #include "Global/Macros.h" #include // for Q_OS_* -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#include -#include - -NATRON_NAMESPACE_ENTER - -namespace QtCompat { -inline bool -removeRecursively(const QString & dirName) -{ - bool result = false; - QDir dir(dirName); - - if ( dir.exists(dirName) ) { - Q_FOREACH( QFileInfo info, dir.entryInfoList(QDir::NoDotAndDotDot | QDir::System | QDir::Hidden | QDir::AllDirs | QDir::Files, QDir::DirsFirst) ) { - if ( info.isDir() ) { - result = removeRecursively( info.absoluteFilePath() ); - } else { - result = QFile::remove( info.absoluteFilePath() ); - } - - if (!result) { - return result; - } - } - result = dir.rmdir(dirName); - } - - return result; -} -} // namespace QtCompat - -NATRON_NAMESPACE_EXIT - -#endif - #include #include #include @@ -82,16 +46,6 @@ removeFileExtension(QString & filename) return extension; } -// in Qt 4.8 QUrl is broken on mac, it returns /.file/id= for local files -// See https://bugreports.qt.io/browse/QTBUG-40449 -#if defined(Q_OS_DARWIN) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -//Implementation is in QUrlFix.mm -QUrl toLocalFileUrlFixed(const QUrl& url); -#else // #if defined(Q_OS_DARWIN) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -inline QUrl -toLocalFileUrlFixed(const QUrl& url) { return url; } - -#endif // #if defined(Q_OS_DARWIN) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) } // namespace QtCompat NATRON_NAMESPACE_EXIT diff --git a/Gui/AboutWindow.cpp b/Gui/AboutWindow.cpp index 2dfb8082ac..e7827a1281 100644 --- a/Gui/AboutWindow.cpp +++ b/Gui/AboutWindow.cpp @@ -64,15 +64,6 @@ AboutWindow::AboutWindow(QWidget* parent) : QDialog(parent) { _scale = 1.; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#if defined(Q_OS_WIN) - // code from Gui::devicePixelRatio() - HDC wscreen = GetDC(winId()); - FLOAT horizontalDPI = GetDeviceCaps(wscreen, LOGPIXELSX); - ReleaseDC(0, wscreen); - _scale = static_cast(horizontalDPI) / 96.; -#endif -#endif setWindowTitle( tr("About %1").arg( QString::fromUtf8(NATRON_APPLICATION_NAME) ) ); _mainLayout = new QVBoxLayout(this); @@ -498,11 +489,7 @@ AboutWindow::AboutWindow(QWidget* parent) _view->setUniformRowHeights(true); _view->setSelectionMode(QAbstractItemView::SingleSelection); _view->header()->close(); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _view->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _view->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _view->header()->setStretchLastSection(true); splitter->addWidget(_view); diff --git a/Gui/ComboBox.cpp b/Gui/ComboBox.cpp index cbd2a45be5..a8c67678d0 100644 --- a/Gui/ComboBox.cpp +++ b/Gui/ComboBox.cpp @@ -139,11 +139,7 @@ ComboBox::sizeForWidth(int w) const int hextra = DROP_DOWN_ICON_SIZE * 2, vextra = 0; ///Indent of 1 character -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int indent = fm.horizontalAdvance( QLatin1Char('x') ); -#else - int indent = fm.width( QLatin1Char('x') ); -#endif if (indent > 0) { if ( (align & Qt::AlignLeft) || (align & Qt::AlignRight) ) { @@ -243,11 +239,7 @@ ComboBox::layoutRect() const { QRect cr = contentsRect(); Qt::Alignment align = QStyle::visualAlignment( Qt::LeftToRight, QFlag(_align) ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int indent = fontMetrics().horizontalAdvance( QLatin1Char('x') ) / 2; -#else - int indent = fontMetrics().width( QLatin1Char('x') ) / 2; -#endif if (indent > 0) { if (align & Qt::AlignLeft) { @@ -414,11 +406,7 @@ ComboBox::wheelEvent(QWheelEvent *e) return; } // a standard wheel click is 120 -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) _currentDelta += e->angleDelta().y(); -#else - _currentDelta += e->delta(); -#endif if ( (_currentDelta <= -120) || (120 <= _currentDelta) ) { int c = count(); @@ -733,11 +721,7 @@ ComboBox::setCurrentText_internal(const QString & text) } if (_sizePolicy.horizontalPolicy() != QSizePolicy::Fixed) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = m.horizontalAdvance(str) + 2 * DROP_DOWN_ICON_SIZE; -#else - int w = m.width(str) + 2 * DROP_DOWN_ICON_SIZE; -#endif setMinimumWidth(w); } @@ -757,11 +741,7 @@ ComboBox::setMaximumWidthFromText(const QString & str) if (_sizePolicy.horizontalPolicy() == QSizePolicy::Fixed) { return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = fontMetrics().horizontalAdvance(str); -#else - int w = fontMetrics().width(str); -#endif setMaximumWidth(w + DROP_DOWN_ICON_SIZE * 2); } @@ -771,12 +751,7 @@ ComboBox::growMaximumWidthFromText(const QString & str) if (_sizePolicy.horizontalPolicy() == QSizePolicy::Fixed) { return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = fontMetrics().horizontalAdvance(str) + 2 * DROP_DOWN_ICON_SIZE; -#else - int w = fontMetrics().width(str) + 2 * DROP_DOWN_ICON_SIZE; -#endif - if ( w > maximumWidth() ) { setMaximumWidth(w); } @@ -865,11 +840,7 @@ ComboBox::setCurrentIndex_internal(int index) if (_sizePolicy.horizontalPolicy() != QSizePolicy::Fixed) { QFontMetrics m = fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = m.horizontalAdvance(str) + 2 * DROP_DOWN_ICON_SIZE; -#else - int w = m.width(str) + 2 * DROP_DOWN_ICON_SIZE; -#endif setMinimumWidth(w); } diff --git a/Gui/CurveGui.cpp b/Gui/CurveGui.cpp index 511fad9653..0452af3ae4 100644 --- a/Gui/CurveGui.cpp +++ b/Gui/CurveGui.cpp @@ -46,9 +46,7 @@ #include "Gui/CurveWidgetPrivate.h" #include "Gui/KnobGui.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif NATRON_NAMESPACE_ENTER diff --git a/Gui/CurveWidget.cpp b/Gui/CurveWidget.cpp index a57ede41dc..9fe4a612ec 100644 --- a/Gui/CurveWidget.cpp +++ b/Gui/CurveWidget.cpp @@ -38,15 +38,8 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) #include -#else -#include -#endif - -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include "Engine/Bezier.h" #include "Engine/PyParameter.h" // IntParam @@ -71,9 +64,7 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include "Gui/TabWidget.h" #include "Gui/ViewerGL.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif NATRON_NAMESPACE_ENTER @@ -122,11 +113,7 @@ CurveWidget::CurveWidget(Gui* gui, TimeLinePtr timeline, QWidget* parent, const QOpenGLWidget* shareWidget) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) : QOpenGLWidget(parent) -#else - : QOpenGLWidget(parent, shareWidget) -#endif , _imp( new CurveWidgetPrivate(gui, selection, timeline, this) ) { // always running in the main thread @@ -444,11 +431,7 @@ CurveWidget::swapOpenGLBuffers() // always running in the main thread assert( qApp && qApp->thread() == QThread::currentThread() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) update(); -#else - swapBuffers(); -#endif } /** @@ -498,11 +481,7 @@ CurveWidget::getScreenPixelRatio() const // always running in the main thread assert( qApp && qApp->thread() == QThread::currentThread() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return devicePixelRatio(); -#else - return _imp->_gui ? _imp->_gui->devicePixelRatio() : 1.; -#endif } #endif @@ -607,11 +586,9 @@ CurveWidget::resizeGL(int width, glViewport (0, 0, width, height); double zoomWidth = width; double zoomHeight = height; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double screenPixelRatio = getScreenPixelRatio(); zoomWidth /= screenPixelRatio; zoomHeight /= screenPixelRatio; -#endif // Width and height may be 0 when tearing off a viewer tab to another panel if ( (width > 0) && (height > 0) ) { @@ -823,13 +800,9 @@ CurveWidget::mouseDoubleClickEvent(QMouseEvent* e) if (selectedText) { EditKeyFrameDialog* dialog = new EditKeyFrameDialog(mode, this, selectedText, this); int dialogW = dialog->sizeHint().width(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); QRect screen = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - QRect screen = desktop->screenGeometry(); -#endif + QPoint gP = e->globalPos(); if ( gP.x() > (screen.width() - dialogW) ) { gP.rx() -= dialogW; @@ -1443,21 +1416,12 @@ CurveWidget::wheelEvent(QWheelEvent* e) assert( qApp && qApp->thread() == QThread::currentThread() ); // don't handle horizontal wheel (e.g. on trackpad or Might Mouse) -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { -#else - if (e->orientation() != Qt::Vertical) { -#endif return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->angleDelta().y() ); QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->position().x(), e->position().y() ); -#else - double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->delta() ); - QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->x(), e->y() ); -#endif if ( modCASIsControlShift(e) ) { _imp->zoomOrPannedSinceLastFit = true; @@ -1548,11 +1512,7 @@ CurveWidget::getWidgetFontHeight() const int CurveWidget::getStringWidthForCurrentFont(const std::string& string) const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return fontMetrics().horizontalAdvance( QString::fromUtf8( string.c_str() ) ); -#else - return fontMetrics().width( QString::fromUtf8( string.c_str() ) ); -#endif } QSize @@ -1598,18 +1558,10 @@ CurveWidget::keyPressEvent(QKeyEvent* e) } else if ( isKeybind(kShortcutGroupCurveEditor, kShortcutIDActionCurveEditorPaste, modifiers, key) ) { pasteKeyFramesFromClipBoardToSelectedCurve(); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomIn, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, 120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), 120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomOut, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, -120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), -120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else { accept = false; diff --git a/Gui/CurveWidget.h b/Gui/CurveWidget.h index 0842983091..248e89775c 100644 --- a/Gui/CurveWidget.h +++ b/Gui/CurveWidget.h @@ -41,11 +41,7 @@ CLANG_DIAG_OFF(uninitialized) CLANG_DIAG_ON(deprecated) CLANG_DIAG_ON(uninitialized) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Global/GlobalDefines.h" diff --git a/Gui/CurveWidgetPrivate.cpp b/Gui/CurveWidgetPrivate.cpp index 33cfaf898e..0cad9bf800 100644 --- a/Gui/CurveWidgetPrivate.cpp +++ b/Gui/CurveWidgetPrivate.cpp @@ -52,9 +52,7 @@ #include "Gui/Menu.h" #include "Gui/ticks.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif #define CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE 5 //maximum distance from a curve that accepts a mouse click // (in widget pixels) @@ -497,11 +495,7 @@ CurveWidgetPrivate::drawScale(double screenPixelRatio) ticks_fill(half_tick, ticks_max, m1, m2, &ticks); const double smallestTickSize = range * smallestTickSizePixel / rangePixel; const double largestTickSize = range * largestTickSizePixel / rangePixel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double minTickSizeTextPixel = ( (axis == 0) ? fm.horizontalAdvance( QLatin1String("00") ) : fm.height() ) / _screenPixelRatio; -#else - const double minTickSizeTextPixel = ( (axis == 0) ? fm.width( QLatin1String("00") ) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#endif const double minTickSizeText = range * minTickSizeTextPixel / rangePixel; for (int i = m1; i <= m2; ++i) { double value = i * smallTickSize + offset; @@ -526,11 +520,7 @@ CurveWidgetPrivate::drawScale(double screenPixelRatio) if (tickSize > minTickSizeText) { const int tickSizePixel = rangePixel * tickSize / range; const QString s = QString::number(value); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double sSizePixel = ( (axis == 0) ? fm.horizontalAdvance(s) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#else - const double sSizePixel = ( (axis == 0) ? fm.width(s) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#endif if (tickSizePixel > sSizePixel) { const double sSizeFullPixel = sSizePixel + minTickSizeTextPixel; double alphaText = 1.0; //alpha; @@ -784,11 +774,7 @@ CurveWidgetPrivate::isNearbyKeyFrameText(const QPoint& pt) const topLeftWidget.ry() += yOffset; QString coordStr = QString::fromUtf8("x: %1, y: %2").arg( (*it2)->key.getTime() ).arg( (*it2)->key.getValue() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QPointF btmRightWidget( topLeftWidget.x() + fm.horizontalAdvance(coordStr) / _screenPixelRatio, topLeftWidget.y() + fm.height() / _screenPixelRatio ); -#else - QPointF btmRightWidget( topLeftWidget.x() + fm.width(coordStr) / _screenPixelRatio, topLeftWidget.y() + fm.height() / _screenPixelRatio ); -#endif if ( (pt.x() >= topLeftWidget.x() - CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && (pt.x() <= btmRightWidget.x() + CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && ( pt.y() >= topLeftWidget.y() - CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && ( pt.y() <= btmRightWidget.y() + CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) ) { @@ -853,13 +839,8 @@ CurveWidgetPrivate::isNearbySelectedTangentText(const QPoint & pt) const QString leftCoordStr = QString( tr("l: %1") ).arg(std::floor( ( (*it2)->key.getLeftDerivative() * rounding ) + 0.5 ) / rounding); QString rightCoordStr = QString( tr("r: %1") ).arg(std::floor( ( (*it2)->key.getRightDerivative() * rounding ) + 0.5 ) / rounding); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QPointF btmRight_LeftTanWidget( topLeft_LeftTanWidget.x() + fm.horizontalAdvance(leftCoordStr) / _screenPixelRatio, topLeft_LeftTanWidget.y() + fm.height() / _screenPixelRatio ); QPointF btmRight_RightTanWidget( topLeft_RightTanWidget.x() + fm.horizontalAdvance(rightCoordStr) / _screenPixelRatio, topLeft_RightTanWidget.y() + fm.height() / _screenPixelRatio ); -#else - QPointF btmRight_LeftTanWidget( topLeft_LeftTanWidget.x() + fm.width(leftCoordStr) / _screenPixelRatio, topLeft_LeftTanWidget.y() + fm.height() / _screenPixelRatio ); - QPointF btmRight_RightTanWidget( topLeft_RightTanWidget.x() + fm.width(rightCoordStr) / _screenPixelRatio, topLeft_RightTanWidget.y() + fm.height() / _screenPixelRatio ); -#endif if ( (pt.x() >= topLeft_LeftTanWidget.x() - CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && (pt.x() <= btmRight_LeftTanWidget.x() + CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && ( pt.y() >= topLeft_LeftTanWidget.y() - CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) && ( pt.y() <= btmRight_LeftTanWidget.y() + CLICK_DISTANCE_FROM_CURVE_ACCEPTANCE) ) { diff --git a/Gui/CustomParamInteract.cpp b/Gui/CustomParamInteract.cpp index e3e297b018..a63a4c3bd4 100644 --- a/Gui/CustomParamInteract.cpp +++ b/Gui/CustomParamInteract.cpp @@ -33,9 +33,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include "Gui/KnobGui.h" #include "Gui/Gui.h" @@ -47,9 +45,7 @@ #include "Engine/AppInstance.h" #include "Engine/TimeLine.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif NATRON_NAMESPACE_ENTER @@ -175,11 +171,7 @@ CustomParamInteract::sizeHint() const void CustomParamInteract::swapOpenGLBuffers() { -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) update(); -#else - swapBuffers(); -#endif } void @@ -208,12 +200,7 @@ CustomParamInteract::getPixelScale(double & xScale, double CustomParamInteract::getScreenPixelRatio() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return devicePixelRatio(); -#else - KnobGuiPtr k = _imp->knob.lock(); - return (k && k->getGui()) ? k->getGui()->devicePixelRatio() : 1.; -#endif } #endif @@ -299,11 +286,7 @@ CustomParamInteract::getWidgetFontHeight() const int CustomParamInteract::getStringWidthForCurrentFont(const std::string& string) const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return fontMetrics().horizontalAdvance( QString::fromUtf8( string.c_str() ) ); -#else - return fontMetrics().width( QString::fromUtf8( string.c_str() ) ); -#endif } RectD diff --git a/Gui/CustomParamInteract.h b/Gui/CustomParamInteract.h index c1511c8046..a5bda50bb6 100644 --- a/Gui/CustomParamInteract.h +++ b/Gui/CustomParamInteract.h @@ -31,11 +31,7 @@ #include "Global/GLIncludes.h" //!= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Engine/OverlaySupport.h" diff --git a/Gui/DocumentationManager.cpp b/Gui/DocumentationManager.cpp index ef0f429941..c064dec14b 100644 --- a/Gui/DocumentationManager.cpp +++ b/Gui/DocumentationManager.cpp @@ -229,21 +229,12 @@ DocumentationManager::handler(QHttpRequest *req, // get options QStringList options; if ( page.contains( QString::fromUtf8("?") ) ) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QStringList split = page.split(QString::fromUtf8("?"), Qt::SkipEmptyParts); page = split.takeFirst(); if (split.length() > 0) { QString rawOptions = split.takeLast(); options = rawOptions.split(QString::fromUtf8("&"), Qt::SkipEmptyParts); } -#else - QStringList split = page.split(QString::fromUtf8("?"), QString::SkipEmptyParts); - page = split.takeFirst(); - if (split.length() > 0) { - QString rawOptions = split.takeLast(); - options = rawOptions.split(QString::fromUtf8("&"), QString::SkipEmptyParts); - } -#endif } // default page @@ -377,11 +368,8 @@ DocumentationManager::handler(QHttpRequest *req, ""); for (int i = 0; i < options.size(); ++i) { if ( options.at(i).contains( QString::fromUtf8("id=") ) ) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QStringList split = options.at(i).split(QString::fromUtf8("="), Qt::SkipEmptyParts); -#else - QStringList split = options.at(i).split(QString::fromUtf8("="), QString::SkipEmptyParts); -#endif + if (split.length() > 0) { QString groupID = split.takeLast(); group = groupID; diff --git a/Gui/DopeSheetEditor.h b/Gui/DopeSheetEditor.h index ee869acad9..cfda330441 100644 --- a/Gui/DopeSheetEditor.h +++ b/Gui/DopeSheetEditor.h @@ -32,11 +32,7 @@ CLANG_DIAG_OFF(deprecated) CLANG_DIAG_OFF(uninitialized) #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#else -#include -#endif CLANG_DIAG_ON(deprecated) CLANG_DIAG_ON(uninitialized) diff --git a/Gui/DopeSheetHierarchyView.cpp b/Gui/DopeSheetHierarchyView.cpp index 6b7d73caaa..5edb84ea8b 100644 --- a/Gui/DopeSheetHierarchyView.cpp +++ b/Gui/DopeSheetHierarchyView.cpp @@ -130,11 +130,7 @@ HierarchyViewSelectionModel::selectChildren(const QModelIndex &index, QItemSelection *selection) const { int row = 0; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QModelIndex childIndex = index.model()->index(row, 0); -#else - QModelIndex childIndex = index.child(row, 0); -#endif while ( childIndex.isValid() ) { if ( !selection->contains(childIndex) ) { @@ -147,11 +143,7 @@ HierarchyViewSelectionModel::selectChildren(const QModelIndex &index, } ++row; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) childIndex = index.model()->index(row, 0); -#else - childIndex = index.child(row, 0); -#endif } } @@ -195,11 +187,7 @@ HierarchyViewSelectionModel::checkParentsSelectedStates(const QModelIndex &index QModelIndex index = (*it); bool selectParent = true; int row = 0; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QModelIndex childIndexIt = index.model()->index(row, 0); -#else - QModelIndex childIndexIt = index.child(row, 0); -#endif while ( childIndexIt.isValid() ) { if ( childIndexIt.data(QT_ROLE_CONTEXT_IS_ANIMATED).toBool() ) { @@ -211,11 +199,7 @@ HierarchyViewSelectionModel::checkParentsSelectedStates(const QModelIndex &index } ++row; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) childIndexIt = index.model()->index(row, 0); -#else - childIndexIt = index.child(row, 0); -#endif } if ( (flags & QItemSelectionModel::Select && selectParent) ) { @@ -814,11 +798,8 @@ HierarchyView::drawRow(QPainter *painter, painter->fillRect(itemRect.adjusted(-1, 0, 0, 0), fillColor); // Draw the item text -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QStyleOptionViewItem newOpt = viewOptions(); -#else - QStyleOptionViewItemV4 newOpt = viewOptions(); -#endif + newOpt.rect = itemRect; if ( selectionModel()->isSelected(index) ) { @@ -868,11 +849,8 @@ HierarchyView::drawBranches(QPainter *painter, painter->fillRect(rectForDull, nodeColorDull); // Draw the branch indicator -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QStyleOptionViewItem option = viewOptions(); -#else - QStyleOptionViewItemV4 option = viewOptions(); -#endif + option.rect = _imp->getParentArrowRect(item, rect); option.displayAlignment = Qt::AlignCenter; diff --git a/Gui/DopeSheetHierarchyView.h b/Gui/DopeSheetHierarchyView.h index a843c31b6d..d99b6160cf 100644 --- a/Gui/DopeSheetHierarchyView.h +++ b/Gui/DopeSheetHierarchyView.h @@ -34,13 +34,9 @@ CLANG_DIAG_OFF(deprecated) CLANG_DIAG_OFF(uninitialized) #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + #include #include -#else -#include -#include -#endif CLANG_DIAG_ON(deprecated) CLANG_DIAG_ON(uninitialized) diff --git a/Gui/DopeSheetView.cpp b/Gui/DopeSheetView.cpp index 8e40a05df7..bbaa4e3c24 100644 --- a/Gui/DopeSheetView.cpp +++ b/Gui/DopeSheetView.cpp @@ -36,9 +36,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif // Natron includes #include "Engine/Curve.h" @@ -76,9 +74,7 @@ #include "Gui/ZoomContext.h" #include "Gui/TabWidget.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif #define NATRON_DOPESHEET_MIN_RANGE_FIT 10 @@ -427,11 +423,7 @@ DopeSheetView::getWidgetFontHeight() const int DopeSheetView::getStringWidthForCurrentFont(const std::string& string) const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return fontMetrics().horizontalAdvance( QString::fromUtf8( string.c_str() ) ); -#else - return fontMetrics().width( QString::fromUtf8( string.c_str() ) ); -#endif } /* @@ -814,9 +806,6 @@ DopeSheetViewPrivate::generateKeyframeTextures() kfTexturesImages[i] = kfTexturesImages[i].scaled(KF_PIXMAP_SIZE, KF_PIXMAP_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation); } -#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) - kfTexturesImages[i] = QOpenGLWidget::convertToGLFormat(kfTexturesImages[i]); -#endif glBindTexture(GL_TEXTURE_2D, kfTexturesIDs[i]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); @@ -933,11 +922,7 @@ DopeSheetViewPrivate::drawScale() const const double smallestTickSize = range * smallestTickSizePixel / rangePixel; const double largestTickSize = range * largestTickSizePixel / rangePixel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double minTickSizeTextPixel = fm.horizontalAdvance( QString::fromUtf8("00") ) / _screenPixelRatio; -#else - const double minTickSizeTextPixel = fm.width( QString::fromUtf8("00") ) / _screenPixelRatio; -#endif const double minTickSizeText = range * minTickSizeTextPixel / rangePixel; glCheckError(); @@ -962,11 +947,7 @@ DopeSheetViewPrivate::drawScale() const if (tickSize > minTickSizeText) { const int tickSizePixel = rangePixel * tickSize / range; const QString s = QString::number(value); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const int sSizePixel = fm.horizontalAdvance(s) / _screenPixelRatio; -#else - const int sSizePixel = fm.width(s) / _screenPixelRatio; -#endif if (tickSizePixel > sSizePixel) { const int sSizeFullPixel = sSizePixel + minTickSizeTextPixel; @@ -1256,11 +1237,8 @@ DopeSheetViewPrivate::drawRange(const DSNodePtr &dsNode) const double fontHeight = fm.height() / _screenPixelRatio; QString leftText = QString::number(range.first); QString rightText = QString::number(range.second - 1); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) double rightTextW = fm.horizontalAdvance(rightText) / _screenPixelRatio; -#else - double rightTextW = fm.width(rightText) / _screenPixelRatio; -#endif + QPointF textLeftPos( zoomContext.toZoomCoordinates(zoomContext.toWidgetCoordinates(range.first, 0).x() + 3, 0).x(), zoomContext.toZoomCoordinates(0, zoomContext.toWidgetCoordinates(0, clipRectCenterY).y() + fontHeight / 2.).y() ); @@ -2690,12 +2668,7 @@ DopeSheetView::swapOpenGLBuffers() { running_in_main_thread(); - -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) update(); -#else - swapBuffers(); -#endif } /** @@ -2745,11 +2718,7 @@ DopeSheetView::getPixelScale(double &xScale, double DopeSheetView::getScreenPixelRatio() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return devicePixelRatio(); -#else - return _imp->gui ? _imp->gui->devicePixelRatio() : 1.; -#endif } #endif @@ -3230,11 +3199,10 @@ DopeSheetView::resizeGL(int w, glViewport(0, 0, w, h); double zoomWidth = w; double zoomHeight = h; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double screenPixelRatio = getScreenPixelRatio(); zoomWidth /= screenPixelRatio; zoomHeight /= screenPixelRatio; -#endif + _imp->zoomContext.setScreenSize(zoomWidth, zoomHeight); // Don't do the following when the height of the widget is irrelevant @@ -3674,21 +3642,12 @@ DopeSheetView::wheelEvent(QWheelEvent *e) running_in_main_thread(); // don't handle horizontal wheel (e.g. on trackpad or Might Mouse) -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { -#else - if (e->orientation() != Qt::Vertical) { -#endif return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->angleDelta().y() ); QPointF zoomCenter = _imp->zoomContext.toZoomCoordinates( e->position().x(), e->position().y() ); -#else - double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->delta() ); - QPointF zoomCenter = _imp->zoomContext.toZoomCoordinates( e->x(), e->y() ); -#endif _imp->zoomOrPannedSinceLastFit = true; diff --git a/Gui/DopeSheetView.h b/Gui/DopeSheetView.h index d6283ac062..21fabbacbe 100644 --- a/Gui/DopeSheetView.h +++ b/Gui/DopeSheetView.h @@ -33,11 +33,7 @@ #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Engine/OverlaySupport.h" #include "Engine/ViewIdx.h" diff --git a/Gui/Edge.cpp b/Gui/Edge.cpp index 5e5b013c66..903cb82eab 100644 --- a/Gui/Edge.cpp +++ b/Gui/Edge.cpp @@ -487,11 +487,8 @@ Edge::initLine() if (dest) { for (int i = 0; i < 4; ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType type = dstEdges[i].intersects(line(), &dstIntersection); -#else - QLineF::IntersectType type = dstEdges[i].intersect(line(), &dstIntersection); -#endif + if (type == QLineF::BoundedIntersection) { setLine( QLineF( dstIntersection, line().p2() ) ); foundDstIntersection = true; @@ -506,11 +503,8 @@ Edge::initLine() if (foundDstIntersection) { ///Find the intersection with the source bbox for (int i = 0; i < 4; ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType type = srcEdges[i].intersects(line(), &srcInteresect); -#else - QLineF::IntersectType type = srcEdges[i].intersect(line(), &srcInteresect); -#endif + if (type == QLineF::BoundedIntersection) { foundSrcIntersection = true; break; @@ -536,11 +530,8 @@ Edge::initLine() _imp->label->setPos(pos); QFontMetrics fm( _imp->label->font() ); int fontHeight = fm.height(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) double txtWidth = fm.horizontalAdvance( _imp->label->text() ); -#else - double txtWidth = fm.width( _imp->label->text() ); -#endif + if ( (visibleLength < fontHeight * 2) || (visibleLength < txtWidth) ) { _imp->label->hide(); _imp->enoughSpaceToShowLabel = false; @@ -556,11 +547,8 @@ Edge::initLine() QPointF intersection; bool foundIntersection = false; for (int i = 0; i < 4; ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType type = dstEdges[i].intersects(line(), &intersection); -#else - QLineF::IntersectType type = dstEdges[i].intersect(line(), &intersection); -#endif + if (type == QLineF::BoundedIntersection) { setLine( QLineF( intersection, line().p2() ) ); foundIntersection = true; @@ -583,11 +571,7 @@ Edge::initLine() double cosinus = std::cos(_imp->angle); int yOffset = 0; if (cosinus < 0) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) yOffset = -fm.horizontalAdvance( _imp->label->text() ); -#else - yOffset = -fm.width( _imp->label->text() ); -#endif } else if ( (cosinus >= -0.01) && (cosinus <= 0.01) ) { yOffset = +5; } else { @@ -904,11 +888,7 @@ LinkArrow::refreshPosition() QPointF slaveIntersect; bool foundIntersection = false; for (int i = 0; i < 4; ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType type = slaveEdges[i].intersects(line(), &slaveIntersect); -#else - QLineF::IntersectType type = slaveEdges[i].intersect(line(), &slaveIntersect); -#endif if (type == QLineF::BoundedIntersection) { foundIntersection = true; break; @@ -924,11 +904,7 @@ LinkArrow::refreshPosition() foundIntersection = false; for (int i = 0; i < 4; ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType type = masterEdges[i].intersects(line(), &masterIntersect); -#else - QLineF::IntersectType type = masterEdges[i].intersect(line(), &masterIntersect); -#endif if (type == QLineF::BoundedIntersection) { foundIntersection = true; break; diff --git a/Gui/EditScriptDialog.cpp b/Gui/EditScriptDialog.cpp index a0c5ad564e..2dfed072b3 100644 --- a/Gui/EditScriptDialog.cpp +++ b/Gui/EditScriptDialog.cpp @@ -226,11 +226,7 @@ EditScriptDialog::create(const QString& initialScript, _imp->resultEdit->setFont(font); } QFontMetrics fm = _imp->expressionEdit->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->expressionEdit->setTabStopDistance( 4 * fm.horizontalAdvance( QLatin1Char(' ') ) ); -#else - _imp->expressionEdit->setTabStopWidth( 4 * fm.width( QLatin1Char(' ') ) ); -#endif } // EditScriptDialog::create void diff --git a/Gui/FileTypeMainWindow_win.cpp b/Gui/FileTypeMainWindow_win.cpp index 2edd528130..570054f4e4 100644 --- a/Gui/FileTypeMainWindow_win.cpp +++ b/Gui/FileTypeMainWindow_win.cpp @@ -87,7 +87,6 @@ DocumentWindow::~DocumentWindow() // —— public slots —————————————————————————— // —— protected slots ————————————————————————— // —— events ———————————————————————————— -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) bool DocumentWindow::nativeEvent(const QByteArray& eventType, void* message, long* result) { @@ -109,28 +108,6 @@ DocumentWindow::nativeEvent(const QByteArray& eventType, void* message, long* re return QMainWindow::nativeEvent(eventType, message, result); } -#else -bool -DocumentWindow::winEvent(MSG* msg, long *result) -{ - switch (msg->message) { - case WM_DDE_INITIATE: - - return ddeInitiate(msg, result); - break; - case WM_DDE_EXECUTE: - - return ddeExecute(msg, result); - break; - case WM_DDE_TERMINATE: - - return ddeTerminate(msg, result); - break; - } - - return QMainWindow::winEvent(msg, result); -} -#endif void DocumentWindow::ddeOpenFile(const QString&) diff --git a/Gui/FileTypeMainWindow_win.h b/Gui/FileTypeMainWindow_win.h index 197919b171..0432627c9e 100644 --- a/Gui/FileTypeMainWindow_win.h +++ b/Gui/FileTypeMainWindow_win.h @@ -138,11 +138,7 @@ class DocumentWindow /** * reimpl as DDE events come as windows events and are not translated by Qt. */ - #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) virtual bool nativeEvent(const QByteArray& eventType, void* message, long* result); - #else - virtual bool winEvent(MSG *msg, long *result); - #endif // —— helpers for the file registration —————————————————— /** diff --git a/Gui/FloatingWidget.cpp b/Gui/FloatingWidget.cpp index 05c0f0f063..cca745a267 100644 --- a/Gui/FloatingWidget.cpp +++ b/Gui/FloatingWidget.cpp @@ -33,11 +33,7 @@ #include #include // qApp -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) #include -#else -#include -#endif #include #include "Engine/Project.h" @@ -122,15 +118,10 @@ FloatingWidget::setWidget(QWidget* w) w->setVisible(true); w->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); assert(desktop != nullptr); QRect geom = desktop->availableGeometry(); -#else - QDesktopWidget* dw = qApp->desktop(); - assert(dw); - QRect geom = dw->screenGeometry(); -#endif + widgetSize.setWidth( std::min( widgetSize.width(), geom.width() ) ); widgetSize.setHeight( std::min( widgetSize.height(), geom.height() ) ); resize(widgetSize); diff --git a/Gui/Gui.h b/Gui/Gui.h index c6fa2d1ceb..69187ceaa8 100644 --- a/Gui/Gui.h +++ b/Gui/Gui.h @@ -486,12 +486,6 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON virtual void ddeOpenFile(const QString& filePath) OVERRIDE FINAL; #endif -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - /** - * @brief Returns 1.0 on a 96 DPI screen, and 2.0 on a Retina Display. - **/ - qreal devicePixelRatio() const; -#endif AppInstancePtr createNewProject(); diff --git a/Gui/Gui.pro b/Gui/Gui.pro index 7ef0aaf450..1af82c4904 100644 --- a/Gui/Gui.pro +++ b/Gui/Gui.pro @@ -22,13 +22,7 @@ TEMPLATE = lib CONFIG += staticlib CONFIG += moc rcc CONFIG += boost opengl qt cairo python shiboken pyside -QT += gui core network - -greaterThan(QT_MAJOR_VERSION, 4) { - QT += concurrent widgets -} else { - QT += opengl -} +QT += gui core network concurrent widgets GUI_WRAPPER_DIR = Qt$${QT_MAJOR_VERSION}/NatronGui ENGINE_WRAPPER_DIR = Qt$${QT_MAJOR_VERSION}/NatronEngine diff --git a/Gui/Gui10.cpp b/Gui/Gui10.cpp index c87228be6e..56985927e0 100644 --- a/Gui/Gui10.cpp +++ b/Gui/Gui10.cpp @@ -32,11 +32,7 @@ #include #include // qApp -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) #include -#else -#include -#endif #include "Global/FStreamsSupport.h" #include "Global/MathUtils.h" @@ -200,13 +196,8 @@ Gui::restoreLayout(bool wipePrevious, createDefaultLayout1(); } else { std::list floatingDockablePanels; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); QRect screen = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - QRect screen = desktop->screenGeometry(); -#endif ///now restore the gui layout for (std::list::const_iterator it = layoutSerialization._windows.begin(); diff --git a/Gui/Gui40.cpp b/Gui/Gui40.cpp index f9aa6c2306..820a5bd141 100644 --- a/Gui/Gui40.cpp +++ b/Gui/Gui40.cpp @@ -38,9 +38,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include #include // qApp @@ -194,11 +192,7 @@ Gui::updateRecentFileActions() // split each dir, and find the common part of all dirs. std::vector dirParts(dirs.size()); for (int i = 0; i < dirs.size(); ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) dirParts[i] = QDir::toNativeSeparators(dirs.at(i)).split(QDir::separator(), Qt::SkipEmptyParts); -#else - dirParts[i] = QDir::toNativeSeparators(dirs.at(i)).split(QDir::separator(), QString::SkipEmptyParts); -#endif } int minComps = dirParts[0].size(); for (int i = 1; i < dirs.size(); ++i) { @@ -224,11 +218,7 @@ Gui::updateRecentFileActions() // remove the n first element to each dirName corresponding to this filename, and recompose for (int i = 0; i < numRecentFiles; ++i) { if (fileNames[i] == it->first) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) dirNames[i] = QStringList(QDir::toNativeSeparators(dirNames.at(i)).split(QDir::separator(), Qt::SkipEmptyParts).mid(commonComps)).join(QDir::separator()); -#else - dirNames[i] = QStringList(QDir::toNativeSeparators(dirNames.at(i)).split(QDir::separator(), QString::SkipEmptyParts).mid(commonComps)).join(QDir::separator()); -#endif } } } @@ -254,16 +244,7 @@ Gui::updateRecentFileActions() QPixmap Gui::screenShot(QWidget* w) { -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - if ( w->objectName() == QString::fromUtf8("CurveEditor") ) { - return QPixmap::grabWidget(w); - } - - return QPixmap::grabWindow( w->winId() ); -#else - return QApplication::primaryScreen()->grabWindow( w->winId() ); -#endif } void diff --git a/Gui/Gui50.cpp b/Gui/Gui50.cpp index 05f83009ce..b126c9dab3 100644 --- a/Gui/Gui50.cpp +++ b/Gui/Gui50.cpp @@ -1061,35 +1061,6 @@ Gui::ddeOpenFile(const QString& filePath) #endif -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -/** - * @brief Returns 1.0 on a 96 DPI screen, and 2.0 on a Retina Display. - **/ -qreal Gui::devicePixelRatio() const -{ -#if defined(Q_OS_WIN) - HDC screen = GetDC(winId()); - FLOAT horizontalDPI = GetDeviceCaps(screen, LOGPIXELSX); - ReleaseDC(0, screen); - - return static_cast(horizontalDPI) / 96.; -#elif defined(Q_OS_DARWIN) - return QtMac::devicePixelRatioInternal(this); -#elif defined(Q_WS_X11) - // Use the Xft.dpi X resource, as described there: - // - https://github.com/glfw/glfw/blob/84f95a7d7fa454ca99efcdd49da89472294b16bf/src/x11_init.c#L971 - // - https://wiki.archlinux.org/title/HiDPI#X_Resources - - // QX11Info uses it to set appDpiX() and appDpiY(), see the code: - // - https://github.com/qt/qt/blob/0a2f2382541424726168804be2c90b91381608c6/src/gui/kernel/qapplication_x11.cpp#L2203 - - return x11Info().appDpiX(x11Info().appScreen()) / 96.; -#else - return 1.; -#endif -} -#endif - bool Gui::isFocusStealingPossible() { @@ -1155,7 +1126,7 @@ Gui::fileSequencesFromUrls(const QList& urls, QStringList filesList; for (int i = 0; i < urls.size(); ++i) { - const QUrl rl = QtCompat::toLocalFileUrlFixed( urls.at(i) ); + const QUrl rl = urls.at(i); QString path = rl.toLocalFile(); #ifdef __NATRON_WIN32__ diff --git a/Gui/GuiAppInstance.cpp b/Gui/GuiAppInstance.cpp index 41bd9255ab..5a904f8976 100644 --- a/Gui/GuiAppInstance.cpp +++ b/Gui/GuiAppInstance.cpp @@ -25,12 +25,6 @@ #include "GuiAppInstance.h" -#if defined(__APPLE__) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#include -#include -#include -#endif - #include #include // stringstream @@ -1016,22 +1010,6 @@ void GuiAppInstance::createLoadProjectSplashScreen(const QString& projectFile) { QCoreApplication::processEvents(); -#if defined(__APPLE__) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - short int version_[3] = {0}; - char str[256] = {0}; - size_t size = sizeof(str); - int ret = sysctlbyname("kern.osrelease", str, &size, NULL, 0); - if (ret == 0) { - sscanf(str, "%hd.%hd.%hd", &version_[0], &version_[1], &version_[2]); - } - if (version_[0] >= 21) { - // On macOS 12 Monterey, Qt4 crashes the app when closing - // a window, including the splash screen. - // See: https://github.com/NatronGitHub/Natron/issues/712 - // This is probably a Qt4 bug, so let us avoid the splash screen. - return; - } -#endif if (_imp->loadProjectSplash) { return; } diff --git a/Gui/GuiApplicationManager.cpp b/Gui/GuiApplicationManager.cpp index 9205862447..f59bcaf909 100644 --- a/Gui/GuiApplicationManager.cpp +++ b/Gui/GuiApplicationManager.cpp @@ -851,15 +851,6 @@ GuiApplicationManager::initGui(const CLArgs& args) { QSettings settings( QString::fromUtf8(NATRON_ORGANIZATION_NAME), QString::fromUtf8(NATRON_APPLICATION_NAME) ); -#ifdef __NATRON_UNIX__ -#ifndef __NATRON_OSX__ -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - // workaround for issues with KDE4 - QApplication::setStyle( QString::fromUtf8("plastique") ); -#endif -#endif -#endif - //load custom fonts QString fontResource = QString::fromUtf8(":/Resources/Fonts/%1.ttf"); QStringList fontFilenames; diff --git a/Gui/GuiApplicationManager10.cpp b/Gui/GuiApplicationManager10.cpp index 073109d7aa..9686425e02 100644 --- a/Gui/GuiApplicationManager10.cpp +++ b/Gui/GuiApplicationManager10.cpp @@ -66,11 +66,6 @@ CLANG_DIAG_ON(uninitialized) #include "Gui/KnobGuiFactory.h" #include "Gui/SplashScreen.h" -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -// removed in qt5, just revert the commit (1b58d9acc493111390b31f0bffd6b2a76baca91b) -Q_INIT_RESOURCE_EXTERN(GuiResources); -#endif - /** * @macro Registers a keybind to the application. * @param group The name of the group under which the shortcut should be (e.g: Global, Viewer,NodeGraph...) @@ -109,11 +104,9 @@ Q_INIT_RESOURCE_EXTERN(GuiResources); //in a way. This way the user will get prompted to restore default shortcuts on next launch #define NATRON_SHORTCUTS_DEFAULT_VERSION 8 -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) inline void initGuiResource() { Q_INIT_RESOURCE(GuiResources); } -#endif NATRON_NAMESPACE_ENTER @@ -314,23 +307,13 @@ GuiApplicationManager::initializeQApp(int &argc, app->setQuitOnLastWindowClosed(true); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // use namespace workaround // https://doc.qt.io/qt-5/qdir.html#Q_INIT_RESOURCE initGuiResource(); -#else - // Q_INIT_RESOURCES expanded, and fixed for use from inside a namespace: - // (requires using Q_INIT_RESOURCES_EXTERN(GuiResources) before entering the namespace) - ::qInitResources_GuiResources(); -#endif #ifdef DEBUG - QLocale loc; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - loc = QApplication::keyboardInputLocale(); -#else - loc = QGuiApplication::inputMethod()->locale(); -#endif + QLocale loc = QGuiApplication::inputMethod()->locale(); + qDebug() << "keyboard input locale:" << loc.bcp47Name(); #endif diff --git a/Gui/GuiFwd.h b/Gui/GuiFwd.h index fc06fc3ded..6938951267 100644 --- a/Gui/GuiFwd.h +++ b/Gui/GuiFwd.h @@ -99,9 +99,7 @@ class QWheelEvent; class QWidget; typedef std::shared_ptr QUndoStackPtr; -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) class QOpenGLShaderProgram; -#endif // Natron Gui NATRON_NAMESPACE_ENTER @@ -241,9 +239,6 @@ class KnobPageGui; #ifdef Q_OS_DARWIN //Implementation in Gui/QtMac.mm namespace QtMac { -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -qreal devicePixelRatioInternal(const QWidget* w); -#endif #if OBJC_OLD_DISPATCH_PROTOTYPES != 1 void setupDockClickHandler(void (*)(void)); #endif diff --git a/Gui/GuiPrivate.cpp b/Gui/GuiPrivate.cpp index c99446d4ad..30cc04b0b6 100644 --- a/Gui/GuiPrivate.cpp +++ b/Gui/GuiPrivate.cpp @@ -42,9 +42,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include GCC_DIAG_UNUSED_PRIVATE_FIELD_OFF // /opt/local/include/QtGui/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field] @@ -55,10 +53,6 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include #include -#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) -#include -#endif - #include #include #include @@ -192,11 +186,7 @@ GuiPrivate::GuiPrivate(const GuiAppInstancePtr& app, , _lastPluginDir() , _nextViewerTabPlace(0) , _leftRightSplitter(0) -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) , _viewerTabsMutex() -#else - , _viewerTabsMutex(QMutex::Recursive) // Gui::createNodeViewerInterface() may cause a resizeEvent, which calls Gui:redrawAllViewers() -#endif , _viewerTabs() , _masterSyncViewer(0) , _activeViewer(0) @@ -641,13 +631,8 @@ GuiPrivate::restoreGuiGeometry() _gui->resize(size); } else { ///No window size serialized, give some appropriate default value according to the screen size -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); QRect screen = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - QRect screen = desktop->screenGeometry(); -#endif _gui->resize( (int)( 0.93 * screen.width() ), (int)( 0.93 * screen.height() ) ); // leave some space } if ( settings.contains( QString::fromUtf8("maximized")) ) { diff --git a/Gui/GuiPrivate.h b/Gui/GuiPrivate.h index 6bf10171ec..5ed3d5f154 100644 --- a/Gui/GuiPrivate.h +++ b/Gui/GuiPrivate.h @@ -152,11 +152,8 @@ struct GuiPrivate Splitter* _leftRightSplitter; ///a list of ptrs to all the viewer tabs. -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) mutable QRecursiveMutex _viewerTabsMutex; -#else - mutable QMutex _viewerTabsMutex; -#endif + std::list _viewerTabs; ///Used when all viewers are synchronized to determine which one triggered the sync diff --git a/Gui/Histogram.cpp b/Gui/Histogram.cpp index 9c5f713c80..73a130273f 100644 --- a/Gui/Histogram.cpp +++ b/Gui/Histogram.cpp @@ -42,12 +42,8 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #include -#else -#include "Gui/QGLExtrasCompat.h" -#endif #include "Engine/HistogramCPU.h" #include "Engine/Image.h" @@ -72,9 +68,7 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include "Gui/ZoomContext.h" #include "Gui/ticks.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif NATRON_NAMESPACE_ENTER @@ -290,11 +284,7 @@ struct HistogramPrivate Histogram::Histogram(Gui* gui, const QOpenGLWidget* shareWidget) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) : QOpenGLWidget(gui) -#else - : QOpenGLWidget(gui, shareWidget) -#endif , PanelWidget(this, gui) , _imp( new HistogramPrivate(this) ) { @@ -1251,11 +1241,9 @@ Histogram::resizeGL(int width, glViewport (0, 0, width, height); double zoomWidth = width; double zoomHeight = height; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double screenPixelRatio = getScreenPixelRatio(); zoomWidth /= screenPixelRatio; zoomHeight /= screenPixelRatio; -#endif _imp->zoomCtx.setScreenSize(zoomWidth, zoomHeight); if (!_imp->hasBeenModifiedSinceResize) { @@ -1401,11 +1389,7 @@ Histogram::wheelEvent(QWheelEvent* e) assert( qApp && qApp->thread() == QThread::currentThread() ); // don't handle horizontal wheel (e.g. on trackpad or Might Mouse) -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { -#else - if (e->orientation() != Qt::Vertical) { -#endif return; } const double zoomFactor_min = 0.000001; @@ -1414,13 +1398,8 @@ Histogram::wheelEvent(QWheelEvent* e) const double par_max = 1000000.; double zoomFactor; double par; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->angleDelta().y() ); QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->position().x(), e->position().y() ); -#else - double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->delta() ); // no need to use ipow() here, because the result is not cast to int - QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->x(), e->y() ); -#endif if ( modCASIsControlShift(e) ) { // Alt + Shift + Wheel: zoom values only, keep point under mouse @@ -1588,11 +1567,7 @@ Histogram::onCPUHistogramComputed() double Histogram::getScreenPixelRatio() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return devicePixelRatio(); -#else - return getGui() ? getGui()->devicePixelRatio() : 1.; -#endif } void @@ -1639,11 +1614,7 @@ HistogramPrivate::drawScale() ticks_fill(half_tick, ticks_max, m1, m2, &ticks); const double smallestTickSize = range * smallestTickSizePixel / rangePixel; const double largestTickSize = range * largestTickSizePixel / rangePixel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double minTickSizeTextPixel = ( (axis == 0) ? fm.horizontalAdvance( QLatin1String("00") ) : fm.height() ) / _screenPixelRatio; -#else - const double minTickSizeTextPixel = ( (axis == 0) ? fm.width( QLatin1String("00") ) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#endif const double minTickSizeText = range * minTickSizeTextPixel / rangePixel; for (int i = m1; i <= m2; ++i) { double value = i * smallTickSize + offset; @@ -1667,11 +1638,7 @@ HistogramPrivate::drawScale() if (tickSize > minTickSizeText) { const int tickSizePixel = rangePixel * tickSize / range; const QString s = QString::number(value); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double sSizePixel = ( (axis == 0) ? fm.horizontalAdvance(s) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#else - const double sSizePixel = ( (axis == 0) ? fm.width(s) : fm.height() ) / _screenPixelRatio; // AXIS-SPECIFIC -#endif if (tickSizePixel > sSizePixel) { const double sSizeFullPixel = sSizePixel + minTickSizeTextPixel; double alphaText = 1.0; //alpha; @@ -1706,11 +1673,7 @@ HistogramPrivate::drawWarnings() if (mipmapLevel > 0) { QFontMetrics fm(*_textFont); QString str( tr("Image downscaled") ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) double strWidth = fm.horizontalAdvance(str) / _screenPixelRatio; -#else - double strWidth = fm.width(str) / _screenPixelRatio; -#endif double strHeight = fm.height() / _screenPixelRatio; QPointF pos = zoomCtx.toZoomCoordinates(widget->width() - strWidth - 10, 5 * strHeight + 30); glCheckError(); @@ -1742,11 +1705,7 @@ HistogramPrivate::drawMissingImage() } QString txt( tr("Missing image") ); QFontMetrics fm(*_textFont); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int strWidth = fm.horizontalAdvance(txt) / _screenPixelRatio; -#else - int strWidth = fm.width(txt) / _screenPixelRatio; -#endif QPointF pos = zoomCtx.toZoomCoordinates(widget->width() / 2. - strWidth / 2., fm.height() / _screenPixelRatio + 10); glCheckError(); @@ -1844,11 +1803,7 @@ HistogramPrivate::drawPicker() glCheckError(); QFontMetrics fm(*_textFont, 0); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) double strWidth = std::max( std::max( std::max( fm.horizontalAdvance(rValueStr), fm.horizontalAdvance(gValueStr) ), fm.horizontalAdvance(bValueStr) ), fm.horizontalAdvance(xCoordinateStr) ) / _screenPixelRatio; -#else - double strWidth = std::max( std::max( std::max( fm.width(rValueStr), fm.width(gValueStr) ), fm.width(bValueStr) ), fm.width(xCoordinateStr) ) / _screenPixelRatio; -#endif double strHeight = fm.height() / _screenPixelRatio; QPointF xPos = zoomCtx.toZoomCoordinates(widget->width() - strWidth - 10, strHeight + 10); QPointF rPos = zoomCtx.toZoomCoordinates(widget->width() - strWidth - 10, 2 * strHeight + 15); diff --git a/Gui/Histogram.h b/Gui/Histogram.h index 6d2cfdf0cc..cad1f3854e 100644 --- a/Gui/Histogram.h +++ b/Gui/Histogram.h @@ -34,11 +34,7 @@ CLANG_DIAG_OFF(uninitialized) #include CLANG_DIAG_ON(uninitialized) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Gui/PanelWidget.h" #include "Gui/GuiFwd.h" diff --git a/Gui/HostOverlay.cpp b/Gui/HostOverlay.cpp index b9a685cf5e..6395c5e07c 100644 --- a/Gui/HostOverlay.cpp +++ b/Gui/HostOverlay.cpp @@ -54,12 +54,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif - #ifndef M_PI #define M_PI 3.14159265358979323846264338327950288419717 diff --git a/Gui/InfoViewerWidget.cpp b/Gui/InfoViewerWidget.cpp index e09a72c3a2..79fcd6bb6d 100644 --- a/Gui/InfoViewerWidget.cpp +++ b/Gui/InfoViewerWidget.cpp @@ -98,32 +98,20 @@ InfoViewerWidget::InfoViewerWidget(const QString & description, descriptionText.append( QString::fromUtf8("") ); descriptionLabel->setText(descriptionText); QFontMetrics fm = descriptionLabel->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("A:") ); -#else - int width = fm.width( QString::fromUtf8("A:") ); -#endif descriptionLabel->setMinimumWidth(width); } imageFormat = new Label(this); { QFontMetrics fm = imageFormat->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("backward.motion32f") ); -#else - int width = fm.width( QString::fromUtf8("backward.motion32f") ); -#endif imageFormat->setMinimumWidth(width); } resolution = new Label(this); { QFontMetrics fm = resolution->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("2K_Super_35(full-ap) 00000x00000:0.00") ); -#else - int width = fm.width( QString::fromUtf8("2K_Super_35(full-ap) 00000x00000:0.00") ); -#endif resolution->setMinimumWidth(width); } @@ -131,11 +119,7 @@ InfoViewerWidget::InfoViewerWidget(const QString & description, coordDispWindow = new Label(this); { QFontMetrics fm = coordDispWindow->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("RoD: 000 000 0000 0000") ); -#else - int width = fm.width( QString::fromUtf8("RoD: 000 000 0000 0000") ); -#endif coordDispWindow->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); coordDispWindow->setMinimumWidth(width); } @@ -143,11 +127,7 @@ InfoViewerWidget::InfoViewerWidget(const QString & description, _fpsLabel = new Label(this); { QFontMetrics fm = _fpsLabel->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("100 fps") ); -#else - int width = fm.width( QString::fromUtf8("100 fps") ); -#endif _fpsLabel->setMinimumWidth(width); _fpsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); _fpsLabel->hide(); @@ -156,22 +136,14 @@ InfoViewerWidget::InfoViewerWidget(const QString & description, coordMouse = new Label(this); { QFontMetrics fm = coordMouse->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("x=00000 y=00000") ); -#else - int width = fm.width( QString::fromUtf8("x=00000 y=00000") ); -#endif coordMouse->setMinimumWidth(width); } rgbaValues = new Label(this); { QFontMetrics fm = rgbaValues->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("0.00000 0.00000 0.00000 ~ ") ); -#else - int width = fm.width( QString::fromUtf8("0.00000 0.00000 0.00000 ~ ") ); -#endif rgbaValues->setMinimumWidth(width); } @@ -181,11 +153,7 @@ InfoViewerWidget::InfoViewerWidget(const QString & description, hvl_lastOption = new Label(this); { QFontMetrics fm = hvl_lastOption->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int width = fm.horizontalAdvance( QString::fromUtf8("H:000 S:0.00 V:0.00 L:0.00000") ); -#else - int width = fm.width( QString::fromUtf8("H:000 S:0.00 V:0.00 L:0.00000") ); -#endif hvl_lastOption->setMinimumWidth(width); } diff --git a/Gui/KnobGui20.cpp b/Gui/KnobGui20.cpp index 0ffb2b5251..995826fec8 100644 --- a/Gui/KnobGui20.cpp +++ b/Gui/KnobGui20.cpp @@ -578,11 +578,7 @@ KnobGui::getStringWidthForCurrentFont(const std::string& string) const return _imp->customInteract->getStringWidthForCurrentFont(string); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return getGui()->fontMetrics().horizontalAdvance( QString::fromUtf8( string.c_str() ) ); -#else - return getGui()->fontMetrics().width( QString::fromUtf8( string.c_str() ) ); -#endif } void diff --git a/Gui/KnobGuiString.cpp b/Gui/KnobGuiString.cpp index 5ebc9e37ac..ed2dff80ad 100644 --- a/Gui/KnobGuiString.cpp +++ b/Gui/KnobGuiString.cpp @@ -96,11 +96,7 @@ AnimatingTextEdit::AnimatingTextEdit(const KnobGuiPtr& knob, , dirty(false) , _dnd( KnobWidgetDnD::create(knob, dimension, this) ) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) setTabStopDistance(20); -#else - setTabStopWidth(20); // a tab width of 20 is more reasonable than 80 for programming languages (e.g. Shadertoy) -#endif } AnimatingTextEdit::~AnimatingTextEdit() diff --git a/Gui/KnobGuiTable.cpp b/Gui/KnobGuiTable.cpp index a13b0066ea..93ff79bd86 100644 --- a/Gui/KnobGuiTable.cpp +++ b/Gui/KnobGuiTable.cpp @@ -222,12 +222,7 @@ KnobGuiTable::createWidget(QHBoxLayout* layout) _imp->table->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); _imp->table->setAttribute(Qt::WA_MacShowFocusRect, 0); - -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->table->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->table->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->table->setDragDropMode(QAbstractItemView::InternalMove); _imp->table->header()->setStretchLastSection(true); _imp->table->setUniformRowHeights(true); diff --git a/Gui/KnobWidgetDnD.cpp b/Gui/KnobWidgetDnD.cpp index 8299231e38..25c863de64 100644 --- a/Gui/KnobWidgetDnD.cpp +++ b/Gui/KnobWidgetDnD.cpp @@ -285,11 +285,7 @@ KnobWidgetDnD::startDrag() textThirdLine = tr("Drag it to a dimension of another parameter of the same type"); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int textWidth = std::max( std::max( fmetrics.horizontalAdvance(textFirstLine), fmetrics.horizontalAdvance(knobLine) ), fmetrics.horizontalAdvance(textThirdLine) ); -#else - int textWidth = std::max( std::max( fmetrics.width(textFirstLine), fmetrics.width(knobLine) ), fmetrics.width(textThirdLine) ); -#endif QImage dragImg(textWidth, (fmetrics.height() + 5) * 3, QImage::Format_ARGB32); dragImg.fill( QColor(0, 0, 0, 200) ); QPainter p(&dragImg); diff --git a/Gui/Label.h b/Gui/Label.h index 19d9c86550..63b38f4d66 100644 --- a/Gui/Label.h +++ b/Gui/Label.h @@ -48,18 +48,10 @@ class Label Label(const QString &text, QWidget *parent = 0, -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) Qt::WindowFlags f = Qt::WindowFlags()); -#else - Qt::WindowFlags f = 0); -#endif Label(QWidget *parent = 0, -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) Qt::WindowFlags f = Qt::WindowFlags()); -#else - Qt::WindowFlags f = 0); -#endif bool getAltered() const; diff --git a/Gui/LineEdit.cpp b/Gui/LineEdit.cpp index 58f96fbeea..658b5c9f38 100644 --- a/Gui/LineEdit.cpp +++ b/Gui/LineEdit.cpp @@ -87,7 +87,7 @@ LineEdit::dropEvent(QDropEvent* e) QList urls = e->mimeData()->urls(); QString path; if (urls.size() > 0) { - path = QtCompat::toLocalFileUrlFixed( urls.at(0) ).toLocalFile(); + path = urls.at(0).toLocalFile(); } if ( !path.isEmpty() ) { setText(path); diff --git a/Gui/MultiInstancePanel.cpp b/Gui/MultiInstancePanel.cpp index 7a1bc87f0a..22b788d099 100644 --- a/Gui/MultiInstancePanel.cpp +++ b/Gui/MultiInstancePanel.cpp @@ -36,21 +36,12 @@ CLANG_DIAG_OFF(uninitialized) #include #include // QtCore on Qt4, QtConcurrent on Qt5 -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include #include #include #include #include #include -#else -#include -#include -#include -#include -#include -#include -#endif #include #include @@ -551,11 +542,7 @@ MultiInstancePanel::createMultiInstanceGui(QVBoxLayout* layout) _imp->view->setAttribute(Qt::WA_MacShowFocusRect, 0); _imp->view->setUniformRowHeights(true); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->view->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->view->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->view->header()->setStretchLastSection(true); diff --git a/Gui/NodeGraph25.cpp b/Gui/NodeGraph25.cpp index 81f494285f..4b185f9a6e 100644 --- a/Gui/NodeGraph25.cpp +++ b/Gui/NodeGraph25.cpp @@ -391,18 +391,10 @@ NodeGraph::keyPressEvent(QKeyEvent* e) } else if ( isKeybind(kShortcutGroupNodegraph, kShortcutIDActionGraphTogglePreview, modifiers, key) ) { togglePreviewsForSelectedNodes(); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomIn, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, 120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), 120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomOut, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, -120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), -120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else if ( isKeybind(kShortcutGroupNodegraph, kShortcutIDActionGraphOpenNodePanel, modifiers, key) ) { if (_imp->_selection.size() == 1) { diff --git a/Gui/NodeGraph30.cpp b/Gui/NodeGraph30.cpp index 2cb3cbac05..e7a2453674 100644 --- a/Gui/NodeGraph30.cpp +++ b/Gui/NodeGraph30.cpp @@ -189,20 +189,11 @@ NodeGraph::wheelEventInternal(bool ctrlDown, void NodeGraph::wheelEvent(QWheelEvent* e) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { -#else - if (e->orientation() != Qt::Vertical) { -#endif return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) wheelEventInternal( modCASIsControl(e), e->angleDelta().y() ); _imp->_lastMousePos = QPoint(e->position().x(), e->position().y()); -#else - wheelEventInternal( modCASIsControl(e), e->delta() ); - _imp->_lastMousePos = e->pos(); -#endif update(); } diff --git a/Gui/NodeGui.cpp b/Gui/NodeGui.cpp index 9276bfca7f..3efe12077b 100644 --- a/Gui/NodeGui.cpp +++ b/Gui/NodeGui.cpp @@ -1011,11 +1011,7 @@ NodeGui::resize(int width, QString persistentMessage = _persistentMessage->text(); f.setPixelSize(25); metrics = QFontMetrics(f, 0); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int pMWidth = metrics.horizontalAdvance(persistentMessage); -#else - int pMWidth = metrics.width(persistentMessage); -#endif int midNodeX = topLeft.x() + iconWidth + (width - iconWidth) / 2; QPointF bitDepthPos(midNodeX, 0); _streamIssuesWarning->refreshPosition(bitDepthPos); @@ -1898,11 +1894,7 @@ NodeGui::hasEdgeNearbyRect(const QRectF & rect) edgeLine.setP1( (*it)->mapToScene( edgeLine.p1() ) ); edgeLine.setP2( (*it)->mapToScene( edgeLine.p2() ) ); for (int j = 0; j < 4; ++j) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType intersectType = edgeLine.intersects(rectEdges[j], &intersection); -#else - QLineF::IntersectType intersectType = edgeLine.intersect(rectEdges[j], &intersection); -#endif if (intersectType == QLineF::BoundedIntersection) { if (!closest) { closest = *it; @@ -1930,11 +1922,7 @@ NodeGui::hasEdgeNearbyRect(const QRectF & rect) edgeLine.setP1( (_outputEdge)->mapToScene( edgeLine.p1() ) ); edgeLine.setP2( (_outputEdge)->mapToScene( edgeLine.p2() ) ); for (int j = 0; j < 4; ++j) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType intersectType = edgeLine.intersects(rectEdges[j], &intersection); -#else - QLineF::IntersectType intersectType = edgeLine.intersect(rectEdges[j], &intersection); -#endif if (intersectType == QLineF::BoundedIntersection) { return _outputEdge; } @@ -2913,11 +2901,7 @@ struct NodeGuiIndicatorPrivate textItem->setBrush(textColor); textItem->setZValue(depth); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - textItem->scale(0.8, 0.8); -#else textItem->setScale(0.8); -#endif } }; diff --git a/Gui/NodeSettingsPanel.cpp b/Gui/NodeSettingsPanel.cpp index 3ec8671015..cc0bd37fc6 100644 --- a/Gui/NodeSettingsPanel.cpp +++ b/Gui/NodeSettingsPanel.cpp @@ -32,11 +32,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#else -#include -#endif #include "Global/FStreamsSupport.h" diff --git a/Gui/PreferencesPanel.cpp b/Gui/PreferencesPanel.cpp index d5f847a08c..375e358713 100644 --- a/Gui/PreferencesPanel.cpp +++ b/Gui/PreferencesPanel.cpp @@ -32,11 +32,7 @@ CLANG_DIAG_OFF(deprecated) CLANG_DIAG_OFF(uninitialized) #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) #include -#else -#include -#endif #include #include @@ -520,11 +516,7 @@ PreferencesPanel::createPluginsView(QGridLayout* pluginsFrameLayout) treeHeader->setText( COL_GL_ENABLED, tr("OpenGL") ); _imp->pluginsView->setHeaderItem(treeHeader); _imp->pluginsView->setSelectionMode(QAbstractItemView::NoSelection); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->pluginsView->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->pluginsView->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->pluginsView->setSortingEnabled(true); const PluginsMap& plugins = appPTR->getPluginsList(); @@ -765,11 +757,7 @@ PreferencesPanel::createGui() uiTabTreeItem = _imp->tabs[i].treeItem; } QString label = QString::fromUtf8( pageKnob->getLabel().c_str() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = fm.horizontalAdvance(label); -#else - int w = fm.width(label); -#endif maxLength = std::max(w, maxLength); } assert(pluginsFrameLayout); @@ -1212,13 +1200,8 @@ PreferencesPanel::saveChangesAndClose() void PreferencesPanel::showEvent(QShowEvent* /*e*/) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); const QRect rect = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - const QRect rect = desktop->screenGeometry(); -#endif move( QPoint(rect.width() / 2 - width() / 2, rect.height() / 2 - height() / 2) ); diff --git a/Gui/PythonPanels.cpp b/Gui/PythonPanels.cpp index ea0e5b29fe..20f8f6d285 100644 --- a/Gui/PythonPanels.cpp +++ b/Gui/PythonPanels.cpp @@ -334,7 +334,6 @@ PyModalDialog::getParam(const QString& scriptName) const return Effect::createParamWrapperForKnob(knob); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QSize PyModalDialog::minimumSizeHint() const { @@ -346,7 +345,6 @@ PyModalDialog::sizeHint() const { return QWidget::sizeHint(); } -#endif struct PyPanelPrivate { diff --git a/Gui/PythonPanels.h b/Gui/PythonPanels.h index 2a688fca27..c5f83ed529 100644 --- a/Gui/PythonPanels.h +++ b/Gui/PythonPanels.h @@ -103,11 +103,9 @@ class PyModalDialog void addWidget(QWidget* widget); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) virtual QSize minimumSizeHint() const OVERRIDE FINAL; virtual QSize sizeHint() const OVERRIDE FINAL; -#endif DialogParamHolder* getKnobsHolder() const; diff --git a/Gui/QGLExtrasCompat.h b/Gui/QGLExtrasCompat.h deleted file mode 100644 index eef1353c62..0000000000 --- a/Gui/QGLExtrasCompat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * This file is part of Natron , - * (C) 2018-2023 The Natron developers - * (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat - * - * Natron is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Natron is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Natron. If not, see - * ***** END LICENSE BLOCK ***** */ - -// This is a header that provides type declarations that map a subset of the newer QOpenGL -// classes used by Natron with their older QGL counterparts - -#ifndef NATRON_GUI_QGLEXTRASCOMPAT_H -#define NATRON_GUI_QGLEXTRASCOMPAT_H - -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) -#error "This file must not be included while using Qt >= 5.4.0" -#endif - -#include "Global/Macros.h" - -// QGL was deprecated in macOS -CLANG_DIAG_OFF(deprecated) -#include -#include -CLANG_DIAG_ON(deprecated) - -typedef QGLShaderProgram QOpenGLShaderProgram; -typedef QSharedPointer QOpenGLShaderProgramPtr; -typedef QGLShader QOpenGLShader; - -#endif // NATRON_GUI_QGLEXTRASCOMPAT_H diff --git a/Gui/QGLWidgetCompat.h b/Gui/QGLWidgetCompat.h deleted file mode 100644 index 67194fad65..0000000000 --- a/Gui/QGLWidgetCompat.h +++ /dev/null @@ -1,39 +0,0 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * This file is part of Natron , - * (C) 2018-2023 The Natron developers - * (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat - * - * Natron is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * Natron is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Natron. If not, see - * ***** END LICENSE BLOCK ***** */ - -// This is a header that provides type declarations that map a subset of the newer QOpenGL -// classes used by Natron with their older QGL counterparts - -#ifndef NATRON_GUI_QGLWIDGETCOMPAT_H -#define NATRON_GUI_QGLWIDGETCOMPAT_H - -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) -#error "This file must not be included while using Qt >= 5.4.0" -#endif - -#include "Global/Macros.h" - -CLANG_DIAG_OFF(deprecated) -#include -CLANG_DIAG_ON(deprecated) - -typedef QGLWidget QOpenGLWidget; -typedef QGLContext QOpenGLContext; - -#endif // NATRON_GUI_QGLWIDGETCOMPAT_H diff --git a/Gui/Qt4/NatronGui/guiapp_wrapper.cpp b/Gui/Qt4/NatronGui/guiapp_wrapper.cpp deleted file mode 100644 index 3bec1ef234..0000000000 --- a/Gui/Qt4/NatronGui/guiapp_wrapper.cpp +++ /dev/null @@ -1,1656 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natrongui_python.h" - -#include "guiapp_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include -#include -#include -#include -#include -#include - - -// Native --------------------------------------------------------- - -void GuiAppWrapper::pysideInitQtMetaTypes() -{ -} - -GuiAppWrapper::~GuiAppWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_GuiAppFunc_clearSelection(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.clearSelection(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:clearSelection", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: clearSelection(Group*) - if (numArgs == 0) { - overloadId = 0; // clearSelection(Group*) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) { - overloadId = 0; // clearSelection(Group*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_clearSelection_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.clearSelection(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_clearSelection_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Group* cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // clearSelection(Group*) - cppSelf->clearSelection(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_clearSelection_TypeError: - const char* overloads[] = {"NatronEngine.Group = None", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.clearSelection", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_createModalDialog(PyObject* self) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // createModalDialog() - PyModalDialog * cppResult = cppSelf->createModalDialog(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX], cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GuiAppFunc_deselectNode(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: deselectNode(Effect*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArg)))) { - overloadId = 0; // deselectNode(Effect*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_deselectNode_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::Effect* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // deselectNode(Effect*) - cppSelf->deselectNode(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_deselectNode_TypeError: - const char* overloads[] = {"NatronEngine.Effect", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.deselectNode", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getActiveTabWidget(PyObject* self) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getActiveTabWidget()const - PyTabWidget * cppResult = const_cast(cppSelf)->getActiveTabWidget(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GuiAppFunc_getActiveViewer(PyObject* self) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getActiveViewer()const - PyViewer * cppResult = const_cast(cppSelf)->getActiveViewer(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYVIEWER_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GuiAppFunc_getDirectoryDialog(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getDirectoryDialog(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getDirectoryDialog", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getDirectoryDialog(QString)const - if (numArgs == 0) { - overloadId = 0; // getDirectoryDialog(QString)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) { - overloadId = 0; // getDirectoryDialog(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getDirectoryDialog_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "location"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getDirectoryDialog(): got multiple values for keyword argument 'location'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_getDirectoryDialog_TypeError; - } - } - ::QString cppArg0 = QString(); - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getDirectoryDialog(QString)const - QString cppResult = const_cast(cppSelf)->getDirectoryDialog(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getDirectoryDialog_TypeError: - const char* overloads[] = {"unicode = QString()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.getDirectoryDialog", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getFilenameDialog(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getFilenameDialog(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getFilenameDialog(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getFilenameDialog", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getFilenameDialog(QStringList,QString)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getFilenameDialog(QStringList,QString)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // getFilenameDialog(QStringList,QString)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getFilenameDialog_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "location"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getFilenameDialog(): got multiple values for keyword argument 'location'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) - goto Sbk_GuiAppFunc_getFilenameDialog_TypeError; - } - } - ::QStringList cppArg0 = ::QStringList(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = QString(); - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getFilenameDialog(QStringList,QString)const - QString cppResult = const_cast(cppSelf)->getFilenameDialog(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getFilenameDialog_TypeError: - const char* overloads[] = {"QStringList, unicode = QString()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.getFilenameDialog", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getRGBColorDialog(PyObject* self) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getRGBColorDialog()const - ColorTuple* cppResult = new ColorTuple(const_cast(cppSelf)->getRGBColorDialog()); - pyResult = Shiboken::Object::newObject((SbkObjectType*)SbkNatronEngineTypes[SBK_COLORTUPLE_IDX], cppResult, true, true); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_GuiAppFunc_getSelectedNodes(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getSelectedNodes(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:getSelectedNodes", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: getSelectedNodes(Group*)const - if (numArgs == 0) { - overloadId = 0; // getSelectedNodes(Group*)const - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) { - overloadId = 0; // getSelectedNodes(Group*)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getSelectedNodes_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getSelectedNodes(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_getSelectedNodes_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Group* cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // getSelectedNodes(Group*)const - // Begin code injection - - std::list effects = cppSelf->getSelectedNodes(cppArg0); - PyObject* ret = PyList_New((int) effects.size()); - int idx = 0; - for (std::list::iterator it = effects.begin(); it!=effects.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getSelectedNodes_TypeError: - const char* overloads[] = {"NatronEngine.Group = None", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.getSelectedNodes", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getSequenceDialog(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getSequenceDialog(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getSequenceDialog(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:getSequenceDialog", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: getSequenceDialog(QStringList,QString)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // getSequenceDialog(QStringList,QString)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // getSequenceDialog(QStringList,QString)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getSequenceDialog_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "location"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.getSequenceDialog(): got multiple values for keyword argument 'location'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) - goto Sbk_GuiAppFunc_getSequenceDialog_TypeError; - } - } - ::QStringList cppArg0 = ::QStringList(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = QString(); - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // getSequenceDialog(QStringList,QString)const - QString cppResult = const_cast(cppSelf)->getSequenceDialog(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getSequenceDialog_TypeError: - const char* overloads[] = {"QStringList, unicode = QString()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.getSequenceDialog", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getTabWidget(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getTabWidget(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getTabWidget(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getTabWidget_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getTabWidget(QString)const - PyTabWidget * cppResult = const_cast(cppSelf)->getTabWidget(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getTabWidget_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.getTabWidget", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getUserPanel(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getUserPanel(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getUserPanel(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getUserPanel_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getUserPanel(QString)const - PyPanel * cppResult = const_cast(cppSelf)->getUserPanel(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYPANEL_IDX], cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getUserPanel_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.getUserPanel", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_getViewer(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getViewer(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getViewer(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_getViewer_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getViewer(QString)const - PyViewer * cppResult = const_cast(cppSelf)->getViewer(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYVIEWER_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_getViewer_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.getViewer", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_moveTab(PyObject* self, PyObject* args) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "moveTab", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: moveTab(QString,PyTabWidget*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (pyArgs[1])))) { - overloadId = 0; // moveTab(QString,PyTabWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_moveTab_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::PyTabWidget* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // moveTab(QString,PyTabWidget*) - bool cppResult = cppSelf->moveTab(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_moveTab_TypeError: - const char* overloads[] = {"unicode, NatronGui.PyTabWidget", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.moveTab", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_registerPythonPanel(PyObject* self, PyObject* args) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "registerPythonPanel", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: registerPythonPanel(PyPanel*,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_PYPANEL_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // registerPythonPanel(PyPanel*,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_registerPythonPanel_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::PyPanel* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // registerPythonPanel(PyPanel*,QString) - cppSelf->registerPythonPanel(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_registerPythonPanel_TypeError: - const char* overloads[] = {"NatronGui.PyPanel, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.registerPythonPanel", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_renderBlocking(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 4) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.renderBlocking(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.renderBlocking(): not enough arguments"); - return 0; - } else if (numArgs == 2) - goto Sbk_GuiAppFunc_renderBlocking_TypeError; - - if (!PyArg_ParseTuple(args, "|OOOO:renderBlocking", &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: renderBlocking(Effect*,int,int,int) - // 1: renderBlocking(std::list,std::list,std::list,std::list) - if (numArgs >= 3 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2])))) { - if (numArgs == 3) { - overloadId = 0; // renderBlocking(Effect*,int,int,int) - } else if ((pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) { - overloadId = 0; // renderBlocking(Effect*,int,int,int) - } - } else if (numArgs == 1 - && PyList_Check(pyArgs[0])) { - overloadId = 1; // renderBlocking(std::list,std::list,std::list,std::list) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_renderBlocking_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // renderBlocking(Effect * writeNode, int firstFrame, int lastFrame, int frameStep) - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "frameStep"); - if (value && pyArgs[3]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.renderBlocking(): got multiple values for keyword argument 'frameStep'."); - return 0; - } else if (value) { - pyArgs[3] = value; - if (!(pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[3])))) - goto Sbk_GuiAppFunc_renderBlocking_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Effect* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - int cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - int cppArg3 = 1; - if (pythonToCpp[3]) pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // renderBlocking(Effect*,int,int,int) - cppSelf->renderBlocking(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - case 1: // renderBlocking(const std::list & effects, const std::list & firstFrames, const std::list & lastFrames, const std::list & frameSteps) - { - - if (!PyErr_Occurred()) { - // renderBlocking(std::list,std::list,std::list,std::list) - // Begin code injection - - if (!PyList_Check(pyArgs[1-1])) { - PyErr_SetString(PyExc_TypeError, "tasks must be a list of tuple objects."); - return 0; - } - std::list effects; - - std::list firstFrames; - - std::list lastFrames; - - std::list frameSteps; - - int size = (int)PyList_GET_SIZE(pyArgs[1-1]); - for (int i = 0; i < size; ++i) { - PyObject* tuple = PyList_GET_ITEM(pyArgs[1-1],i); - if (!tuple) { - PyErr_SetString(PyExc_TypeError, "tasks must be a list of tuple objects."); - return 0; - } - - int tupleSize = PyTuple_GET_SIZE(tuple); - if (tupleSize != 4 && tupleSize != 3) { - PyErr_SetString(PyExc_TypeError, "the tuple must have 3 or 4 items."); - return 0; - } - ::Effect* writeNode = ((::Effect*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], PyTuple_GET_ITEM(tuple, 0), &(writeNode)); - int firstFrame; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 1), &(firstFrame)); - int lastFrame; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 2), &(lastFrame)); - int frameStep; - if (tupleSize == 4) { - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), PyTuple_GET_ITEM(tuple, 3), &(frameStep)); - } else { - frameStep = INT_MIN; - } - effects.push_back(writeNode); - firstFrames.push_back(firstFrame); - lastFrames.push_back(lastFrame); - frameSteps.push_back(frameStep); - } - - cppSelf->renderBlocking(effects,firstFrames,lastFrames, frameSteps); - - // End of code injection - - - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_renderBlocking_TypeError: - const char* overloads[] = {"NatronEngine.Effect, int, int, int = 1", "list, list, list, list", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.renderBlocking", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_saveFilenameDialog(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveFilenameDialog(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveFilenameDialog(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:saveFilenameDialog", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: saveFilenameDialog(QStringList,QString)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // saveFilenameDialog(QStringList,QString)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // saveFilenameDialog(QStringList,QString)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_saveFilenameDialog_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "location"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveFilenameDialog(): got multiple values for keyword argument 'location'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) - goto Sbk_GuiAppFunc_saveFilenameDialog_TypeError; - } - } - ::QStringList cppArg0 = ::QStringList(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = QString(); - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // saveFilenameDialog(QStringList,QString)const - QString cppResult = const_cast(cppSelf)->saveFilenameDialog(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_saveFilenameDialog_TypeError: - const char* overloads[] = {"QStringList, unicode = QString()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.saveFilenameDialog", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_saveSequenceDialog(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 2) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveSequenceDialog(): too many arguments"); - return 0; - } else if (numArgs < 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveSequenceDialog(): not enough arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|OO:saveSequenceDialog", &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: saveSequenceDialog(QStringList,QString)const - if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRINGLIST_IDX], (pyArgs[0])))) { - if (numArgs == 1) { - overloadId = 0; // saveSequenceDialog(QStringList,QString)const - } else if ((pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // saveSequenceDialog(QStringList,QString)const - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_saveSequenceDialog_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "location"); - if (value && pyArgs[1]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.saveSequenceDialog(): got multiple values for keyword argument 'location'."); - return 0; - } else if (value) { - pyArgs[1] = value; - if (!(pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) - goto Sbk_GuiAppFunc_saveSequenceDialog_TypeError; - } - } - ::QStringList cppArg0 = ::QStringList(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = QString(); - if (pythonToCpp[1]) pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // saveSequenceDialog(QStringList,QString)const - QString cppResult = const_cast(cppSelf)->saveSequenceDialog(cppArg0, cppArg1); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_GuiAppFunc_saveSequenceDialog_TypeError: - const char* overloads[] = {"QStringList, unicode = QString()", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.saveSequenceDialog", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_selectAllNodes(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.selectAllNodes(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:selectAllNodes", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: selectAllNodes(Group*) - if (numArgs == 0) { - overloadId = 0; // selectAllNodes(Group*) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) { - overloadId = 0; // selectAllNodes(Group*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_selectAllNodes_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.selectAllNodes(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_selectAllNodes_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Group* cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // selectAllNodes(Group*) - cppSelf->selectAllNodes(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_selectAllNodes_TypeError: - const char* overloads[] = {"NatronEngine.Group = None", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.selectAllNodes", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_copySelectedNodes(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.copySelectedNodes(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:copySelectedNodes", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: copySelectedNodes(Group*) - if (numArgs == 0) { - overloadId = 0; // copySelectedNodes(Group*) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) { - overloadId = 0; // copySelectedNodes(Group*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_copySelectedNodes_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.copySelectedNodes(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_copySelectedNodes_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Group* cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // copySelectedNodes(Group*) - cppSelf->copySelectedNodes(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_copySelectedNodes_TypeError: - const char* overloads[] = {"NatronEngine.Group = None", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.copySelectedNodes", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_pasteNodes(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.pasteNodes(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:pasteNodes", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: pasteNodes(Group*) - if (numArgs == 0) { - overloadId = 0; // pasteNodes(Group*) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) { - overloadId = 0; // pasteNodes(Group*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_pasteNodes_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "group"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.GuiApp.pasteNodes(): got multiple values for keyword argument 'group'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_GROUP_IDX], (pyArgs[0])))) - goto Sbk_GuiAppFunc_pasteNodes_TypeError; - } - } - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Group* cppArg0 = 0; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // pasteNodes(Group*) - cppSelf->pasteNodes(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_pasteNodes_TypeError: - const char* overloads[] = {"NatronEngine.Group = None", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.pasteNodes", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_selectNode(PyObject* self, PyObject* args) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "selectNode", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: selectNode(Effect*,bool) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // selectNode(Effect*,bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_selectNode_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArgs[0])) - return 0; - ::Effect* cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - bool cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // selectNode(Effect*,bool) - cppSelf->selectNode(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_selectNode_TypeError: - const char* overloads[] = {"NatronEngine.Effect, bool", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.GuiApp.selectNode", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_setSelection(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setSelection(std::list) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_EFFECTPTR_IDX], (pyArg)))) { - overloadId = 0; // setSelection(std::list) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_setSelection_TypeError; - - // Call function/method - { - ::std::list cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setSelection(std::list) - cppSelf->setSelection(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_setSelection_TypeError: - const char* overloads[] = {"list", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.setSelection", overloads); - return 0; -} - -static PyObject* Sbk_GuiAppFunc_unregisterPythonPanel(PyObject* self, PyObject* pyArg) -{ - ::GuiApp* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::GuiApp*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_GUIAPP_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: unregisterPythonPanel(PyPanel*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_PYPANEL_IDX], (pyArg)))) { - overloadId = 0; // unregisterPythonPanel(PyPanel*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_GuiAppFunc_unregisterPythonPanel_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::PyPanel* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // unregisterPythonPanel(PyPanel*) - cppSelf->unregisterPythonPanel(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_GuiAppFunc_unregisterPythonPanel_TypeError: - const char* overloads[] = {"NatronGui.PyPanel", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.GuiApp.unregisterPythonPanel", overloads); - return 0; -} - -static PyMethodDef Sbk_GuiApp_methods[] = { - {"clearSelection", (PyCFunction)Sbk_GuiAppFunc_clearSelection, METH_VARARGS|METH_KEYWORDS}, - {"createModalDialog", (PyCFunction)Sbk_GuiAppFunc_createModalDialog, METH_NOARGS}, - {"deselectNode", (PyCFunction)Sbk_GuiAppFunc_deselectNode, METH_O}, - {"getActiveTabWidget", (PyCFunction)Sbk_GuiAppFunc_getActiveTabWidget, METH_NOARGS}, - {"getActiveViewer", (PyCFunction)Sbk_GuiAppFunc_getActiveViewer, METH_NOARGS}, - {"getDirectoryDialog", (PyCFunction)Sbk_GuiAppFunc_getDirectoryDialog, METH_VARARGS|METH_KEYWORDS}, - {"getFilenameDialog", (PyCFunction)Sbk_GuiAppFunc_getFilenameDialog, METH_VARARGS|METH_KEYWORDS}, - {"getRGBColorDialog", (PyCFunction)Sbk_GuiAppFunc_getRGBColorDialog, METH_NOARGS}, - {"getSelectedNodes", (PyCFunction)Sbk_GuiAppFunc_getSelectedNodes, METH_VARARGS|METH_KEYWORDS}, - {"getSequenceDialog", (PyCFunction)Sbk_GuiAppFunc_getSequenceDialog, METH_VARARGS|METH_KEYWORDS}, - {"getTabWidget", (PyCFunction)Sbk_GuiAppFunc_getTabWidget, METH_O}, - {"getUserPanel", (PyCFunction)Sbk_GuiAppFunc_getUserPanel, METH_O}, - {"getViewer", (PyCFunction)Sbk_GuiAppFunc_getViewer, METH_O}, - {"moveTab", (PyCFunction)Sbk_GuiAppFunc_moveTab, METH_VARARGS}, - {"registerPythonPanel", (PyCFunction)Sbk_GuiAppFunc_registerPythonPanel, METH_VARARGS}, - {"renderBlocking", (PyCFunction)Sbk_GuiAppFunc_renderBlocking, METH_VARARGS|METH_KEYWORDS}, - {"saveFilenameDialog", (PyCFunction)Sbk_GuiAppFunc_saveFilenameDialog, METH_VARARGS|METH_KEYWORDS}, - {"saveSequenceDialog", (PyCFunction)Sbk_GuiAppFunc_saveSequenceDialog, METH_VARARGS|METH_KEYWORDS}, - {"selectAllNodes", (PyCFunction)Sbk_GuiAppFunc_selectAllNodes, METH_VARARGS|METH_KEYWORDS}, - {"copySelectedNodes", (PyCFunction)Sbk_GuiAppFunc_copySelectedNodes, METH_VARARGS|METH_KEYWORDS}, - {"pasteNodes", (PyCFunction)Sbk_GuiAppFunc_pasteNodes, METH_VARARGS|METH_KEYWORDS}, - {"selectNode", (PyCFunction)Sbk_GuiAppFunc_selectNode, METH_VARARGS}, - {"setSelection", (PyCFunction)Sbk_GuiAppFunc_setSelection, METH_O}, - {"unregisterPythonPanel", (PyCFunction)Sbk_GuiAppFunc_unregisterPythonPanel, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_GuiApp_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_GuiApp_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_GuiApp_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.GuiApp", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_GuiApp_traverse, - /*tp_clear*/ Sbk_GuiApp_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_GuiApp_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_GuiApp_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::Group >())) - return dynamic_cast< ::GuiApp*>(reinterpret_cast< ::Group*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void GuiApp_PythonToCpp_GuiApp_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_GuiApp_Type, pyIn, cppOut); -} -static PythonToCppFunc is_GuiApp_PythonToCpp_GuiApp_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_GuiApp_Type)) - return GuiApp_PythonToCpp_GuiApp_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* GuiApp_PTR_CppToPython_GuiApp(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::GuiApp*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_GuiApp_Type, const_cast(cppIn), false, false, typeName); -} - -void init_GuiApp(PyObject* module) -{ - SbkNatronGuiTypes[SBK_GUIAPP_IDX] = reinterpret_cast(&Sbk_GuiApp_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "GuiApp", "GuiApp*", - &Sbk_GuiApp_Type, &Shiboken::callCppDestructor< ::GuiApp >, (SbkObjectType*)SbkNatronEngineTypes[SBK_APP_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_GuiApp_Type, - GuiApp_PythonToCpp_GuiApp_PTR, - is_GuiApp_PythonToCpp_GuiApp_PTR_Convertible, - GuiApp_PTR_CppToPython_GuiApp); - - Shiboken::Conversions::registerConverterName(converter, "GuiApp"); - Shiboken::Conversions::registerConverterName(converter, "GuiApp*"); - Shiboken::Conversions::registerConverterName(converter, "GuiApp&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::GuiApp).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::GuiAppWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_GuiApp_Type, &Sbk_GuiApp_typeDiscovery); - - - GuiAppWrapper::pysideInitQtMetaTypes(); -} diff --git a/Gui/Qt4/NatronGui/guiapp_wrapper.h b/Gui/Qt4/NatronGui/guiapp_wrapper.h deleted file mode 100644 index 0db86278fa..0000000000 --- a/Gui/Qt4/NatronGui/guiapp_wrapper.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef SBK_GUIAPPWRAPPER_H -#define SBK_GUIAPPWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class GuiAppWrapper : public GuiApp -{ -public: - virtual ~GuiAppWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_GUIAPPWRAPPER_H - diff --git a/Gui/Qt4/NatronGui/natrongui_module_wrapper.cpp b/Gui/Qt4/NatronGui/natrongui_module_wrapper.cpp deleted file mode 100644 index 70af28977f..0000000000 --- a/Gui/Qt4/NatronGui/natrongui_module_wrapper.cpp +++ /dev/null @@ -1,606 +0,0 @@ - -#include -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include "natrongui_python.h" - - - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - -// Current module's type array. -PyTypeObject** SbkNatronGuiTypes; -// Current module's converter array. -SbkConverter** SbkNatronGuiTypeConverters; -void cleanGuiTypesAttributes(void) { - for (int i = 0, imax = SBK_NatronGui_IDX_COUNT; i < imax; i++) { - PyObject *pyType = reinterpret_cast(SbkNatronGuiTypes[i]); - if (pyType && PyObject_HasAttrString(pyType, "staticMetaObject")) - PyObject_SetAttrString(pyType, "staticMetaObject", Py_None); - } -} -// Global functions ------------------------------------------------------------ - -static PyMethodDef NatronGui_methods[] = { - {0} // Sentinel -}; - -// Classes initialization functions ------------------------------------------------------------ -void init_PyGuiApplication(PyObject* module); -void init_GuiApp(PyObject* module); -void init_PyViewer(PyObject* module); -void init_PyTabWidget(PyObject* module); -void init_PyPanel(PyObject* module); -void init_PyModalDialog(PyObject* module); - -// Required modules' type and converter arrays. -PyTypeObject** SbkPySide_QtGuiTypes; -SbkConverter** SbkPySide_QtGuiTypeConverters; - -// Module initialization ------------------------------------------------------------ -// Container Type converters. - -// C++ to Python conversion for type 'const std::map &'. -static PyObject* _conststd_map_QString_NodeCreationPropertyPTR_REF_CppToPython__conststd_map_QString_NodeCreationPropertyPTR_REF(const void* cppIn) { - ::std::map& cppInRef = *((::std::map*)cppIn); - - // TEMPLATE - stdMapToPyDict - START - PyObject* pyOut = PyDict_New(); - ::std::map::const_iterator it = cppInRef.begin(); - for (; it != cppInRef.end(); ++it) { - ::QString key = it->first; - ::NodeCreationProperty* value = it->second; - PyObject* pyKey = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &key); - PyObject* pyValue = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX], value); - PyDict_SetItem(pyOut, pyKey, pyValue); - Py_DECREF(pyKey); - Py_DECREF(pyValue); - } - return pyOut; - // TEMPLATE - stdMapToPyDict - END - -} -static void _conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp__conststd_map_QString_NodeCreationPropertyPTR_REF(PyObject* pyIn, void* cppOut) { - ::std::map& cppOutRef = *((::std::map*)cppOut); - - // TEMPLATE - pyDictToStdMap - START - PyObject* key; - PyObject* value; - Py_ssize_t pos = 0; - while (PyDict_Next(pyIn, &pos, &key, &value)) { - ::QString cppKey = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey)); - ::NodeCreationProperty* cppValue = ((::NodeCreationProperty*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX], value, &(cppValue)); - cppOutRef.insert(std::make_pair(cppKey, cppValue)); - } - // TEMPLATE - pyDictToStdMap - END - -} -static PythonToCppFunc is__conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp__conststd_map_QString_NodeCreationPropertyPTR_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleDictTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SBK_CONVERTER(SbkNatronEngineTypes[SBK_NODECREATIONPROPERTY_IDX]), true, pyIn)) - return _conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp__conststd_map_QString_NodeCreationPropertyPTR_REF; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* _std_list_EffectPTR__CppToPython__std_list_EffectPTR_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::Effect* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void _std_list_EffectPTR__PythonToCpp__std_list_EffectPTR_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::Effect* cppItem = ((::Effect*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_EFFECT_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is__std_list_EffectPTR__PythonToCpp__std_list_EffectPTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_EFFECT_IDX], pyIn)) - return _std_list_EffectPTR__PythonToCpp__std_list_EffectPTR_; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* _std_list_QString__CppToPython__std_list_QString_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QString cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void _std_list_QString__PythonToCpp__std_list_QString_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QString cppItem = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is__std_list_QString__PythonToCpp__std_list_QString__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn)) - return _std_list_QString__PythonToCpp__std_list_QString_; - return 0; -} - -// C++ to Python conversion for type 'const std::list &'. -static PyObject* _conststd_list_int_REF_CppToPython__conststd_list_int_REF(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - int cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void _conststd_list_int_REF_PythonToCpp__conststd_list_int_REF(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - int cppItem; - Shiboken::Conversions::pythonToCppCopy(Shiboken::Conversions::PrimitiveTypeConverter(), pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is__conststd_list_int_REF_PythonToCpp__conststd_list_int_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(Shiboken::Conversions::PrimitiveTypeConverter(), pyIn)) - return _conststd_list_int_REF_PythonToCpp__conststd_list_int_REF; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QActionPTR__CppToPython__QList_QActionPTR_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QAction* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QACTION_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QActionPTR__PythonToCpp__QList_QActionPTR_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QAction* cppItem = ((::QAction*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QACTION_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QActionPTR__PythonToCpp__QList_QActionPTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkPySide_QtGuiTypes[SBK_QACTION_IDX], pyIn)) - return _QList_QActionPTR__PythonToCpp__QList_QActionPTR_; - return 0; -} - -// C++ to Python conversion for type 'const QList &'. -static PyObject* _constQList_QObjectPTR_REF_CppToPython__constQList_QObjectPTR_REF(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QObject* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _constQList_QObjectPTR_REF_PythonToCpp__constQList_QObjectPTR_REF(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QObject* cppItem = ((::QObject*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__constQList_QObjectPTR_REF_PythonToCpp__constQList_QObjectPTR_REF_Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], pyIn)) - return _constQList_QObjectPTR_REF_PythonToCpp__constQList_QObjectPTR_REF; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QByteArray__CppToPython__QList_QByteArray_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QByteArray cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QBYTEARRAY_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QByteArray__PythonToCpp__QList_QByteArray_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QByteArray cppItem = ::QByteArray(); - Shiboken::Conversions::pythonToCppCopy((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QBYTEARRAY_IDX], pyIn)) - return _QList_QByteArray__PythonToCpp__QList_QByteArray_; - return 0; -} - -// C++ to Python conversion for type 'std::list'. -static PyObject* _std_list_ParamPTR__CppToPython__std_list_ParamPTR_(const void* cppIn) { - ::std::list& cppInRef = *((::std::list*)cppIn); - - // TEMPLATE - stdListToPyList - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::std::list::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::Param* cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppItem)); - } - return pyOut; - // TEMPLATE - stdListToPyList - END - -} -static void _std_list_ParamPTR__PythonToCpp__std_list_ParamPTR_(PyObject* pyIn, void* cppOut) { - ::std::list& cppOutRef = *((::std::list*)cppOut); - - // TEMPLATE - pyListToStdList - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::Param* cppItem = ((::Param*)0); - Shiboken::Conversions::pythonToCppPointer((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], pyItem, &(cppItem)); - cppOutRef.push_back(cppItem); - } - // TEMPLATE - pyListToStdList - END - -} -static PythonToCppFunc is__std_list_ParamPTR__PythonToCpp__std_list_ParamPTR__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::checkSequenceTypes(SbkNatronEngineTypes[SBK_PARAM_IDX], pyIn)) - return _std_list_ParamPTR__PythonToCpp__std_list_ParamPTR_; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QVariant__CppToPython__QList_QVariant_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QVariant cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QVariant__PythonToCpp__QList_QVariant_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QVariant cppItem = ::QVariant(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyIn)) - return _QList_QVariant__PythonToCpp__QList_QVariant_; - return 0; -} - -// C++ to Python conversion for type 'QList'. -static PyObject* _QList_QString__CppToPython__QList_QString_(const void* cppIn) { - ::QList& cppInRef = *((::QList*)cppIn); - - // TEMPLATE - cpplist_to_pylist_conversion - START - PyObject* pyOut = PyList_New((int) cppInRef.size()); - ::QList::const_iterator it = cppInRef.begin(); - for (int idx = 0; it != cppInRef.end(); ++it, ++idx) { - ::QString cppItem(*it); - PyList_SET_ITEM(pyOut, idx, Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppItem)); - } - return pyOut; - // TEMPLATE - cpplist_to_pylist_conversion - END - -} -static void _QList_QString__PythonToCpp__QList_QString_(PyObject* pyIn, void* cppOut) { - ::QList& cppOutRef = *((::QList*)cppOut); - - // TEMPLATE - pyseq_to_cpplist_conversion - START - for (int i = 0; i < PySequence_Size(pyIn); i++) { - Shiboken::AutoDecRef pyItem(PySequence_GetItem(pyIn, i)); - ::QString cppItem = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyItem, &(cppItem)); - cppOutRef << cppItem; - } - // TEMPLATE - pyseq_to_cpplist_conversion - END - -} -static PythonToCppFunc is__QList_QString__PythonToCpp__QList_QString__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleSequenceTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyIn)) - return _QList_QString__PythonToCpp__QList_QString_; - return 0; -} - -// C++ to Python conversion for type 'QMap'. -static PyObject* _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_(const void* cppIn) { - ::QMap& cppInRef = *((::QMap*)cppIn); - - // TEMPLATE - cppmap_to_pymap_conversion - START - PyObject* pyOut = PyDict_New(); - ::QMap::const_iterator it = cppInRef.begin(); - for (; it != cppInRef.end(); ++it) { - ::QString key = it.key(); - ::QVariant value = it.value(); - PyObject* pyKey = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &key); - PyObject* pyValue = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], &value); - PyDict_SetItem(pyOut, pyKey, pyValue); - Py_DECREF(pyKey); - Py_DECREF(pyValue); - } - return pyOut; - // TEMPLATE - cppmap_to_pymap_conversion - END - -} -static void _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_(PyObject* pyIn, void* cppOut) { - ::QMap& cppOutRef = *((::QMap*)cppOut); - - // TEMPLATE - pydict_to_cppmap_conversion - START - PyObject* key; - PyObject* value; - Py_ssize_t pos = 0; - while (PyDict_Next(pyIn, &pos, &key, &value)) { - ::QString cppKey = ::QString(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], key, &(cppKey)); - ::QVariant cppValue = ::QVariant(); - Shiboken::Conversions::pythonToCppCopy(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], value, &(cppValue)); - cppOutRef.insert(cppKey, cppValue); - } - // TEMPLATE - pydict_to_cppmap_conversion - END - -} -static PythonToCppFunc is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible(PyObject* pyIn) { - if (Shiboken::Conversions::convertibleDictTypes(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], false, SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], false, pyIn)) - return _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_; - return 0; -} - - -#if defined _WIN32 || defined __CYGWIN__ - #define SBK_EXPORT_MODULE __declspec(dllexport) -#elif __GNUC__ >= 4 - #define SBK_EXPORT_MODULE __attribute__ ((visibility("default"))) -#else - #define SBK_EXPORT_MODULE -#endif - -#ifdef IS_PY3K -static struct PyModuleDef moduledef = { - /* m_base */ PyModuleDef_HEAD_INIT, - /* m_name */ "NatronGui", - /* m_doc */ 0, - /* m_size */ -1, - /* m_methods */ NatronGui_methods, - /* m_reload */ 0, - /* m_traverse */ 0, - /* m_clear */ 0, - /* m_free */ 0 -}; - -#endif -SBK_MODULE_INIT_FUNCTION_BEGIN(NatronGui) - { - Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide.QtGui")); - if (requiredModule.isNull()) - return SBK_MODULE_INIT_ERROR; - SbkPySide_QtGuiTypes = Shiboken::Module::getTypes(requiredModule); - SbkPySide_QtGuiTypeConverters = Shiboken::Module::getTypeConverters(requiredModule); - } - - { - Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("PySide.QtCore")); - if (requiredModule.isNull()) - return SBK_MODULE_INIT_ERROR; - SbkPySide_QtCoreTypes = Shiboken::Module::getTypes(requiredModule); - SbkPySide_QtCoreTypeConverters = Shiboken::Module::getTypeConverters(requiredModule); - } - - { - Shiboken::AutoDecRef requiredModule(Shiboken::Module::import("NatronEngine")); - if (requiredModule.isNull()) - return SBK_MODULE_INIT_ERROR; - SbkNatronEngineTypes = Shiboken::Module::getTypes(requiredModule); - SbkNatronEngineTypeConverters = Shiboken::Module::getTypeConverters(requiredModule); - } - - // Create an array of wrapper types for the current module. - static PyTypeObject* cppApi[SBK_NatronGui_IDX_COUNT]; - SbkNatronGuiTypes = cppApi; - - // Create an array of primitive type converters for the current module. - static SbkConverter* sbkConverters[SBK_NatronGui_CONVERTERS_IDX_COUNT]; - SbkNatronGuiTypeConverters = sbkConverters; - -#ifdef IS_PY3K - PyObject* module = Shiboken::Module::create("NatronGui", &moduledef); -#else - PyObject* module = Shiboken::Module::create("NatronGui", NatronGui_methods); -#endif - - // Initialize classes in the type system - init_PyGuiApplication(module); - init_GuiApp(module); - init_PyViewer(module); - init_PyTabWidget(module); - init_PyPanel(module); - init_PyModalDialog(module); - - // Register converter for type 'const std::map&'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _conststd_map_QString_NodeCreationPropertyPTR_REF_CppToPython__conststd_map_QString_NodeCreationPropertyPTR_REF); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], "const std::map&"); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], "std::map"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX], - _conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp__conststd_map_QString_NodeCreationPropertyPTR_REF, - is__conststd_map_QString_NodeCreationPropertyPTR_REF_PythonToCpp__conststd_map_QString_NodeCreationPropertyPTR_REF_Convertible); - - // Register converter for type 'std::list'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_EFFECTPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _std_list_EffectPTR__CppToPython__std_list_EffectPTR_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_EFFECTPTR_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_EFFECTPTR_IDX], - _std_list_EffectPTR__PythonToCpp__std_list_EffectPTR_, - is__std_list_EffectPTR__PythonToCpp__std_list_EffectPTR__Convertible); - - // Register converter for type 'std::list'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _std_list_QString__CppToPython__std_list_QString_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_QSTRING_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_QSTRING_IDX], - _std_list_QString__PythonToCpp__std_list_QString_, - is__std_list_QString__PythonToCpp__std_list_QString__Convertible); - - // Register converter for type 'const std::list&'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_INT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _conststd_list_int_REF_CppToPython__conststd_list_int_REF); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_INT_IDX], "const std::list&"); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_INT_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_INT_IDX], - _conststd_list_int_REF_PythonToCpp__conststd_list_int_REF, - is__conststd_list_int_REF_PythonToCpp__conststd_list_int_REF_Convertible); - - // Register converter for type 'QList'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QACTIONPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QActionPTR__CppToPython__QList_QActionPTR_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QACTIONPTR_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QACTIONPTR_IDX], - _QList_QActionPTR__PythonToCpp__QList_QActionPTR_, - is__QList_QActionPTR__PythonToCpp__QList_QActionPTR__Convertible); - - // Register converter for type 'const QList&'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QOBJECTPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _constQList_QObjectPTR_REF_CppToPython__constQList_QObjectPTR_REF); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QOBJECTPTR_IDX], "const QList&"); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QOBJECTPTR_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QOBJECTPTR_IDX], - _constQList_QObjectPTR_REF_PythonToCpp__constQList_QObjectPTR_REF, - is__constQList_QObjectPTR_REF_PythonToCpp__constQList_QObjectPTR_REF_Convertible); - - // Register converter for type 'QList'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QBYTEARRAY_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QByteArray__CppToPython__QList_QByteArray_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QBYTEARRAY_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QBYTEARRAY_IDX], - _QList_QByteArray__PythonToCpp__QList_QByteArray_, - is__QList_QByteArray__PythonToCpp__QList_QByteArray__Convertible); - - // Register converter for type 'std::list'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_PARAMPTR_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _std_list_ParamPTR__CppToPython__std_list_ParamPTR_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_PARAMPTR_IDX], "std::list"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_STD_LIST_PARAMPTR_IDX], - _std_list_ParamPTR__PythonToCpp__std_list_ParamPTR_, - is__std_list_ParamPTR__PythonToCpp__std_list_ParamPTR__Convertible); - - // Register converter for type 'QList'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QVariant__CppToPython__QList_QVariant_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QVARIANT_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QVARIANT_IDX], - _QList_QVariant__PythonToCpp__QList_QVariant_, - is__QList_QVariant__PythonToCpp__QList_QVariant__Convertible); - - // Register converter for type 'QList'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QSTRING_IDX] = Shiboken::Conversions::createConverter(&PyList_Type, _QList_QString__CppToPython__QList_QString_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QSTRING_IDX], "QList"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QLIST_QSTRING_IDX], - _QList_QString__PythonToCpp__QList_QString_, - is__QList_QString__PythonToCpp__QList_QString__Convertible); - - // Register converter for type 'QMap'. - SbkNatronGuiTypeConverters[SBK_NATRONGUI_QMAP_QSTRING_QVARIANT_IDX] = Shiboken::Conversions::createConverter(&PyDict_Type, _QMap_QString_QVariant__CppToPython__QMap_QString_QVariant_); - Shiboken::Conversions::registerConverterName(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QMAP_QSTRING_QVARIANT_IDX], "QMap"); - Shiboken::Conversions::addPythonToCppValueConversion(SbkNatronGuiTypeConverters[SBK_NATRONGUI_QMAP_QSTRING_QVARIANT_IDX], - _QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant_, - is__QMap_QString_QVariant__PythonToCpp__QMap_QString_QVariant__Convertible); - - // Register primitive types converters. - - Shiboken::Module::registerTypes(module, SbkNatronGuiTypes); - Shiboken::Module::registerTypeConverters(module, SbkNatronGuiTypeConverters); - - if (PyErr_Occurred()) { - PyErr_Print(); - Py_FatalError("can't initialize module NatronGui"); - } - PySide::registerCleanupFunction(cleanGuiTypesAttributes); -SBK_MODULE_INIT_FUNCTION_END diff --git a/Gui/Qt4/NatronGui/natrongui_python.h b/Gui/Qt4/NatronGui/natrongui_python.h deleted file mode 100644 index ef5ccec540..0000000000 --- a/Gui/Qt4/NatronGui/natrongui_python.h +++ /dev/null @@ -1,110 +0,0 @@ - - -#ifndef SBK_NATRONGUI_PYTHON_H -#define SBK_NATRONGUI_PYTHON_H - -#include -#include -#include -#include -#include -#include - -#include -// Module Includes -// clang-format off -CLANG_DIAG_OFF(deprecated) -CLANG_DIAG_OFF(uninitialized) -CLANG_DIAG_OFF(keyword-macro) -#include // produces warnings -CLANG_DIAG_ON(deprecated) -CLANG_DIAG_ON(uninitialized) -CLANG_DIAG_ON(keyword-macro) -// clang-format on -// clang-format off -CLANG_DIAG_OFF(deprecated) -CLANG_DIAG_OFF(uninitialized) -CLANG_DIAG_OFF(keyword-macro) -#include // produces warnings -CLANG_DIAG_ON(deprecated) -CLANG_DIAG_ON(uninitialized) -CLANG_DIAG_ON(keyword-macro) -// clang-format on -#include - -// Binded library includes -#include -#include -#include -// Conversion Includes - Primitive Types -#include -#include -#include -#include -#include -#include - -// Conversion Includes - Container Types -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Type indices -#define SBK_PYTABWIDGET_IDX 4 -#define SBK_PYVIEWER_IDX 5 -#define SBK_GUIAPP_IDX 0 -#define SBK_PYGUIAPPLICATION_IDX 1 -#define SBK_PYPANEL_IDX 3 -#define SBK_PYMODALDIALOG_IDX 2 -#define SBK_NatronGui_IDX_COUNT 6 - -// This variable stores all Python types exported by this module. -extern PyTypeObject** SbkNatronGuiTypes; - -// This variable stores all type converters exported by this module. -extern SbkConverter** SbkNatronGuiTypeConverters; - -// Converter indices -#define SBK_NATRONGUI_STD_MAP_QSTRING_NODECREATIONPROPERTYPTR_IDX 0 // const std::map & -#define SBK_NATRONGUI_STD_LIST_EFFECTPTR_IDX 1 // std::list -#define SBK_NATRONGUI_STD_LIST_QSTRING_IDX 2 // std::list -#define SBK_NATRONGUI_STD_LIST_INT_IDX 3 // const std::list & -#define SBK_NATRONGUI_QLIST_QACTIONPTR_IDX 4 // QList -#define SBK_NATRONGUI_QLIST_QOBJECTPTR_IDX 5 // const QList & -#define SBK_NATRONGUI_QLIST_QBYTEARRAY_IDX 6 // QList -#define SBK_NATRONGUI_STD_LIST_PARAMPTR_IDX 7 // std::list -#define SBK_NATRONGUI_QLIST_QVARIANT_IDX 8 // QList -#define SBK_NATRONGUI_QLIST_QSTRING_IDX 9 // QList -#define SBK_NATRONGUI_QMAP_QSTRING_QVARIANT_IDX 10 // QMap -#define SBK_NatronGui_CONVERTERS_IDX_COUNT 11 - -// Macros for type check - -namespace Shiboken -{ - -// PyType functions, to get the PyObjectType for a type T -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_PYVIEWER_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_GUIAPP_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_PYPANEL_IDX]); } -template<> inline PyTypeObject* SbkType() { return reinterpret_cast(SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX]); } - -} // namespace Shiboken - -#endif // SBK_NATRONGUI_PYTHON_H - diff --git a/Gui/Qt4/NatronGui/pyguiapplication_wrapper.cpp b/Gui/Qt4/NatronGui/pyguiapplication_wrapper.cpp deleted file mode 100644 index 17b9091e41..0000000000 --- a/Gui/Qt4/NatronGui/pyguiapplication_wrapper.cpp +++ /dev/null @@ -1,612 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natrongui_python.h" - -#include "pyguiapplication_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include - - -// Native --------------------------------------------------------- - -void PyGuiApplicationWrapper::pysideInitQtMetaTypes() -{ -} - -PyGuiApplicationWrapper::PyGuiApplicationWrapper() : PyGuiApplication() { - // ... middle -} - -PyGuiApplicationWrapper::~PyGuiApplicationWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_PyGuiApplication_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - SbkObject* sbkSelf = reinterpret_cast(self); - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::PyGuiApplication >())) - return -1; - - ::PyGuiApplicationWrapper* cptr = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // PyGuiApplication() - cptr = new ::PyGuiApplicationWrapper(); - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::PyGuiApplication >(), cptr)) { - delete cptr; - return -1; - } - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - - return 1; -} - -static PyObject* Sbk_PyGuiApplicationFunc_addMenuCommand(PyObject* self, PyObject* args) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - if (numArgs == 3) - goto Sbk_PyGuiApplicationFunc_addMenuCommand_TypeError; - - if (!PyArg_UnpackTuple(args, "addMenuCommand", 2, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return 0; - - - // Overloaded function decisor - // 0: addMenuCommand(QString,QString) - // 1: addMenuCommand(QString,QString,Qt::Key,QFlags) - if (numArgs >= 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - if (numArgs == 2) { - overloadId = 0; // addMenuCommand(QString,QString) - } else if (numArgs == 4 - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkPySide_QtCoreTypes[SBK_QT_KEY_IDX]), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkPySide_QtCoreTypes[SBK_QFLAGS_QT_KEYBOARDMODIFIER__IDX]), (pyArgs[3])))) { - overloadId = 1; // addMenuCommand(QString,QString,Qt::Key,QFlags) - } - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_addMenuCommand_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // addMenuCommand(const QString & grouping, const QString & pythonFunctionName) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // addMenuCommand(QString,QString) - cppSelf->addMenuCommand(cppArg0, cppArg1); - } - break; - } - case 1: // addMenuCommand(const QString & grouping, const QString & pythonFunctionName, Qt::Key key, const QFlags & modifiers) - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - ::Qt::Key cppArg2 = ((::Qt::Key)0); - pythonToCpp[2](pyArgs[2], &cppArg2); - ::QFlags cppArg3 = ((::QFlags)0); - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // addMenuCommand(QString,QString,Qt::Key,QFlags) - cppSelf->addMenuCommand(cppArg0, cppArg1, cppArg2, cppArg3); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyGuiApplicationFunc_addMenuCommand_TypeError: - const char* overloads[] = {"unicode, unicode", "unicode, unicode, PySide.QtCore.Qt.Key, PySide.QtCore.Qt.KeyboardModifiers", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyGuiApplication.addMenuCommand", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_errorDialog(PyObject* self, PyObject* args) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "errorDialog", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: errorDialog(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // errorDialog(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_errorDialog_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // errorDialog(QString,QString) - cppSelf->errorDialog(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyGuiApplicationFunc_errorDialog_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyGuiApplication.errorDialog", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_getGuiInstance(PyObject* self, PyObject* pyArg) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getGuiInstance(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getGuiInstance(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_getGuiInstance_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getGuiInstance(int)const - GuiApp * cppResult = const_cast(cppSelf)->getGuiInstance(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_GUIAPP_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyGuiApplicationFunc_getGuiInstance_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyGuiApplication.getGuiInstance", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_getIcon(PyObject* self, PyObject* pyArg) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getIcon(NATRON_NAMESPACE::PixmapEnum)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PIXMAPENUM_IDX]), (pyArg)))) { - overloadId = 0; // getIcon(NATRON_NAMESPACE::PixmapEnum)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_getIcon_TypeError; - - // Call function/method - { - ::NATRON_NAMESPACE::PixmapEnum cppArg0 = ((::NATRON_NAMESPACE::PixmapEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getIcon(NATRON_NAMESPACE::PixmapEnum)const - QPixmap cppResult = const_cast(cppSelf)->getIcon(cppArg0); - pyResult = Shiboken::Conversions::copyToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QPIXMAP_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyGuiApplicationFunc_getIcon_TypeError: - const char* overloads[] = {"NatronEngine.NATRON_NAMESPACE.PixmapEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyGuiApplication.getIcon", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_informationDialog(PyObject* self, PyObject* args) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "informationDialog", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: informationDialog(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // informationDialog(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_informationDialog_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // informationDialog(QString,QString) - cppSelf->informationDialog(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyGuiApplicationFunc_informationDialog_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyGuiApplication.informationDialog", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_questionDialog(PyObject* self, PyObject* args) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "questionDialog", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: questionDialog(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // questionDialog(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_questionDialog_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // questionDialog(QString,QString) - NATRON_NAMESPACE::StandardButtonEnum cppResult = NATRON_NAMESPACE::StandardButtonEnum(cppSelf->questionDialog(cppArg0, cppArg1)); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_STANDARDBUTTONENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyGuiApplicationFunc_questionDialog_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyGuiApplication.questionDialog", overloads); - return 0; -} - -static PyObject* Sbk_PyGuiApplicationFunc_warningDialog(PyObject* self, PyObject* args) -{ - ::PyGuiApplication* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyGuiApplication*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "warningDialog", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: warningDialog(QString,QString) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1])))) { - overloadId = 0; // warningDialog(QString,QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyGuiApplicationFunc_warningDialog_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // warningDialog(QString,QString) - cppSelf->warningDialog(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyGuiApplicationFunc_warningDialog_TypeError: - const char* overloads[] = {"unicode, unicode", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyGuiApplication.warningDialog", overloads); - return 0; -} - -static PyMethodDef Sbk_PyGuiApplication_methods[] = { - {"addMenuCommand", (PyCFunction)Sbk_PyGuiApplicationFunc_addMenuCommand, METH_VARARGS}, - {"errorDialog", (PyCFunction)Sbk_PyGuiApplicationFunc_errorDialog, METH_VARARGS}, - {"getGuiInstance", (PyCFunction)Sbk_PyGuiApplicationFunc_getGuiInstance, METH_O}, - {"getIcon", (PyCFunction)Sbk_PyGuiApplicationFunc_getIcon, METH_O}, - {"informationDialog", (PyCFunction)Sbk_PyGuiApplicationFunc_informationDialog, METH_VARARGS}, - {"questionDialog", (PyCFunction)Sbk_PyGuiApplicationFunc_questionDialog, METH_VARARGS}, - {"warningDialog", (PyCFunction)Sbk_PyGuiApplicationFunc_warningDialog, METH_VARARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyGuiApplication_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyGuiApplication_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyGuiApplication_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.PyGuiApplication", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyGuiApplication_traverse, - /*tp_clear*/ Sbk_PyGuiApplication_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyGuiApplication_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_PyGuiApplication_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_PyGuiApplication_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::PyCoreApplication >())) - return dynamic_cast< ::PyGuiApplication*>(reinterpret_cast< ::PyCoreApplication*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyGuiApplication_PythonToCpp_PyGuiApplication_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyGuiApplication_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyGuiApplication_PythonToCpp_PyGuiApplication_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyGuiApplication_Type)) - return PyGuiApplication_PythonToCpp_PyGuiApplication_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyGuiApplication_PTR_CppToPython_PyGuiApplication(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PyGuiApplication*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PyGuiApplication_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PyGuiApplication(PyObject* module) -{ - SbkNatronGuiTypes[SBK_PYGUIAPPLICATION_IDX] = reinterpret_cast(&Sbk_PyGuiApplication_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyGuiApplication", "PyGuiApplication*", - &Sbk_PyGuiApplication_Type, &Shiboken::callCppDestructor< ::PyGuiApplication >, (SbkObjectType*)SbkNatronEngineTypes[SBK_PYCOREAPPLICATION_IDX])) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyGuiApplication_Type, - PyGuiApplication_PythonToCpp_PyGuiApplication_PTR, - is_PyGuiApplication_PythonToCpp_PyGuiApplication_PTR_Convertible, - PyGuiApplication_PTR_CppToPython_PyGuiApplication); - - Shiboken::Conversions::registerConverterName(converter, "PyGuiApplication"); - Shiboken::Conversions::registerConverterName(converter, "PyGuiApplication*"); - Shiboken::Conversions::registerConverterName(converter, "PyGuiApplication&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyGuiApplication).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyGuiApplicationWrapper).name()); - - - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_PyGuiApplication_Type, &Sbk_PyGuiApplication_typeDiscovery); - - - PyGuiApplicationWrapper::pysideInitQtMetaTypes(); -} diff --git a/Gui/Qt4/NatronGui/pyguiapplication_wrapper.h b/Gui/Qt4/NatronGui/pyguiapplication_wrapper.h deleted file mode 100644 index 826a57a0e4..0000000000 --- a/Gui/Qt4/NatronGui/pyguiapplication_wrapper.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef SBK_PYGUIAPPLICATIONWRAPPER_H -#define SBK_PYGUIAPPLICATIONWRAPPER_H - -#include - -#include - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PyGuiApplicationWrapper : public PyGuiApplication -{ -public: - PyGuiApplicationWrapper(); - virtual ~PyGuiApplicationWrapper(); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PYGUIAPPLICATIONWRAPPER_H - diff --git a/Gui/Qt4/NatronGui/pymodaldialog_wrapper.cpp b/Gui/Qt4/NatronGui/pymodaldialog_wrapper.cpp deleted file mode 100644 index bacabed07b..0000000000 --- a/Gui/Qt4/NatronGui/pymodaldialog_wrapper.cpp +++ /dev/null @@ -1,1707 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include -CLANG_DIAG_OFF(header-guard) -#include // has wrong header guards in pyside 1.2.2 -#include -#include "natrongui_python.h" - -#include "pymodaldialog_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Native --------------------------------------------------------- - -void PyModalDialogWrapper::pysideInitQtMetaTypes() -{ -} - -void PyModalDialogWrapper::accept() -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "accept")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::accept(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::actionEvent(QActionEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "actionEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::actionEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QACTIONEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::changeEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "changeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::changeEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::childEvent(QChildEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "childEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::childEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QCHILDEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::closeEvent(QCloseEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "closeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::closeEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QCLOSEEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::connectNotify(const char * signal) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "connectNotify")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::connectNotify(signal); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), signal) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::contextMenuEvent(QContextMenuEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "contextMenuEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::contextMenuEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QCONTEXTMENUEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::customEvent(QEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "customEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::customEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyModalDialogWrapper::devType() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "devType")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::devType(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.devType", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::disconnectNotify(const char * signal) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "disconnectNotify")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::disconnectNotify(signal); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), signal) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::done(int arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "done")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::done(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(i)", - arg__1 - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::dragEnterEvent(QDragEnterEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragEnterEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragEnterEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGENTEREVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::dragLeaveEvent(QDragLeaveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragLeaveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragLeaveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGLEAVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::dragMoveEvent(QDragMoveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragMoveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragMoveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGMOVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::dropEvent(QDropEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dropEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dropEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDROPEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::enterEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "enterEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::enterEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -bool PyModalDialogWrapper::event(QEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "event")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::event(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.event", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); - return cppResult; -} - -bool PyModalDialogWrapper::eventFilter(QObject * arg__1, QEvent * arg__2) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "eventFilter")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::eventFilter(arg__1, arg__2); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], arg__1), - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__2) - )); - bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.eventFilter", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - if (invalidateArg2) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1)); - return cppResult; -} - -void PyModalDialogWrapper::focusInEvent(QFocusEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusInEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusInEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QFOCUSEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -bool PyModalDialogWrapper::focusNextPrevChild(bool next) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusNextPrevChild")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusNextPrevChild(next); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &next) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.focusNextPrevChild", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::focusOutEvent(QFocusEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusOutEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusOutEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QFOCUSEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyModalDialogWrapper::heightForWidth(int arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "heightForWidth")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::heightForWidth(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(i)", - arg__1 - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.heightForWidth", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::hideEvent(QHideEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "hideEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::hideEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QHIDEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::inputMethodEvent(QInputMethodEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "inputMethodEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::inputMethodEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QINPUTMETHODEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QVariant PyModalDialogWrapper::inputMethodQuery(Qt::InputMethodQuery arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QVariant(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "inputMethodQuery")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::inputMethodQuery(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkPySide_QtCoreTypes[SBK_QT_INPUTMETHODQUERY_IDX]), &arg__1) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QVariant(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.inputMethodQuery", "QVariant", pyResult->ob_type->tp_name); - return ::QVariant(); - } - ::QVariant cppResult = ::QVariant(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::keyPressEvent(QKeyEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "keyPressEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::keyPressEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QKEYEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::keyReleaseEvent(QKeyEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "keyReleaseEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::keyReleaseEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QKEYEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::languageChange() -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "languageChange")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::languageChange(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::leaveEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "leaveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::leaveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyModalDialogWrapper::metric(QPaintDevice::PaintDeviceMetric arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "metric")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::metric(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkPySide_QtGuiTypes[SBK_QPAINTDEVICE_PAINTDEVICEMETRIC_IDX]), &arg__1) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.metric", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -QSize PyModalDialogWrapper::minimumSizeHint() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QSize(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "minimumSizeHint")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::minimumSizeHint(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QSize(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QSIZE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.minimumSizeHint", Shiboken::SbkType< QSize >()->tp_name, pyResult->ob_type->tp_name); - return ::QSize(); - } - ::QSize cppResult = ::QSize(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::mouseDoubleClickEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseDoubleClickEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseDoubleClickEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::mouseMoveEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseMoveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseMoveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::mousePressEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mousePressEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mousePressEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::mouseReleaseEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseReleaseEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseReleaseEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::moveEvent(QMoveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "moveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::moveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QPaintEngine * PyModalDialogWrapper::paintEngine() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((::QPaintEngine*)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "paintEngine")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::paintEngine(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((::QPaintEngine*)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QPAINTENGINE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.paintEngine", Shiboken::SbkType< QPaintEngine >()->tp_name, pyResult->ob_type->tp_name); - return ((::QPaintEngine*)0); - } - ::QPaintEngine* cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::paintEvent(QPaintEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "paintEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::paintEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QPAINTEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::reject() -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "reject")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::reject(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::resizeEvent(QResizeEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "resizeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::resizeEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QRESIZEEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::setVisible(bool visible) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "setVisible")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::setVisible(visible); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &visible) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyModalDialogWrapper::showEvent(QShowEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "showEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::showEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QSHOWEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QSize PyModalDialogWrapper::sizeHint() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QSize(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "sizeHint")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QDialog::sizeHint(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QSize(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QSIZE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyModalDialog.sizeHint", Shiboken::SbkType< QSize >()->tp_name, pyResult->ob_type->tp_name); - return ::QSize(); - } - ::QSize cppResult = ::QSize(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyModalDialogWrapper::tabletEvent(QTabletEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "tabletEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::tabletEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QTABLETEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::timerEvent(QTimerEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "timerEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::timerEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QTIMEREVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyModalDialogWrapper::wheelEvent(QWheelEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "wheelEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::wheelEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWHEELEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -const QMetaObject* PyModalDialogWrapper::metaObject() const -{ - #if QT_VERSION >= 0x040700 - if (QObject::d_ptr->metaObject) return QObject::d_ptr->metaObject; - #endif - SbkObject* pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this); - if (pySelf == NULL) - return PyModalDialog::metaObject(); - return PySide::SignalManager::retriveMetaObject(reinterpret_cast(pySelf)); -} - -int PyModalDialogWrapper::qt_metacall(QMetaObject::Call call, int id, void** args) -{ - int result = PyModalDialog::qt_metacall(call, id, args); - return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args); -} - -void* PyModalDialogWrapper::qt_metacast(const char* _clname) -{ - if (!_clname) return 0; - SbkObject* pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this); - if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname)) - return static_cast(const_cast< PyModalDialogWrapper* >(this)); - return PyModalDialog::qt_metacast(_clname); -} - -PyModalDialogWrapper::~PyModalDialogWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_PyModalDialogFunc_addWidget(PyObject* self, PyObject* pyArg) -{ - PyModalDialogWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyModalDialogWrapper*)((::PyModalDialog*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addWidget(QWidget*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], (pyArg)))) { - overloadId = 0; // addWidget(QWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyModalDialogFunc_addWidget_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::QWidget* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addWidget(QWidget*) - cppSelf->addWidget(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyModalDialogFunc_addWidget_TypeError: - const char* overloads[] = {"PySide.QtGui.QWidget", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyModalDialog.addWidget", overloads); - return 0; -} - -static PyObject* Sbk_PyModalDialogFunc_getParam(PyObject* self, PyObject* pyArg) -{ - PyModalDialogWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyModalDialogWrapper*)((::PyModalDialog*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyModalDialogFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyModalDialogFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyModalDialog.getParam", overloads); - return 0; -} - -static PyObject* Sbk_PyModalDialogFunc_insertWidget(PyObject* self, PyObject* args) -{ - PyModalDialogWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyModalDialogWrapper*)((::PyModalDialog*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "insertWidget", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: insertWidget(int,QWidget*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], (pyArgs[1])))) { - overloadId = 0; // insertWidget(int,QWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyModalDialogFunc_insertWidget_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::QWidget* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // insertWidget(int,QWidget*) - cppSelf->insertWidget(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyModalDialogFunc_insertWidget_TypeError: - const char* overloads[] = {"int, PySide.QtGui.QWidget", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyModalDialog.insertWidget", overloads); - return 0; -} - -static PyObject* Sbk_PyModalDialogFunc_setParamChangedCallback(PyObject* self, PyObject* pyArg) -{ - PyModalDialogWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyModalDialogWrapper*)((::PyModalDialog*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setParamChangedCallback(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setParamChangedCallback(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyModalDialogFunc_setParamChangedCallback_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setParamChangedCallback(QString) - cppSelf->setParamChangedCallback(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyModalDialogFunc_setParamChangedCallback_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyModalDialog.setParamChangedCallback", overloads); - return 0; -} - -static PyMethodDef Sbk_PyModalDialog_methods[] = { - {"addWidget", (PyCFunction)Sbk_PyModalDialogFunc_addWidget, METH_O}, - {"getParam", (PyCFunction)Sbk_PyModalDialogFunc_getParam, METH_O}, - {"insertWidget", (PyCFunction)Sbk_PyModalDialogFunc_insertWidget, METH_VARARGS}, - {"setParamChangedCallback", (PyCFunction)Sbk_PyModalDialogFunc_setParamChangedCallback, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyModalDialog_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyModalDialog_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -static int mi_offsets[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -int* -Sbk_PyModalDialog_mi_init(const void* cptr) -{ - if (mi_offsets[0] == -1) { - std::set offsets; - std::set::iterator it; - const PyModalDialog* class_ptr = reinterpret_cast(cptr); - size_t base = (size_t) class_ptr; - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((PyModalDialog*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((PyModalDialog*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((QDialog*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((QWidget*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((QWidget*)((void*)class_ptr))) - base); - - offsets.erase(0); - - int i = 0; - for (it = offsets.begin(); it != offsets.end(); it++) { - mi_offsets[i] = *it; - i++; - } - } - return mi_offsets; -} -static void* Sbk_PyModalDialogSpecialCastFunction(void* obj, SbkObjectType* desiredType) -{ - PyModalDialog* me = reinterpret_cast< ::PyModalDialog*>(obj); - if (desiredType == reinterpret_cast(SbkPySide_QtGuiTypes[SBK_QDIALOG_IDX])) - return static_cast< ::QDialog*>(me); - else if (desiredType == reinterpret_cast(SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX])) - return static_cast< ::QWidget*>(me); - else if (desiredType == reinterpret_cast(SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX])) - return static_cast< ::QObject*>(me); - else if (desiredType == reinterpret_cast(SbkPySide_QtGuiTypes[SBK_QPAINTDEVICE_IDX])) - return static_cast< ::QPaintDevice*>(me); - else if (desiredType == reinterpret_cast(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX])) - return static_cast< ::UserParamHolder*>(me); - return me; -} - - -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyModalDialog_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.PyModalDialog", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyModalDialog_traverse, - /*tp_clear*/ Sbk_PyModalDialog_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyModalDialog_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_PyModalDialog_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::QObject >())) - return dynamic_cast< ::PyModalDialog*>(reinterpret_cast< ::QObject*>(cptr)); - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::QPaintDevice >())) - return dynamic_cast< ::PyModalDialog*>(reinterpret_cast< ::QPaintDevice*>(cptr)); - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::UserParamHolder >())) - return dynamic_cast< ::PyModalDialog*>(reinterpret_cast< ::UserParamHolder*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyModalDialog_PythonToCpp_PyModalDialog_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyModalDialog_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyModalDialog_PythonToCpp_PyModalDialog_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyModalDialog_Type)) - return PyModalDialog_PythonToCpp_PyModalDialog_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyModalDialog_PTR_CppToPython_PyModalDialog(const void* cppIn) { - return PySide::getWrapperForQObject((::PyModalDialog*)cppIn, &Sbk_PyModalDialog_Type); - -} - -void init_PyModalDialog(PyObject* module) -{ - SbkNatronGuiTypes[SBK_PYMODALDIALOG_IDX] = reinterpret_cast(&Sbk_PyModalDialog_Type); - - PyObject* Sbk_PyModalDialog_Type_bases = PyTuple_Pack(2, - (PyObject*)SbkPySide_QtGuiTypes[SBK_QDIALOG_IDX], - (PyObject*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX]); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyModalDialog", "PyModalDialog*", - &Sbk_PyModalDialog_Type, &Shiboken::callCppDestructor< ::PyModalDialog >, (SbkObjectType*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], Sbk_PyModalDialog_Type_bases)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyModalDialog_Type, - PyModalDialog_PythonToCpp_PyModalDialog_PTR, - is_PyModalDialog_PythonToCpp_PyModalDialog_PTR_Convertible, - PyModalDialog_PTR_CppToPython_PyModalDialog); - - Shiboken::Conversions::registerConverterName(converter, "PyModalDialog"); - Shiboken::Conversions::registerConverterName(converter, "PyModalDialog*"); - Shiboken::Conversions::registerConverterName(converter, "PyModalDialog&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyModalDialog).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyModalDialogWrapper).name()); - - - MultipleInheritanceInitFunction func = Sbk_PyModalDialog_mi_init; - Shiboken::ObjectType::setMultipleIheritanceFunction(&Sbk_PyModalDialog_Type, func); - Shiboken::ObjectType::setCastFunction(&Sbk_PyModalDialog_Type, &Sbk_PyModalDialogSpecialCastFunction); - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_PyModalDialog_Type, &Sbk_PyModalDialog_typeDiscovery); - - - PyModalDialogWrapper::pysideInitQtMetaTypes(); - Shiboken::ObjectType::setSubTypeInitHook(&Sbk_PyModalDialog_Type, &PySide::initQObjectSubType); - PySide::initDynamicMetaObject(&Sbk_PyModalDialog_Type, &::PyModalDialog::staticMetaObject, sizeof(::PyModalDialog)); -} diff --git a/Gui/Qt4/NatronGui/pymodaldialog_wrapper.h b/Gui/Qt4/NatronGui/pymodaldialog_wrapper.h deleted file mode 100644 index 7494c867c8..0000000000 --- a/Gui/Qt4/NatronGui/pymodaldialog_wrapper.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifndef SBK_PYMODALDIALOGWRAPPER_H -#define SBK_PYMODALDIALOGWRAPPER_H - -#include - -#include - -namespace PySide { class DynamicQMetaObject; } - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PyModalDialogWrapper : public PyModalDialog -{ -public: - virtual void accept(); - inline void actionEvent_protected(QActionEvent * event) { PyModalDialog::actionEvent(event); } - virtual void actionEvent(QActionEvent * event); - inline void adjustPosition_protected(QWidget * arg__1) { PyModalDialog::adjustPosition(arg__1); } - inline void changeEvent_protected(QEvent * event) { PyModalDialog::changeEvent(event); } - virtual void changeEvent(QEvent * event); - inline void childEvent_protected(QChildEvent * arg__1) { PyModalDialog::childEvent(arg__1); } - virtual void childEvent(QChildEvent * arg__1); - inline void closeEvent_protected(QCloseEvent * arg__1) { PyModalDialog::closeEvent(arg__1); } - virtual void closeEvent(QCloseEvent * arg__1); - inline void connectNotify_protected(const char * signal) { PyModalDialog::connectNotify(signal); } - virtual void connectNotify(const char * signal); - inline void contextMenuEvent_protected(QContextMenuEvent * arg__1) { PyModalDialog::contextMenuEvent(arg__1); } - virtual void contextMenuEvent(QContextMenuEvent * arg__1); - inline void customEvent_protected(QEvent * arg__1) { PyModalDialog::customEvent(arg__1); } - virtual void customEvent(QEvent * arg__1); - inline void destroy_protected(bool destroyWindow = true, bool destroySubWindows = true) { PyModalDialog::destroy(destroyWindow, destroySubWindows); } - virtual int devType() const; - inline void disconnectNotify_protected(const char * signal) { PyModalDialog::disconnectNotify(signal); } - virtual void disconnectNotify(const char * signal); - virtual void done(int arg__1); - inline void dragEnterEvent_protected(QDragEnterEvent * event) { PyModalDialog::dragEnterEvent(event); } - virtual void dragEnterEvent(QDragEnterEvent * event); - inline void dragLeaveEvent_protected(QDragLeaveEvent * event) { PyModalDialog::dragLeaveEvent(event); } - virtual void dragLeaveEvent(QDragLeaveEvent * event); - inline void dragMoveEvent_protected(QDragMoveEvent * event) { PyModalDialog::dragMoveEvent(event); } - virtual void dragMoveEvent(QDragMoveEvent * event); - inline void dropEvent_protected(QDropEvent * event) { PyModalDialog::dropEvent(event); } - virtual void dropEvent(QDropEvent * event); - inline void enterEvent_protected(QEvent * event) { PyModalDialog::enterEvent(event); } - virtual void enterEvent(QEvent * event); - inline bool event_protected(QEvent * arg__1) { return PyModalDialog::event(arg__1); } - virtual bool event(QEvent * arg__1); - inline bool eventFilter_protected(QObject * arg__1, QEvent * arg__2) { return PyModalDialog::eventFilter(arg__1, arg__2); } - virtual bool eventFilter(QObject * arg__1, QEvent * arg__2); - inline void focusInEvent_protected(QFocusEvent * event) { PyModalDialog::focusInEvent(event); } - virtual void focusInEvent(QFocusEvent * event); - inline bool focusNextChild_protected() { return PyModalDialog::focusNextChild(); } - inline bool focusNextPrevChild_protected(bool next) { return PyModalDialog::focusNextPrevChild(next); } - virtual bool focusNextPrevChild(bool next); - inline void focusOutEvent_protected(QFocusEvent * event) { PyModalDialog::focusOutEvent(event); } - virtual void focusOutEvent(QFocusEvent * event); - inline bool focusPreviousChild_protected() { return PyModalDialog::focusPreviousChild(); } - virtual int heightForWidth(int arg__1) const; - inline void hideEvent_protected(QHideEvent * event) { PyModalDialog::hideEvent(event); } - virtual void hideEvent(QHideEvent * event); - inline void inputMethodEvent_protected(QInputMethodEvent * event) { PyModalDialog::inputMethodEvent(event); } - virtual void inputMethodEvent(QInputMethodEvent * event); - virtual QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; - inline void keyPressEvent_protected(QKeyEvent * arg__1) { PyModalDialog::keyPressEvent(arg__1); } - virtual void keyPressEvent(QKeyEvent * arg__1); - inline void keyReleaseEvent_protected(QKeyEvent * event) { PyModalDialog::keyReleaseEvent(event); } - virtual void keyReleaseEvent(QKeyEvent * event); - inline void languageChange_protected() { PyModalDialog::languageChange(); } - virtual void languageChange(); - inline void leaveEvent_protected(QEvent * event) { PyModalDialog::leaveEvent(event); } - virtual void leaveEvent(QEvent * event); - virtual const QMetaObject * metaObject() const; - inline int metric_protected(int arg__1) const { return PyModalDialog::metric(QPaintDevice::PaintDeviceMetric(arg__1)); } - virtual int metric(QPaintDevice::PaintDeviceMetric arg__1) const; - virtual QSize minimumSizeHint() const; - inline void mouseDoubleClickEvent_protected(QMouseEvent * event) { PyModalDialog::mouseDoubleClickEvent(event); } - virtual void mouseDoubleClickEvent(QMouseEvent * event); - inline void mouseMoveEvent_protected(QMouseEvent * event) { PyModalDialog::mouseMoveEvent(event); } - virtual void mouseMoveEvent(QMouseEvent * event); - inline void mousePressEvent_protected(QMouseEvent * event) { PyModalDialog::mousePressEvent(event); } - virtual void mousePressEvent(QMouseEvent * event); - inline void mouseReleaseEvent_protected(QMouseEvent * event) { PyModalDialog::mouseReleaseEvent(event); } - virtual void mouseReleaseEvent(QMouseEvent * event); - inline void moveEvent_protected(QMoveEvent * event) { PyModalDialog::moveEvent(event); } - virtual void moveEvent(QMoveEvent * event); - virtual QPaintEngine * paintEngine() const; - inline void paintEvent_protected(QPaintEvent * event) { PyModalDialog::paintEvent(event); } - virtual void paintEvent(QPaintEvent * event); - virtual void reject(); - inline void resetInputContext_protected() { PyModalDialog::resetInputContext(); } - inline void resizeEvent_protected(QResizeEvent * arg__1) { PyModalDialog::resizeEvent(arg__1); } - virtual void resizeEvent(QResizeEvent * arg__1); - virtual void setVisible(bool visible); - inline void showEvent_protected(QShowEvent * arg__1) { PyModalDialog::showEvent(arg__1); } - virtual void showEvent(QShowEvent * arg__1); - virtual QSize sizeHint() const; - inline void tabletEvent_protected(QTabletEvent * event) { PyModalDialog::tabletEvent(event); } - virtual void tabletEvent(QTabletEvent * event); - inline void timerEvent_protected(QTimerEvent * arg__1) { PyModalDialog::timerEvent(arg__1); } - virtual void timerEvent(QTimerEvent * arg__1); - inline void updateMicroFocus_protected() { PyModalDialog::updateMicroFocus(); } - inline void wheelEvent_protected(QWheelEvent * event) { PyModalDialog::wheelEvent(event); } - virtual void wheelEvent(QWheelEvent * event); - virtual ~PyModalDialogWrapper(); -public: - virtual int qt_metacall(QMetaObject::Call call, int id, void** args); - virtual void* qt_metacast(const char* _clname); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PYMODALDIALOGWRAPPER_H - diff --git a/Gui/Qt4/NatronGui/pypanel_wrapper.cpp b/Gui/Qt4/NatronGui/pypanel_wrapper.cpp deleted file mode 100644 index a58442189a..0000000000 --- a/Gui/Qt4/NatronGui/pypanel_wrapper.cpp +++ /dev/null @@ -1,2023 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include -CLANG_DIAG_OFF(header-guard) -#include // has wrong header guards in pyside 1.2.2 -#include -#include "natrongui_python.h" - -#include "pypanel_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Native --------------------------------------------------------- - -void PyPanelWrapper::pysideInitQtMetaTypes() -{ -} - -PyPanelWrapper::PyPanelWrapper(const QString & scriptName, const QString & label, bool useUserParameters, GuiApp * app) : PyPanel(scriptName, label, useUserParameters, app) { - // ... middle -} - -void PyPanelWrapper::actionEvent(QActionEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "actionEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::actionEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QACTIONEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::changeEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "changeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::changeEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::childEvent(QChildEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "childEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::childEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QCHILDEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::closeEvent(QCloseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "closeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::closeEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QCLOSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::connectNotify(const char * signal) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "connectNotify")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::connectNotify(signal); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), signal) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyPanelWrapper::contextMenuEvent(QContextMenuEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "contextMenuEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::contextMenuEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QCONTEXTMENUEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::customEvent(QEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "customEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::customEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyPanelWrapper::devType() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "devType")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::devType(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.devType", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::disconnectNotify(const char * signal) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "disconnectNotify")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::disconnectNotify(signal); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), signal) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyPanelWrapper::dragEnterEvent(QDragEnterEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragEnterEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragEnterEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGENTEREVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::dragLeaveEvent(QDragLeaveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragLeaveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragLeaveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGLEAVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::dragMoveEvent(QDragMoveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dragMoveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dragMoveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDRAGMOVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::dropEvent(QDropEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "dropEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::dropEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QDROPEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::enterEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "enterEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::enterEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -bool PyPanelWrapper::event(QEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "event")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::event(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.event", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); - return cppResult; -} - -bool PyPanelWrapper::eventFilter(QObject * arg__1, QEvent * arg__2) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "eventFilter")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::eventFilter(arg__1, arg__2); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(NN)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX], arg__1), - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], arg__2) - )); - bool invalidateArg2 = PyTuple_GET_ITEM(pyArgs, 1)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.eventFilter", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - if (invalidateArg2) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 1)); - return cppResult; -} - -void PyPanelWrapper::focusInEvent(QFocusEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusInEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusInEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QFOCUSEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -bool PyPanelWrapper::focusNextPrevChild(bool next) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((bool)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusNextPrevChild")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusNextPrevChild(next); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &next) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((bool)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.focusNextPrevChild", "bool", pyResult->ob_type->tp_name); - return ((bool)0); - } - bool cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::focusOutEvent(QFocusEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "focusOutEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::focusOutEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QFOCUSEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyPanelWrapper::heightForWidth(int arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "heightForWidth")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::heightForWidth(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(i)", - arg__1 - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.heightForWidth", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::hideEvent(QHideEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "hideEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::hideEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QHIDEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::inputMethodEvent(QInputMethodEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "inputMethodEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::inputMethodEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QINPUTMETHODEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QVariant PyPanelWrapper::inputMethodQuery(Qt::InputMethodQuery arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QVariant(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "inputMethodQuery")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::inputMethodQuery(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkPySide_QtCoreTypes[SBK_QT_INPUTMETHODQUERY_IDX]), &arg__1) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QVariant(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QVARIANT_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.inputMethodQuery", "QVariant", pyResult->ob_type->tp_name); - return ::QVariant(); - } - ::QVariant cppResult = ::QVariant(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::keyPressEvent(QKeyEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "keyPressEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::keyPressEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QKEYEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::keyReleaseEvent(QKeyEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "keyReleaseEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::keyReleaseEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QKEYEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::languageChange() -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "languageChange")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::languageChange(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyPanelWrapper::leaveEvent(QEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "leaveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::leaveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -int PyPanelWrapper::metric(QPaintDevice::PaintDeviceMetric arg__1) const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((int)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "metric")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::metric(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkPySide_QtGuiTypes[SBK_QPAINTDEVICE_PAINTDEVICEMETRIC_IDX]), &arg__1) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((int)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.metric", "int", pyResult->ob_type->tp_name); - return ((int)0); - } - int cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -QSize PyPanelWrapper::minimumSizeHint() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QSize(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "minimumSizeHint")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::minimumSizeHint(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QSize(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QSIZE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.minimumSizeHint", Shiboken::SbkType< QSize >()->tp_name, pyResult->ob_type->tp_name); - return ::QSize(); - } - ::QSize cppResult = ::QSize(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::mouseDoubleClickEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseDoubleClickEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseDoubleClickEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::mouseMoveEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseMoveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseMoveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::mousePressEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mousePressEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mousePressEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::mouseReleaseEvent(QMouseEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "mouseReleaseEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::mouseReleaseEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOUSEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::moveEvent(QMoveEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "moveEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::moveEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QMOVEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QPaintEngine * PyPanelWrapper::paintEngine() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ((::QPaintEngine*)0); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "paintEngine")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::paintEngine(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ((::QPaintEngine*)0); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QPAINTENGINE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.paintEngine", Shiboken::SbkType< QPaintEngine >()->tp_name, pyResult->ob_type->tp_name); - return ((::QPaintEngine*)0); - } - ::QPaintEngine* cppResult; - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::paintEvent(QPaintEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "paintEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::paintEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QPAINTEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::resizeEvent(QResizeEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "resizeEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::resizeEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QRESIZEEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::restore(const QString & arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "restore")); - if (pyOverride.isNull()) { - gil.release(); - return this->::PyPanel::restore(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &arg__1) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -QString PyPanelWrapper::save() -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QString(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "save")); - if (pyOverride.isNull()) { - gil.release(); - return this->::PyPanel::save(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QString(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.save", "QString", pyResult->ob_type->tp_name); - return ::QString(); - } - ::QString cppResult = ::QString(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::setVisible(bool visible) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "setVisible")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::setVisible(visible); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &visible) - )); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } -} - -void PyPanelWrapper::showEvent(QShowEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "showEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::showEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QSHOWEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -QSize PyPanelWrapper::sizeHint() const -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ::QSize(); - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "sizeHint")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::sizeHint(); - } - - Shiboken::AutoDecRef pyArgs(PyTuple_New(0)); - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ::QSize(); - } - // Check return type - PythonToCppFunc pythonToCpp = Shiboken::Conversions::isPythonToCppValueConvertible((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QSIZE_IDX], pyResult); - if (!pythonToCpp) { - Shiboken::warning(PyExc_RuntimeWarning, 2, "Invalid return value in function %s, expected %s, got %s.", "PyPanel.sizeHint", Shiboken::SbkType< QSize >()->tp_name, pyResult->ob_type->tp_name); - return ::QSize(); - } - ::QSize cppResult = ::QSize(); - pythonToCpp(pyResult, &cppResult); - return cppResult; -} - -void PyPanelWrapper::tabletEvent(QTabletEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "tabletEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::tabletEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QTABLETEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::timerEvent(QTimerEvent * arg__1) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "timerEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QObject::timerEvent(arg__1); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtCoreTypes[SBK_QTIMEREVENT_IDX], arg__1) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -void PyPanelWrapper::wheelEvent(QWheelEvent * event) -{ - Shiboken::GilState gil; - if (PyErr_Occurred()) - return ; - Shiboken::AutoDecRef pyOverride(Shiboken::BindingManager::instance().getOverride(this, "wheelEvent")); - if (pyOverride.isNull()) { - gil.release(); - return this->::QWidget::wheelEvent(event); - } - - Shiboken::AutoDecRef pyArgs(Py_BuildValue("(N)", - Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWHEELEVENT_IDX], event) - )); - bool invalidateArg1 = PyTuple_GET_ITEM(pyArgs, 0)->ob_refcnt == 1; - - Shiboken::AutoDecRef pyResult(PyObject_Call(pyOverride, pyArgs, NULL)); - // An error happened in python code! - if (pyResult.isNull()) { - PyErr_Print(); - return ; - } - if (invalidateArg1) - Shiboken::Object::invalidate(PyTuple_GET_ITEM(pyArgs, 0)); -} - -const QMetaObject* PyPanelWrapper::metaObject() const -{ - #if QT_VERSION >= 0x040700 - if (QObject::d_ptr->metaObject) return QObject::d_ptr->metaObject; - #endif - SbkObject* pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this); - if (pySelf == NULL) - return PyPanel::metaObject(); - return PySide::SignalManager::retriveMetaObject(reinterpret_cast(pySelf)); -} - -int PyPanelWrapper::qt_metacall(QMetaObject::Call call, int id, void** args) -{ - int result = PyPanel::qt_metacall(call, id, args); - return result < 0 ? result : PySide::SignalManager::qt_metacall(this, call, id, args); -} - -void* PyPanelWrapper::qt_metacast(const char* _clname) -{ - if (!_clname) return 0; - SbkObject* pySelf = Shiboken::BindingManager::instance().retrieveWrapper(this); - if (pySelf && PySide::inherits(Py_TYPE(pySelf), _clname)) - return static_cast(const_cast< PyPanelWrapper* >(this)); - return PyPanel::qt_metacast(_clname); -} - -PyPanelWrapper::~PyPanelWrapper() -{ - SbkObject* wrapper = Shiboken::BindingManager::instance().retrieveWrapper(this); - Shiboken::Object::destroy(wrapper, this); -} - -// Target --------------------------------------------------------- - -extern "C" { -static int -Sbk_PyPanel_Init(PyObject* self, PyObject* args, PyObject* kwds) -{ - const char** argNames = 0; - const QMetaObject* metaObject; - SbkObject* sbkSelf = reinterpret_cast(self); - SbkObjectType* type = reinterpret_cast(self->ob_type); - SbkObjectType* myType = reinterpret_cast(SbkNatronGuiTypes[SBK_PYPANEL_IDX]); - if (type != myType) { - Shiboken::ObjectType::copyMultimpleheritance(type, myType); - } - - if (Shiboken::Object::isUserType(self) && !Shiboken::ObjectType::canCallConstructor(self->ob_type, Shiboken::SbkType< ::PyPanel >())) - return -1; - - ::PyPanelWrapper* cptr = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0, 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0, 0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "PyPanel", 4, 4, &(pyArgs[0]), &(pyArgs[1]), &(pyArgs[2]), &(pyArgs[3]))) - return -1; - - - // Overloaded function decisor - // 0: PyPanel(QString,QString,bool,GuiApp*) - if (numArgs == 4 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArgs[1]))) - && (pythonToCpp[2] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[2]))) - && (pythonToCpp[3] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_GUIAPP_IDX], (pyArgs[3])))) { - overloadId = 0; // PyPanel(QString,QString,bool,GuiApp*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanel_Init_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp[0](pyArgs[0], &cppArg0); - ::QString cppArg1 = ::QString(); - pythonToCpp[1](pyArgs[1], &cppArg1); - bool cppArg2; - pythonToCpp[2](pyArgs[2], &cppArg2); - if (!Shiboken::Object::isValid(pyArgs[3])) - return -1; - ::GuiApp* cppArg3; - pythonToCpp[3](pyArgs[3], &cppArg3); - - if (!PyErr_Occurred()) { - // PyPanel(QString,QString,bool,GuiApp*) - void* addr = PySide::nextQObjectMemoryAddr(); - if (addr) { - cptr = new (addr) ::PyPanelWrapper(cppArg0, cppArg1, cppArg2, cppArg3); - PySide::setNextQObjectMemoryAddr(0); - } else { - cptr = new ::PyPanelWrapper(cppArg0, cppArg1, cppArg2, cppArg3); - } - - } - } - - if (PyErr_Occurred() || !Shiboken::Object::setCppPointer(sbkSelf, Shiboken::SbkType< ::PyPanel >(), cptr)) { - delete cptr; - return -1; - } - if (!cptr) goto Sbk_PyPanel_Init_TypeError; - - Shiboken::Object::setValidCpp(sbkSelf, true); - Shiboken::Object::setHasCppWrapper(sbkSelf, true); - Shiboken::BindingManager::instance().registerWrapper(sbkSelf, cptr); - - // QObject setup - PySide::Signal::updateSourceObject(self); - metaObject = cptr->metaObject(); // <- init python qt properties - if (kwds && !PySide::fillQtProperties(self, metaObject, kwds, argNames, 0)) - return -1; - - - return 1; - - Sbk_PyPanel_Init_TypeError: - const char* overloads[] = {"unicode, unicode, bool, NatronGui.GuiApp", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyPanel", overloads); - return -1; -} - -static PyObject* Sbk_PyPanelFunc_addWidget(PyObject* self, PyObject* pyArg) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: addWidget(QWidget*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], (pyArg)))) { - overloadId = 0; // addWidget(QWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_addWidget_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::QWidget* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // addWidget(QWidget*) - cppSelf->addWidget(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyPanelFunc_addWidget_TypeError: - const char* overloads[] = {"PySide.QtGui.QWidget", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyPanel.addWidget", overloads); - return 0; -} - -static PyObject* Sbk_PyPanelFunc_getPanelLabel(PyObject* self) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPanelLabel()const - QString cppResult = const_cast(cppSelf)->getPanelLabel(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyPanelFunc_getPanelScriptName(PyObject* self) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPanelScriptName()const - QString cppResult = const_cast(cppSelf)->getPanelScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyPanelFunc_getParam(PyObject* self, PyObject* pyArg) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getParam(QString)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // getParam(QString)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_getParam_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getParam(QString)const - Param * cppResult = const_cast(cppSelf)->getParam(cppArg0); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyPanelFunc_getParam_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyPanel.getParam", overloads); - return 0; -} - -static PyObject* Sbk_PyPanelFunc_getParams(PyObject* self) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getParams()const - // Begin code injection - - std::list params = cppSelf->getParams(); - PyObject* ret = PyList_New((int) params.size()); - int idx = 0; - for (std::list::iterator it = params.begin(); it!=params.end(); ++it,++idx) { - PyObject* item = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronEngineTypes[SBK_PARAM_IDX], *it); - // Ownership transferences. - Shiboken::Object::getOwnership(item); - PyList_SET_ITEM(ret, idx, item); - } - return ret; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyPanelFunc_insertWidget(PyObject* self, PyObject* args) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "insertWidget", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: insertWidget(int,QWidget*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], (pyArgs[1])))) { - overloadId = 0; // insertWidget(int,QWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_insertWidget_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::QWidget* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // insertWidget(int,QWidget*) - cppSelf->insertWidget(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyPanelFunc_insertWidget_TypeError: - const char* overloads[] = {"int, PySide.QtGui.QWidget", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyPanel.insertWidget", overloads); - return 0; -} - -static PyObject* Sbk_PyPanelFunc_onUserDataChanged(PyObject* self) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // onUserDataChanged() - ((::PyPanelWrapper*) cppSelf)->PyPanelWrapper::onUserDataChanged_protected(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyPanelFunc_restore(PyObject* self, PyObject* pyArg) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: restore(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // restore(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_restore_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // restore(QString) - Shiboken::Object::hasCppWrapper(reinterpret_cast(self)) ? cppSelf->::PyPanel::restore(cppArg0) : cppSelf->restore(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyPanelFunc_restore_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyPanel.restore", overloads); - return 0; -} - -static PyObject* Sbk_PyPanelFunc_save(PyObject* self) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // save() - QString cppResult = ((::PyPanelWrapper*) cppSelf)->PyPanelWrapper::save_protected(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyPanelFunc_setPanelLabel(PyObject* self, PyObject* pyArg) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setPanelLabel(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setPanelLabel(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_setPanelLabel_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setPanelLabel(QString) - cppSelf->setPanelLabel(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyPanelFunc_setPanelLabel_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyPanel.setPanelLabel", overloads); - return 0; -} - -static PyObject* Sbk_PyPanelFunc_setParamChangedCallback(PyObject* self, PyObject* pyArg) -{ - PyPanelWrapper* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = (PyPanelWrapper*)((::PyPanel*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYPANEL_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setParamChangedCallback(QString) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], (pyArg)))) { - overloadId = 0; // setParamChangedCallback(QString) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyPanelFunc_setParamChangedCallback_TypeError; - - // Call function/method - { - ::QString cppArg0 = ::QString(); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setParamChangedCallback(QString) - cppSelf->setParamChangedCallback(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyPanelFunc_setParamChangedCallback_TypeError: - const char* overloads[] = {"unicode", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyPanel.setParamChangedCallback", overloads); - return 0; -} - -static PyMethodDef Sbk_PyPanel_methods[] = { - {"addWidget", (PyCFunction)Sbk_PyPanelFunc_addWidget, METH_O}, - {"getPanelLabel", (PyCFunction)Sbk_PyPanelFunc_getPanelLabel, METH_NOARGS}, - {"getPanelScriptName", (PyCFunction)Sbk_PyPanelFunc_getPanelScriptName, METH_NOARGS}, - {"getParam", (PyCFunction)Sbk_PyPanelFunc_getParam, METH_O}, - {"getParams", (PyCFunction)Sbk_PyPanelFunc_getParams, METH_NOARGS}, - {"insertWidget", (PyCFunction)Sbk_PyPanelFunc_insertWidget, METH_VARARGS}, - {"onUserDataChanged", (PyCFunction)Sbk_PyPanelFunc_onUserDataChanged, METH_NOARGS}, - {"restore", (PyCFunction)Sbk_PyPanelFunc_restore, METH_O}, - {"save", (PyCFunction)Sbk_PyPanelFunc_save, METH_NOARGS}, - {"setPanelLabel", (PyCFunction)Sbk_PyPanelFunc_setPanelLabel, METH_O}, - {"setParamChangedCallback", (PyCFunction)Sbk_PyPanelFunc_setParamChangedCallback, METH_O}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyPanel_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyPanel_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -static int mi_offsets[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; -int* -Sbk_PyPanel_mi_init(const void* cptr) -{ - if (mi_offsets[0] == -1) { - std::set offsets; - std::set::iterator it; - const PyPanel* class_ptr = reinterpret_cast(cptr); - size_t base = (size_t) class_ptr; - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((PyPanel*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((PyPanel*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((QWidget*)((void*)class_ptr))) - base); - offsets.insert(((size_t) static_cast(class_ptr)) - base); - offsets.insert(((size_t) static_cast((QWidget*)((void*)class_ptr))) - base); - - offsets.erase(0); - - int i = 0; - for (it = offsets.begin(); it != offsets.end(); it++) { - mi_offsets[i] = *it; - i++; - } - } - return mi_offsets; -} -static void* Sbk_PyPanelSpecialCastFunction(void* obj, SbkObjectType* desiredType) -{ - PyPanel* me = reinterpret_cast< ::PyPanel*>(obj); - if (desiredType == reinterpret_cast(SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX])) - return static_cast< ::QWidget*>(me); - else if (desiredType == reinterpret_cast(SbkPySide_QtCoreTypes[SBK_QOBJECT_IDX])) - return static_cast< ::QObject*>(me); - else if (desiredType == reinterpret_cast(SbkPySide_QtGuiTypes[SBK_QPAINTDEVICE_IDX])) - return static_cast< ::QPaintDevice*>(me); - else if (desiredType == reinterpret_cast(SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX])) - return static_cast< ::UserParamHolder*>(me); - return me; -} - - -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyPanel_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.PyPanel", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyPanel_traverse, - /*tp_clear*/ Sbk_PyPanel_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyPanel_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ 0, - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ Sbk_PyPanel_Init, - /*tp_alloc*/ 0, - /*tp_new*/ SbkObjectTpNew, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - -static void* Sbk_PyPanel_typeDiscovery(void* cptr, SbkObjectType* instanceType) -{ - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::QObject >())) - return dynamic_cast< ::PyPanel*>(reinterpret_cast< ::QObject*>(cptr)); - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::QPaintDevice >())) - return dynamic_cast< ::PyPanel*>(reinterpret_cast< ::QPaintDevice*>(cptr)); - if (instanceType == reinterpret_cast(Shiboken::SbkType< ::UserParamHolder >())) - return dynamic_cast< ::PyPanel*>(reinterpret_cast< ::UserParamHolder*>(cptr)); - return 0; -} - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyPanel_PythonToCpp_PyPanel_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyPanel_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyPanel_PythonToCpp_PyPanel_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyPanel_Type)) - return PyPanel_PythonToCpp_PyPanel_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyPanel_PTR_CppToPython_PyPanel(const void* cppIn) { - return PySide::getWrapperForQObject((::PyPanel*)cppIn, &Sbk_PyPanel_Type); - -} - -void init_PyPanel(PyObject* module) -{ - SbkNatronGuiTypes[SBK_PYPANEL_IDX] = reinterpret_cast(&Sbk_PyPanel_Type); - - PyObject* Sbk_PyPanel_Type_bases = PyTuple_Pack(2, - (PyObject*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], - (PyObject*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX]); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyPanel", "PyPanel*", - &Sbk_PyPanel_Type, &Shiboken::callCppDestructor< ::PyPanel >, (SbkObjectType*)SbkNatronEngineTypes[SBK_USERPARAMHOLDER_IDX], Sbk_PyPanel_Type_bases)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyPanel_Type, - PyPanel_PythonToCpp_PyPanel_PTR, - is_PyPanel_PythonToCpp_PyPanel_PTR_Convertible, - PyPanel_PTR_CppToPython_PyPanel); - - Shiboken::Conversions::registerConverterName(converter, "PyPanel"); - Shiboken::Conversions::registerConverterName(converter, "PyPanel*"); - Shiboken::Conversions::registerConverterName(converter, "PyPanel&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyPanel).name()); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyPanelWrapper).name()); - - - MultipleInheritanceInitFunction func = Sbk_PyPanel_mi_init; - Shiboken::ObjectType::setMultipleIheritanceFunction(&Sbk_PyPanel_Type, func); - Shiboken::ObjectType::setCastFunction(&Sbk_PyPanel_Type, &Sbk_PyPanelSpecialCastFunction); - Shiboken::ObjectType::setTypeDiscoveryFunctionV2(&Sbk_PyPanel_Type, &Sbk_PyPanel_typeDiscovery); - - - PyPanelWrapper::pysideInitQtMetaTypes(); - Shiboken::ObjectType::setSubTypeInitHook(&Sbk_PyPanel_Type, &PySide::initQObjectSubType); - PySide::initDynamicMetaObject(&Sbk_PyPanel_Type, &::PyPanel::staticMetaObject, sizeof(::PyPanel)); -} diff --git a/Gui/Qt4/NatronGui/pypanel_wrapper.h b/Gui/Qt4/NatronGui/pypanel_wrapper.h deleted file mode 100644 index 105688de15..0000000000 --- a/Gui/Qt4/NatronGui/pypanel_wrapper.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef SBK_PYPANELWRAPPER_H -#define SBK_PYPANELWRAPPER_H - -#include - -#include - -namespace PySide { class DynamicQMetaObject; } - -NATRON_NAMESPACE_ENTER NATRON_PYTHON_NAMESPACE_ENTER -class PyPanelWrapper : public PyPanel -{ -public: - PyPanelWrapper(const QString & scriptName, const QString & label, bool useUserParameters, GuiApp * app); - inline void actionEvent_protected(QActionEvent * event) { PyPanel::actionEvent(event); } - virtual void actionEvent(QActionEvent * event); - inline void changeEvent_protected(QEvent * event) { PyPanel::changeEvent(event); } - virtual void changeEvent(QEvent * event); - inline void childEvent_protected(QChildEvent * arg__1) { PyPanel::childEvent(arg__1); } - virtual void childEvent(QChildEvent * arg__1); - inline void closeEvent_protected(QCloseEvent * event) { PyPanel::closeEvent(event); } - virtual void closeEvent(QCloseEvent * event); - inline void connectNotify_protected(const char * signal) { PyPanel::connectNotify(signal); } - virtual void connectNotify(const char * signal); - inline void contextMenuEvent_protected(QContextMenuEvent * event) { PyPanel::contextMenuEvent(event); } - virtual void contextMenuEvent(QContextMenuEvent * event); - inline void customEvent_protected(QEvent * arg__1) { PyPanel::customEvent(arg__1); } - virtual void customEvent(QEvent * arg__1); - inline void destroy_protected(bool destroyWindow = true, bool destroySubWindows = true) { PyPanel::destroy(destroyWindow, destroySubWindows); } - virtual int devType() const; - inline void disconnectNotify_protected(const char * signal) { PyPanel::disconnectNotify(signal); } - virtual void disconnectNotify(const char * signal); - inline void dragEnterEvent_protected(QDragEnterEvent * event) { PyPanel::dragEnterEvent(event); } - virtual void dragEnterEvent(QDragEnterEvent * event); - inline void dragLeaveEvent_protected(QDragLeaveEvent * event) { PyPanel::dragLeaveEvent(event); } - virtual void dragLeaveEvent(QDragLeaveEvent * event); - inline void dragMoveEvent_protected(QDragMoveEvent * event) { PyPanel::dragMoveEvent(event); } - virtual void dragMoveEvent(QDragMoveEvent * event); - inline void dropEvent_protected(QDropEvent * event) { PyPanel::dropEvent(event); } - virtual void dropEvent(QDropEvent * event); - inline void enterEvent_protected(QEvent * event) { PyPanel::enterEvent(event); } - virtual void enterEvent(QEvent * event); - inline bool event_protected(QEvent * arg__1) { return PyPanel::event(arg__1); } - virtual bool event(QEvent * arg__1); - virtual bool eventFilter(QObject * arg__1, QEvent * arg__2); - inline void focusInEvent_protected(QFocusEvent * event) { PyPanel::focusInEvent(event); } - virtual void focusInEvent(QFocusEvent * event); - inline bool focusNextChild_protected() { return PyPanel::focusNextChild(); } - inline bool focusNextPrevChild_protected(bool next) { return PyPanel::focusNextPrevChild(next); } - virtual bool focusNextPrevChild(bool next); - inline void focusOutEvent_protected(QFocusEvent * event) { PyPanel::focusOutEvent(event); } - virtual void focusOutEvent(QFocusEvent * event); - inline bool focusPreviousChild_protected() { return PyPanel::focusPreviousChild(); } - virtual int heightForWidth(int arg__1) const; - inline void hideEvent_protected(QHideEvent * event) { PyPanel::hideEvent(event); } - virtual void hideEvent(QHideEvent * event); - inline void inputMethodEvent_protected(QInputMethodEvent * event) { PyPanel::inputMethodEvent(event); } - virtual void inputMethodEvent(QInputMethodEvent * event); - virtual QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; - inline void keyPressEvent_protected(QKeyEvent * event) { PyPanel::keyPressEvent(event); } - virtual void keyPressEvent(QKeyEvent * event); - inline void keyReleaseEvent_protected(QKeyEvent * event) { PyPanel::keyReleaseEvent(event); } - virtual void keyReleaseEvent(QKeyEvent * event); - inline void languageChange_protected() { PyPanel::languageChange(); } - virtual void languageChange(); - inline void leaveEvent_protected(QEvent * event) { PyPanel::leaveEvent(event); } - virtual void leaveEvent(QEvent * event); - virtual const QMetaObject * metaObject() const; - inline int metric_protected(int arg__1) const { return PyPanel::metric(QPaintDevice::PaintDeviceMetric(arg__1)); } - virtual int metric(QPaintDevice::PaintDeviceMetric arg__1) const; - virtual QSize minimumSizeHint() const; - inline void mouseDoubleClickEvent_protected(QMouseEvent * event) { PyPanel::mouseDoubleClickEvent(event); } - virtual void mouseDoubleClickEvent(QMouseEvent * event); - inline void mouseMoveEvent_protected(QMouseEvent * event) { PyPanel::mouseMoveEvent(event); } - virtual void mouseMoveEvent(QMouseEvent * event); - inline void mousePressEvent_protected(QMouseEvent * event) { PyPanel::mousePressEvent(event); } - virtual void mousePressEvent(QMouseEvent * event); - inline void mouseReleaseEvent_protected(QMouseEvent * event) { PyPanel::mouseReleaseEvent(event); } - virtual void mouseReleaseEvent(QMouseEvent * event); - inline void moveEvent_protected(QMoveEvent * event) { PyPanel::moveEvent(event); } - virtual void moveEvent(QMoveEvent * event); - inline void onUserDataChanged_protected() { PyPanel::onUserDataChanged(); } - virtual QPaintEngine * paintEngine() const; - inline void paintEvent_protected(QPaintEvent * event) { PyPanel::paintEvent(event); } - virtual void paintEvent(QPaintEvent * event); - inline int receivers_protected(const char * signal) const { return PyPanel::receivers(signal); } - inline void resetInputContext_protected() { PyPanel::resetInputContext(); } - inline void resizeEvent_protected(QResizeEvent * event) { PyPanel::resizeEvent(event); } - virtual void resizeEvent(QResizeEvent * event); - virtual void restore(const QString & arg__1); - inline QString save_protected() { return PyPanel::save(); } - virtual QString save(); - inline QObject * sender_protected() const { return PyPanel::sender(); } - inline int senderSignalIndex_protected() const { return PyPanel::senderSignalIndex(); } - virtual void setVisible(bool visible); - inline void showEvent_protected(QShowEvent * event) { PyPanel::showEvent(event); } - virtual void showEvent(QShowEvent * event); - virtual QSize sizeHint() const; - inline void tabletEvent_protected(QTabletEvent * event) { PyPanel::tabletEvent(event); } - virtual void tabletEvent(QTabletEvent * event); - inline void timerEvent_protected(QTimerEvent * arg__1) { PyPanel::timerEvent(arg__1); } - virtual void timerEvent(QTimerEvent * arg__1); - inline void updateMicroFocus_protected() { PyPanel::updateMicroFocus(); } - inline void wheelEvent_protected(QWheelEvent * event) { PyPanel::wheelEvent(event); } - virtual void wheelEvent(QWheelEvent * event); - virtual ~PyPanelWrapper(); -public: - virtual int qt_metacall(QMetaObject::Call call, int id, void** args); - virtual void* qt_metacast(const char* _clname); - static void pysideInitQtMetaTypes(); -}; -NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT - -#endif // SBK_PYPANELWRAPPER_H - diff --git a/Gui/Qt4/NatronGui/pytabwidget_wrapper.cpp b/Gui/Qt4/NatronGui/pytabwidget_wrapper.cpp deleted file mode 100644 index 9387a5863e..0000000000 --- a/Gui/Qt4/NatronGui/pytabwidget_wrapper.cpp +++ /dev/null @@ -1,749 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natrongui_python.h" - -#include "pytabwidget_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING -#include -#include - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_PyTabWidgetFunc_appendTab(PyObject* self, PyObject* pyArg) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: appendTab(PyPanel*) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_PYPANEL_IDX], (pyArg)))) { - overloadId = 0; // appendTab(PyPanel*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_appendTab_TypeError; - - // Call function/method - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::PyPanel* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // appendTab(PyPanel*) - // Begin code injection - - bool cppResult = cppSelf->appendTab(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyTabWidgetFunc_appendTab_TypeError: - const char* overloads[] = {"NatronGui.PyPanel", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyTabWidget.appendTab", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_closeCurrentTab(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // closeCurrentTab() - cppSelf->closeCurrentTab(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyTabWidgetFunc_closePane(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // closePane() - cppSelf->closePane(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyTabWidgetFunc_closeTab(PyObject* self, PyObject* pyArg) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: closeTab(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // closeTab(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_closeTab_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // closeTab(int) - cppSelf->closeTab(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyTabWidgetFunc_closeTab_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyTabWidget.closeTab", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_count(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // count() - int cppResult = cppSelf->count(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyTabWidgetFunc_currentWidget(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // currentWidget() - QWidget * cppResult = cppSelf->currentWidget(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyTabWidgetFunc_floatCurrentTab(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // floatCurrentTab() - cppSelf->floatCurrentTab(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyTabWidgetFunc_floatPane(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // floatPane() - cppSelf->floatPane(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyTabWidgetFunc_getCurrentIndex(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCurrentIndex()const - int cppResult = const_cast(cppSelf)->getCurrentIndex(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyTabWidgetFunc_getScriptName(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getScriptName()const - QString cppResult = const_cast(cppSelf)->getScriptName(); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyTabWidgetFunc_getTabLabel(PyObject* self, PyObject* pyArg) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: getTabLabel(int)const - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // getTabLabel(int)const - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_getTabLabel_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // getTabLabel(int)const - QString cppResult = const_cast(cppSelf)->getTabLabel(cppArg0); - pyResult = Shiboken::Conversions::copyToPython(SbkPySide_QtCoreTypeConverters[SBK_QSTRING_IDX], &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; - - Sbk_PyTabWidgetFunc_getTabLabel_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyTabWidget.getTabLabel", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_insertTab(PyObject* self, PyObject* args) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "insertTab", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: insertTab(int,PyPanel*) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkNatronGuiTypes[SBK_PYPANEL_IDX], (pyArgs[1])))) { - overloadId = 0; // insertTab(int,PyPanel*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_insertTab_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - if (!Shiboken::Object::isValid(pyArgs[1])) - return 0; - ::PyPanel* cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // insertTab(int,PyPanel*) - // Begin code injection - - cppSelf->insertTab(cppArg0,cppArg1); - - // End of code injection - - - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyTabWidgetFunc_insertTab_TypeError: - const char* overloads[] = {"int, NatronGui.PyPanel", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyTabWidget.insertTab", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_removeTab(PyObject* self, PyObject* pyArg) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: removeTab(QWidget*) - // 1: removeTab(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 1; // removeTab(int) - } else if ((pythonToCpp = Shiboken::Conversions::isPythonToCppPointerConvertible((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], (pyArg)))) { - overloadId = 0; // removeTab(QWidget*) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_removeTab_TypeError; - - // Call function/method - switch (overloadId) { - case 0: // removeTab(QWidget * tab) - { - if (!Shiboken::Object::isValid(pyArg)) - return 0; - ::QWidget* cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // removeTab(QWidget*) - cppSelf->removeTab(cppArg0); - } - break; - } - case 1: // removeTab(int index) - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // removeTab(int) - cppSelf->removeTab(cppArg0); - } - break; - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyTabWidgetFunc_removeTab_TypeError: - const char* overloads[] = {"PySide.QtGui.QWidget", "int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyTabWidget.removeTab", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_setCurrentIndex(PyObject* self, PyObject* pyArg) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCurrentIndex(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setCurrentIndex(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyTabWidgetFunc_setCurrentIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCurrentIndex(int) - cppSelf->setCurrentIndex(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyTabWidgetFunc_setCurrentIndex_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyTabWidget.setCurrentIndex", overloads); - return 0; -} - -static PyObject* Sbk_PyTabWidgetFunc_setNextTabCurrent(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // setNextTabCurrent() - cppSelf->setNextTabCurrent(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyTabWidgetFunc_splitHorizontally(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // splitHorizontally() - PyTabWidget * cppResult = cppSelf->splitHorizontally(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyTabWidgetFunc_splitVertically(PyObject* self) -{ - ::PyTabWidget* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyTabWidget*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // splitVertically() - PyTabWidget * cppResult = cppSelf->splitVertically(); - pyResult = Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX], cppResult); - - // Ownership transferences. - Shiboken::Object::getOwnership(pyResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyMethodDef Sbk_PyTabWidget_methods[] = { - {"appendTab", (PyCFunction)Sbk_PyTabWidgetFunc_appendTab, METH_O}, - {"closeCurrentTab", (PyCFunction)Sbk_PyTabWidgetFunc_closeCurrentTab, METH_NOARGS}, - {"closePane", (PyCFunction)Sbk_PyTabWidgetFunc_closePane, METH_NOARGS}, - {"closeTab", (PyCFunction)Sbk_PyTabWidgetFunc_closeTab, METH_O}, - {"count", (PyCFunction)Sbk_PyTabWidgetFunc_count, METH_NOARGS}, - {"currentWidget", (PyCFunction)Sbk_PyTabWidgetFunc_currentWidget, METH_NOARGS}, - {"floatCurrentTab", (PyCFunction)Sbk_PyTabWidgetFunc_floatCurrentTab, METH_NOARGS}, - {"floatPane", (PyCFunction)Sbk_PyTabWidgetFunc_floatPane, METH_NOARGS}, - {"getCurrentIndex", (PyCFunction)Sbk_PyTabWidgetFunc_getCurrentIndex, METH_NOARGS}, - {"getScriptName", (PyCFunction)Sbk_PyTabWidgetFunc_getScriptName, METH_NOARGS}, - {"getTabLabel", (PyCFunction)Sbk_PyTabWidgetFunc_getTabLabel, METH_O}, - {"insertTab", (PyCFunction)Sbk_PyTabWidgetFunc_insertTab, METH_VARARGS}, - {"removeTab", (PyCFunction)Sbk_PyTabWidgetFunc_removeTab, METH_O}, - {"setCurrentIndex", (PyCFunction)Sbk_PyTabWidgetFunc_setCurrentIndex, METH_O}, - {"setNextTabCurrent", (PyCFunction)Sbk_PyTabWidgetFunc_setNextTabCurrent, METH_NOARGS}, - {"splitHorizontally", (PyCFunction)Sbk_PyTabWidgetFunc_splitHorizontally, METH_NOARGS}, - {"splitVertically", (PyCFunction)Sbk_PyTabWidgetFunc_splitVertically, METH_NOARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyTabWidget_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyTabWidget_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyTabWidget_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.PyTabWidget", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyTabWidget_traverse, - /*tp_clear*/ Sbk_PyTabWidget_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyTabWidget_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyTabWidget_PythonToCpp_PyTabWidget_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyTabWidget_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyTabWidget_PythonToCpp_PyTabWidget_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyTabWidget_Type)) - return PyTabWidget_PythonToCpp_PyTabWidget_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyTabWidget_PTR_CppToPython_PyTabWidget(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PyTabWidget*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PyTabWidget_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PyTabWidget(PyObject* module) -{ - SbkNatronGuiTypes[SBK_PYTABWIDGET_IDX] = reinterpret_cast(&Sbk_PyTabWidget_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyTabWidget", "PyTabWidget*", - &Sbk_PyTabWidget_Type, &Shiboken::callCppDestructor< ::PyTabWidget >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyTabWidget_Type, - PyTabWidget_PythonToCpp_PyTabWidget_PTR, - is_PyTabWidget_PythonToCpp_PyTabWidget_PTR_Convertible, - PyTabWidget_PTR_CppToPython_PyTabWidget); - - Shiboken::Conversions::registerConverterName(converter, "PyTabWidget"); - Shiboken::Conversions::registerConverterName(converter, "PyTabWidget*"); - Shiboken::Conversions::registerConverterName(converter, "PyTabWidget&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyTabWidget).name()); - - - -} diff --git a/Gui/Qt4/NatronGui/pytabwidget_wrapper.h b/Gui/Qt4/NatronGui/pytabwidget_wrapper.h deleted file mode 100644 index 7790ff2bbb..0000000000 --- a/Gui/Qt4/NatronGui/pytabwidget_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_PYTABWIDGET_H -#define SBK_PYTABWIDGET_H - -#include - -#include - -#endif // SBK_PYTABWIDGET_H - diff --git a/Gui/Qt4/NatronGui/pyviewer_wrapper.cpp b/Gui/Qt4/NatronGui/pyviewer_wrapper.cpp deleted file mode 100644 index 2b6b8a0513..0000000000 --- a/Gui/Qt4/NatronGui/pyviewer_wrapper.cpp +++ /dev/null @@ -1,1034 +0,0 @@ - -// default includes -#include "Global/Macros.h" -// clang-format off -CLANG_DIAG_OFF(mismatched-tags) -GCC_DIAG_OFF(unused-parameter) -GCC_DIAG_OFF(missing-field-initializers) -GCC_DIAG_OFF(missing-declarations) -GCC_DIAG_OFF(uninitialized) -GCC_DIAG_UNUSED_LOCAL_TYPEDEFS_OFF -// clang-format on -#include // produces many warnings -#include -#include -#include -#include -#include -#include "natrongui_python.h" - -#include "pyviewer_wrapper.h" - -// Extra includes -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING - - - -// Target --------------------------------------------------------- - -extern "C" { -static PyObject* Sbk_PyViewerFunc_getAInput(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getAInput()const - int cppResult = const_cast(cppSelf)->getAInput(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getBInput(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getBInput()const - int cppResult = const_cast(cppSelf)->getBInput(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getChannels(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getChannels()const - NATRON_NAMESPACE::DisplayChannelsEnum cppResult = NATRON_NAMESPACE::DisplayChannelsEnum(const_cast(cppSelf)->getChannels()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getCompositingOperator(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCompositingOperator()const - NATRON_NAMESPACE::ViewerCompositingOperatorEnum cppResult = NATRON_NAMESPACE::ViewerCompositingOperatorEnum(const_cast(cppSelf)->getCompositingOperator()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getCurrentFrame(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCurrentFrame() - int cppResult = cppSelf->getCurrentFrame(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getCurrentView(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getCurrentView()const - int cppResult = const_cast(cppSelf)->getCurrentView(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getFrameRange(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getFrameRange(int*,int*)const - // Begin code injection - - int x,y; - cppSelf->getFrameRange(&x,&y); - pyResult = PyTuple_New(2); - PyTuple_SET_ITEM(pyResult, 0, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &x)); - PyTuple_SET_ITEM(pyResult, 1, Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &y)); - return pyResult; - - // End of code injection - - - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getPlaybackMode(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getPlaybackMode()const - NATRON_NAMESPACE::PlaybackModeEnum cppResult = NATRON_NAMESPACE::PlaybackModeEnum(const_cast(cppSelf)->getPlaybackMode()); - pyResult = Shiboken::Conversions::copyToPython(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX]), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_getProxyIndex(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // getProxyIndex()const - int cppResult = const_cast(cppSelf)->getProxyIndex(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_isProxyModeEnabled(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - PyObject* pyResult = 0; - - // Call function/method - { - - if (!PyErr_Occurred()) { - // isProxyModeEnabled()const - bool cppResult = const_cast(cppSelf)->isProxyModeEnabled(); - pyResult = Shiboken::Conversions::copyToPython(Shiboken::Conversions::PrimitiveTypeConverter(), &cppResult); - } - } - - if (PyErr_Occurred() || !pyResult) { - Py_XDECREF(pyResult); - return 0; - } - return pyResult; -} - -static PyObject* Sbk_PyViewerFunc_pause(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // pause() - cppSelf->pause(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyViewerFunc_redraw(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // redraw() - cppSelf->redraw(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyViewerFunc_renderCurrentFrame(PyObject* self, PyObject* args, PyObject* kwds) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0 }; - SBK_UNUSED(pythonToCpp) - int numNamedArgs = (kwds ? PyDict_Size(kwds) : 0); - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0}; - - // invalid argument lengths - if (numArgs + numNamedArgs > 1) { - PyErr_SetString(PyExc_TypeError, "NatronGui.PyViewer.renderCurrentFrame(): too many arguments"); - return 0; - } - - if (!PyArg_ParseTuple(args, "|O:renderCurrentFrame", &(pyArgs[0]))) - return 0; - - - // Overloaded function decisor - // 0: renderCurrentFrame(bool) - if (numArgs == 0) { - overloadId = 0; // renderCurrentFrame(bool) - } else if ((pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) { - overloadId = 0; // renderCurrentFrame(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_renderCurrentFrame_TypeError; - - // Call function/method - { - if (kwds) { - PyObject* value = PyDict_GetItemString(kwds, "useCache"); - if (value && pyArgs[0]) { - PyErr_SetString(PyExc_TypeError, "NatronGui.PyViewer.renderCurrentFrame(): got multiple values for keyword argument 'useCache'."); - return 0; - } else if (value) { - pyArgs[0] = value; - if (!(pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0])))) - goto Sbk_PyViewerFunc_renderCurrentFrame_TypeError; - } - } - bool cppArg0 = true; - if (pythonToCpp[0]) pythonToCpp[0](pyArgs[0], &cppArg0); - - if (!PyErr_Occurred()) { - // renderCurrentFrame(bool) - cppSelf->renderCurrentFrame(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_renderCurrentFrame_TypeError: - const char* overloads[] = {"bool = true", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyViewer.renderCurrentFrame", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_seek(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: seek(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // seek(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_seek_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // seek(int) - cppSelf->seek(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_seek_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.seek", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setAInput(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setAInput(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setAInput(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setAInput_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setAInput(int) - cppSelf->setAInput(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setAInput_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setAInput", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setBInput(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setBInput(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setBInput(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setBInput_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setBInput(int) - cppSelf->setBInput(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setBInput_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setBInput", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setChannels(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setChannels(NATRON_NAMESPACE::DisplayChannelsEnum) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_DISPLAYCHANNELSENUM_IDX]), (pyArg)))) { - overloadId = 0; // setChannels(NATRON_NAMESPACE::DisplayChannelsEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setChannels_TypeError; - - // Call function/method - { - ::NATRON_NAMESPACE::DisplayChannelsEnum cppArg0 = ((::NATRON_NAMESPACE::DisplayChannelsEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setChannels(NATRON_NAMESPACE::DisplayChannelsEnum) - cppSelf->setChannels(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setChannels_TypeError: - const char* overloads[] = {"NatronEngine.NATRON_NAMESPACE.DisplayChannelsEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setChannels", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setCompositingOperator(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCompositingOperator(NATRON_NAMESPACE::ViewerCompositingOperatorEnum) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_VIEWERCOMPOSITINGOPERATORENUM_IDX]), (pyArg)))) { - overloadId = 0; // setCompositingOperator(NATRON_NAMESPACE::ViewerCompositingOperatorEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setCompositingOperator_TypeError; - - // Call function/method - { - ::NATRON_NAMESPACE::ViewerCompositingOperatorEnum cppArg0 = ((::NATRON_NAMESPACE::ViewerCompositingOperatorEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCompositingOperator(NATRON_NAMESPACE::ViewerCompositingOperatorEnum) - cppSelf->setCompositingOperator(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setCompositingOperator_TypeError: - const char* overloads[] = {"NatronEngine.NATRON_NAMESPACE.ViewerCompositingOperatorEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setCompositingOperator", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setCurrentView(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setCurrentView(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setCurrentView(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setCurrentView_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setCurrentView(int) - cppSelf->setCurrentView(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setCurrentView_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setCurrentView", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setFrameRange(PyObject* self, PyObject* args) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp[] = { 0, 0 }; - SBK_UNUSED(pythonToCpp) - int numArgs = PyTuple_GET_SIZE(args); - PyObject* pyArgs[] = {0, 0}; - - // invalid argument lengths - - - if (!PyArg_UnpackTuple(args, "setFrameRange", 2, 2, &(pyArgs[0]), &(pyArgs[1]))) - return 0; - - - // Overloaded function decisor - // 0: setFrameRange(int,int) - if (numArgs == 2 - && (pythonToCpp[0] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[0]))) - && (pythonToCpp[1] = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArgs[1])))) { - overloadId = 0; // setFrameRange(int,int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setFrameRange_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp[0](pyArgs[0], &cppArg0); - int cppArg1; - pythonToCpp[1](pyArgs[1], &cppArg1); - - if (!PyErr_Occurred()) { - // setFrameRange(int,int) - cppSelf->setFrameRange(cppArg0, cppArg1); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setFrameRange_TypeError: - const char* overloads[] = {"int, int", 0}; - Shiboken::setErrorAboutWrongArguments(args, "NatronGui.PyViewer.setFrameRange", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setPlaybackMode(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setPlaybackMode(NATRON_NAMESPACE::PlaybackModeEnum) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(SBK_CONVERTER(SbkNatronEngineTypes[SBK_NATRON_NAMESPACE_PLAYBACKMODEENUM_IDX]), (pyArg)))) { - overloadId = 0; // setPlaybackMode(NATRON_NAMESPACE::PlaybackModeEnum) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setPlaybackMode_TypeError; - - // Call function/method - { - ::NATRON_NAMESPACE::PlaybackModeEnum cppArg0 = ((::NATRON_NAMESPACE::PlaybackModeEnum)0); - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setPlaybackMode(NATRON_NAMESPACE::PlaybackModeEnum) - cppSelf->setPlaybackMode(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setPlaybackMode_TypeError: - const char* overloads[] = {"NatronEngine.NATRON_NAMESPACE.PlaybackModeEnum", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setPlaybackMode", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setProxyIndex(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setProxyIndex(int) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setProxyIndex(int) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setProxyIndex_TypeError; - - // Call function/method - { - int cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setProxyIndex(int) - cppSelf->setProxyIndex(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setProxyIndex_TypeError: - const char* overloads[] = {"int", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setProxyIndex", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_setProxyModeEnabled(PyObject* self, PyObject* pyArg) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - int overloadId = -1; - PythonToCppFunc pythonToCpp; - SBK_UNUSED(pythonToCpp) - - // Overloaded function decisor - // 0: setProxyModeEnabled(bool) - if ((pythonToCpp = Shiboken::Conversions::isPythonToCppConvertible(Shiboken::Conversions::PrimitiveTypeConverter(), (pyArg)))) { - overloadId = 0; // setProxyModeEnabled(bool) - } - - // Function signature not found. - if (overloadId == -1) goto Sbk_PyViewerFunc_setProxyModeEnabled_TypeError; - - // Call function/method - { - bool cppArg0; - pythonToCpp(pyArg, &cppArg0); - - if (!PyErr_Occurred()) { - // setProxyModeEnabled(bool) - cppSelf->setProxyModeEnabled(cppArg0); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; - - Sbk_PyViewerFunc_setProxyModeEnabled_TypeError: - const char* overloads[] = {"bool", 0}; - Shiboken::setErrorAboutWrongArguments(pyArg, "NatronGui.PyViewer.setProxyModeEnabled", overloads); - return 0; -} - -static PyObject* Sbk_PyViewerFunc_startBackward(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // startBackward() - cppSelf->startBackward(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyObject* Sbk_PyViewerFunc_startForward(PyObject* self) -{ - ::PyViewer* cppSelf = 0; - SBK_UNUSED(cppSelf) - if (!Shiboken::Object::isValid(self)) - return 0; - cppSelf = ((::PyViewer*)Shiboken::Conversions::cppPointer(SbkNatronGuiTypes[SBK_PYVIEWER_IDX], (SbkObject*)self)); - - // Call function/method - { - - if (!PyErr_Occurred()) { - // startForward() - cppSelf->startForward(); - } - } - - if (PyErr_Occurred()) { - return 0; - } - Py_RETURN_NONE; -} - -static PyMethodDef Sbk_PyViewer_methods[] = { - {"getAInput", (PyCFunction)Sbk_PyViewerFunc_getAInput, METH_NOARGS}, - {"getBInput", (PyCFunction)Sbk_PyViewerFunc_getBInput, METH_NOARGS}, - {"getChannels", (PyCFunction)Sbk_PyViewerFunc_getChannels, METH_NOARGS}, - {"getCompositingOperator", (PyCFunction)Sbk_PyViewerFunc_getCompositingOperator, METH_NOARGS}, - {"getCurrentFrame", (PyCFunction)Sbk_PyViewerFunc_getCurrentFrame, METH_NOARGS}, - {"getCurrentView", (PyCFunction)Sbk_PyViewerFunc_getCurrentView, METH_NOARGS}, - {"getFrameRange", (PyCFunction)Sbk_PyViewerFunc_getFrameRange, METH_NOARGS}, - {"getPlaybackMode", (PyCFunction)Sbk_PyViewerFunc_getPlaybackMode, METH_NOARGS}, - {"getProxyIndex", (PyCFunction)Sbk_PyViewerFunc_getProxyIndex, METH_NOARGS}, - {"isProxyModeEnabled", (PyCFunction)Sbk_PyViewerFunc_isProxyModeEnabled, METH_NOARGS}, - {"pause", (PyCFunction)Sbk_PyViewerFunc_pause, METH_NOARGS}, - {"redraw", (PyCFunction)Sbk_PyViewerFunc_redraw, METH_NOARGS}, - {"renderCurrentFrame", (PyCFunction)Sbk_PyViewerFunc_renderCurrentFrame, METH_VARARGS|METH_KEYWORDS}, - {"seek", (PyCFunction)Sbk_PyViewerFunc_seek, METH_O}, - {"setAInput", (PyCFunction)Sbk_PyViewerFunc_setAInput, METH_O}, - {"setBInput", (PyCFunction)Sbk_PyViewerFunc_setBInput, METH_O}, - {"setChannels", (PyCFunction)Sbk_PyViewerFunc_setChannels, METH_O}, - {"setCompositingOperator", (PyCFunction)Sbk_PyViewerFunc_setCompositingOperator, METH_O}, - {"setCurrentView", (PyCFunction)Sbk_PyViewerFunc_setCurrentView, METH_O}, - {"setFrameRange", (PyCFunction)Sbk_PyViewerFunc_setFrameRange, METH_VARARGS}, - {"setPlaybackMode", (PyCFunction)Sbk_PyViewerFunc_setPlaybackMode, METH_O}, - {"setProxyIndex", (PyCFunction)Sbk_PyViewerFunc_setProxyIndex, METH_O}, - {"setProxyModeEnabled", (PyCFunction)Sbk_PyViewerFunc_setProxyModeEnabled, METH_O}, - {"startBackward", (PyCFunction)Sbk_PyViewerFunc_startBackward, METH_NOARGS}, - {"startForward", (PyCFunction)Sbk_PyViewerFunc_startForward, METH_NOARGS}, - - {0} // Sentinel -}; - -} // extern "C" - -static int Sbk_PyViewer_traverse(PyObject* self, visitproc visit, void* arg) -{ - return reinterpret_cast(&SbkObject_Type)->tp_traverse(self, visit, arg); -} -static int Sbk_PyViewer_clear(PyObject* self) -{ - return reinterpret_cast(&SbkObject_Type)->tp_clear(self); -} -// Class Definition ----------------------------------------------- -extern "C" { -static SbkObjectType Sbk_PyViewer_Type = { { { - PyVarObject_HEAD_INIT(&SbkObjectType_Type, 0) - /*tp_name*/ "NatronGui.PyViewer", - /*tp_basicsize*/ sizeof(SbkObject), - /*tp_itemsize*/ 0, - /*tp_dealloc*/ &SbkDeallocWrapper, - /*tp_print*/ 0, - /*tp_getattr*/ 0, - /*tp_setattr*/ 0, - /*tp_compare*/ 0, - /*tp_repr*/ 0, - /*tp_as_number*/ 0, - /*tp_as_sequence*/ 0, - /*tp_as_mapping*/ 0, - /*tp_hash*/ 0, - /*tp_call*/ 0, - /*tp_str*/ 0, - /*tp_getattro*/ 0, - /*tp_setattro*/ 0, - /*tp_as_buffer*/ 0, - /*tp_flags*/ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_GC, - /*tp_doc*/ 0, - /*tp_traverse*/ Sbk_PyViewer_traverse, - /*tp_clear*/ Sbk_PyViewer_clear, - /*tp_richcompare*/ 0, - /*tp_weaklistoffset*/ 0, - /*tp_iter*/ 0, - /*tp_iternext*/ 0, - /*tp_methods*/ Sbk_PyViewer_methods, - /*tp_members*/ 0, - /*tp_getset*/ 0, - /*tp_base*/ reinterpret_cast(&SbkObject_Type), - /*tp_dict*/ 0, - /*tp_descr_get*/ 0, - /*tp_descr_set*/ 0, - /*tp_dictoffset*/ 0, - /*tp_init*/ 0, - /*tp_alloc*/ 0, - /*tp_new*/ 0, - /*tp_free*/ 0, - /*tp_is_gc*/ 0, - /*tp_bases*/ 0, - /*tp_mro*/ 0, - /*tp_cache*/ 0, - /*tp_subclasses*/ 0, - /*tp_weaklist*/ 0 -}, }, - /*priv_data*/ 0 -}; -} //extern - - -// Type conversion functions. - -// Python to C++ pointer conversion - returns the C++ object of the Python wrapper (keeps object identity). -static void PyViewer_PythonToCpp_PyViewer_PTR(PyObject* pyIn, void* cppOut) { - Shiboken::Conversions::pythonToCppPointer(&Sbk_PyViewer_Type, pyIn, cppOut); -} -static PythonToCppFunc is_PyViewer_PythonToCpp_PyViewer_PTR_Convertible(PyObject* pyIn) { - if (pyIn == Py_None) - return Shiboken::Conversions::nonePythonToCppNullPtr; - if (PyObject_TypeCheck(pyIn, (PyTypeObject*)&Sbk_PyViewer_Type)) - return PyViewer_PythonToCpp_PyViewer_PTR; - return 0; -} - -// C++ to Python pointer conversion - tries to find the Python wrapper for the C++ object (keeps object identity). -static PyObject* PyViewer_PTR_CppToPython_PyViewer(const void* cppIn) { - PyObject* pyOut = (PyObject*)Shiboken::BindingManager::instance().retrieveWrapper(cppIn); - if (pyOut) { - Py_INCREF(pyOut); - return pyOut; - } - const char* typeName = typeid(*((::PyViewer*)cppIn)).name(); - return Shiboken::Object::newObject(&Sbk_PyViewer_Type, const_cast(cppIn), false, false, typeName); -} - -void init_PyViewer(PyObject* module) -{ - SbkNatronGuiTypes[SBK_PYVIEWER_IDX] = reinterpret_cast(&Sbk_PyViewer_Type); - - if (!Shiboken::ObjectType::introduceWrapperType(module, "PyViewer", "PyViewer*", - &Sbk_PyViewer_Type, &Shiboken::callCppDestructor< ::PyViewer >)) { - return; - } - - // Register Converter - SbkConverter* converter = Shiboken::Conversions::createConverter(&Sbk_PyViewer_Type, - PyViewer_PythonToCpp_PyViewer_PTR, - is_PyViewer_PythonToCpp_PyViewer_PTR_Convertible, - PyViewer_PTR_CppToPython_PyViewer); - - Shiboken::Conversions::registerConverterName(converter, "PyViewer"); - Shiboken::Conversions::registerConverterName(converter, "PyViewer*"); - Shiboken::Conversions::registerConverterName(converter, "PyViewer&"); - Shiboken::Conversions::registerConverterName(converter, typeid(::PyViewer).name()); - - - -} diff --git a/Gui/Qt4/NatronGui/pyviewer_wrapper.h b/Gui/Qt4/NatronGui/pyviewer_wrapper.h deleted file mode 100644 index f23a422f77..0000000000 --- a/Gui/Qt4/NatronGui/pyviewer_wrapper.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SBK_PYVIEWER_H -#define SBK_PYVIEWER_H - -#include - -#include - -#endif // SBK_PYVIEWER_H - diff --git a/Gui/QtColorTriangle.cpp b/Gui/QtColorTriangle.cpp index bee6f20a17..5af0690b3b 100644 --- a/Gui/QtColorTriangle.cpp +++ b/Gui/QtColorTriangle.cpp @@ -221,11 +221,7 @@ void QtColorTriangle::genBackground() QConicalGradient gradient(bg.rect().center(), 90); QColor color; for (double i = 0; i <= 1.0; i += 0.1) { -#if QT_VERSION < 0x040100 - color.setHsv(int(i * 360.0), 255, 255); -#else color.setHsv(int(360.0 - (i * 360.0)), 255, 255); -#endif gradient.setColorAt(i, color); } diff --git a/Gui/QtMac.mm b/Gui/QtMac.mm index 180bd08abb..ebc0e09a13 100644 --- a/Gui/QtMac.mm +++ b/Gui/QtMac.mm @@ -88,18 +88,6 @@ - (NSRect)convertRectFromBacking:(NSRect)aRect; NATRON_NAMESPACE_ENTER -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -qreal -QtMac::devicePixelRatioInternal(const QWidget* w) { - CGFloat scaleFactor = 1.0; - NSView* view = reinterpret_cast(w->winId()); - if ([[view window] respondsToSelector: @selector(backingScaleFactor)]) - scaleFactor = [[view window] backingScaleFactor]; - - return qreal(scaleFactor); -} -#endif - #if OBJC_OLD_DISPATCH_PROTOTYPES != 1 void QtMac::setupDockClickHandler(void (*dockClickHandler)(void)) { diff --git a/Gui/RenderStatsDialog.cpp b/Gui/RenderStatsDialog.cpp index f8901044f9..a0ca891714 100644 --- a/Gui/RenderStatsDialog.cpp +++ b/Gui/RenderStatsDialog.cpp @@ -900,12 +900,7 @@ RenderStatsDialog::RenderStatsDialog(Gui* gui) _imp->view->setSelectionMode(QAbstractItemView::SingleSelection); _imp->view->setSelectionBehavior(QAbstractItemView::SelectRows); - -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->view->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->view->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->view->header()->setStretchLastSection(true); _imp->view->setUniformRowHeights(true); _imp->view->setSortingEnabled(true); diff --git a/Gui/RotoPanel.cpp b/Gui/RotoPanel.cpp index 05e7c2762d..9c4f8a8a19 100644 --- a/Gui/RotoPanel.cpp +++ b/Gui/RotoPanel.cpp @@ -674,11 +674,7 @@ RotoPanel::RotoPanel(const NodeGuiPtr& n, _imp->treeHeader->setIcon( COL_OPERATOR, QIcon(pixmerge) ); _imp->tree->setHeaderItem(_imp->treeHeader); _imp->tree->setMinimumHeight( TO_DPIY(350) ); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->tree->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->tree->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->buttonContainer = new QWidget(this); _imp->buttonLayout = new QHBoxLayout(_imp->buttonContainer); _imp->buttonLayout->setContentsMargins(0, 0, 0, 0); @@ -2517,17 +2513,9 @@ RotoPanel::onSettingsPanelClosed(bool closed) void RotoPanel::onOperatorColMinimumSizeChanged(const QSize& size) { -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->tree->header()->setResizeMode(QHeaderView::Fixed); -#else _imp->tree->header()->setSectionResizeMode(QHeaderView::Fixed); -#endif _imp->tree->setColumnWidth( COL_OPERATOR, size.width() ); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->tree->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->tree->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif } ////////////////////////////// diff --git a/Gui/ScaleSliderQWidget.cpp b/Gui/ScaleSliderQWidget.cpp index 2292ad93c3..1f556802f6 100644 --- a/Gui/ScaleSliderQWidget.cpp +++ b/Gui/ScaleSliderQWidget.cpp @@ -510,11 +510,7 @@ ScaleSliderQWidget::paintEvent(QPaintEvent* /*e*/) ticks_fill(half_tick, ticks_max, m1, m2, &ticks); const double smallestTickSize = range * smallestTickSizePixel / rangePixel; const double largestTickSize = range * largestTickSizePixel / rangePixel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double minTickSizeTextPixel = fontM.horizontalAdvance( QLatin1String("00") ); // AXIS-SPECIFIC -#else - const double minTickSizeTextPixel = fontM.width( QLatin1String("00") ); // AXIS-SPECIFIC -#endif const double minTickSizeText = range * minTickSizeTextPixel / rangePixel; for (int i = m1; i <= m2; ++i) { double value = i * smallTickSize + offset; @@ -541,11 +537,7 @@ ScaleSliderQWidget::paintEvent(QPaintEvent* /*e*/) if ( renderFloating && (tickSize > minTickSizeText) ) { const int tickSizePixel = rangePixel * tickSize / range; const QString s = QString::number(value); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const int sSizePixel = fontM.horizontalAdvance(s); -#else - const int sSizePixel = fontM.width(s); -#endif if (tickSizePixel > sSizePixel) { const int sSizeFullPixel = sSizePixel + minTickSizeTextPixel; double alphaText = 1.0; //alpha; @@ -562,11 +554,7 @@ ScaleSliderQWidget::paintEvent(QPaintEvent* /*e*/) QPointF textPos = _imp->zoomCtx.toWidgetCoordinates( value, btmLeft.y() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int textWidth = fontM.horizontalAdvance(s); -#else - int textWidth = fontM.width(s); -#endif int textX = std::floor(textPos.x() + 0.5); int textY = std::floor(textPos.y() + 0.5); // center the text, and make sure it fits diff --git a/Gui/ScriptEditor.cpp b/Gui/ScriptEditor.cpp index 9e1fcf2f59..612d4d9871 100644 --- a/Gui/ScriptEditor.cpp +++ b/Gui/ScriptEditor.cpp @@ -249,13 +249,8 @@ ScriptEditor::ScriptEditor(Gui* gui) _imp->inputEdit = new InputScriptTextEdit(gui, this); QObject::connect( _imp->inputEdit, SIGNAL(textChanged()), this, SLOT(onInputScriptTextChanged()) ); QFontMetrics fm = _imp->inputEdit->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->inputEdit->setTabStopDistance(fm.horizontalAdvance( QLatin1Char(' ') ) * 4); _imp->outputEdit->setTabStopDistance(fm.horizontalAdvance( QLatin1Char(' ') ) * 4); -#else - _imp->inputEdit->setTabStopWidth(fm.width( QLatin1Char(' ') ) * 4); - _imp->outputEdit->setTabStopWidth(fm.width( QLatin1Char(' ') ) * 4); -#endif _imp->mainLayout->addWidget(_imp->buttonsContainer); splitter->addWidget(_imp->outputEdit); diff --git a/Gui/ScriptTextEdit.cpp b/Gui/ScriptTextEdit.cpp index b9ebbbfe3a..74cd9779f1 100644 --- a/Gui/ScriptTextEdit.cpp +++ b/Gui/ScriptTextEdit.cpp @@ -340,11 +340,7 @@ InputScriptTextEdit::getLineNumberAreaWidth() ++digits; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return 3 + fontMetrics().horizontalAdvance( QLatin1Char('9') ) * digits; -#else - return 3 + fontMetrics().width( QLatin1Char('9') ) * digits; -#endif } void diff --git a/Gui/SequenceFileDialog.cpp b/Gui/SequenceFileDialog.cpp index e55b165dc1..eb73ea80e7 100644 --- a/Gui/SequenceFileDialog.cpp +++ b/Gui/SequenceFileDialog.cpp @@ -61,19 +61,11 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_OFF #include GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#include -#include -#include -#include -#include -#else #include #include #include #include #include -#endif #include #include #include @@ -142,7 +134,7 @@ static void removeTrailingSlash(QString& str) { } static QString urlToPathString(const QUrl& url) { - return QtCompat::toLocalFileUrlFixed(url).toLocalFile(); + return url.toLocalFile(); } static QString bookmarkToUrlPath(const QUrl& bookmark) { @@ -1248,11 +1240,7 @@ SequenceItemDelegate::sizeHint(const QStyleOptionViewItem & option, QString str = index.data(FileSystemModel::FilePathRole).toString(); QFontMetrics metric(option.font); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return QSize( metric.horizontalAdvance(str), metric.height() ); -#else - return QSize( metric.width(str), metric.height() ); -#endif } void @@ -2464,12 +2452,7 @@ FileDialogComboBox::sizeHint() const if ( (index >= 0) && ( index < count() ) ) { QFontMetrics fm = fontMetrics(); QString txt = itemText(index); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int w = fm.horizontalAdvance(txt); -#else - int w = fm.width(txt); -#endif - return QSize(w + 10, fm.height() * 1.5); } diff --git a/Gui/SpinBox.cpp b/Gui/SpinBox.cpp index 45deddefa9..64de42c301 100644 --- a/Gui/SpinBox.cpp +++ b/Gui/SpinBox.cpp @@ -628,23 +628,14 @@ SpinBox::wheelEvent(QWheelEvent* e) if (ignoreWheelEvent) { return LineEdit::wheelEvent(e); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if ( (e->angleDelta().x() != 0) || ( e->angleDelta().y() == 0) || -#else - if ( (e->orientation() != Qt::Vertical) || - ( e->delta() == 0) || -#endif !isEnabled() || isReadOnly() || !hasFocus() ) { // wheel is only effective when the widget has focus (click it first, then wheel) return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) int delta = e->angleDelta().y(); -#else - int delta = e->delta(); -#endif int shift = 0; if ( modCASIsShift(e) ) { shift = 1; diff --git a/Gui/SplashScreen.cpp b/Gui/SplashScreen.cpp index 1dc878e7a7..f3e44f2585 100644 --- a/Gui/SplashScreen.cpp +++ b/Gui/SplashScreen.cpp @@ -33,11 +33,7 @@ CLANG_DIAG_OFF(deprecated) #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) #include -#else -#include -#endif CLANG_DIAG_ON(deprecated) @@ -81,15 +77,6 @@ SplashScreen::SplashScreen(const QString & filePath) _pixmap.load(filePath); _scale = 1.; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#if defined(Q_OS_WIN) - // code from Gui::devicePixelRatio() - HDC wscreen = GetDC(winId()); - FLOAT horizontalDPI = GetDeviceCaps(wscreen, LOGPIXELSX); - ReleaseDC(0, wscreen); - _scale = static_cast(horizontalDPI) / 96.; -#endif -#endif if (_scale != 1.) { _pixmap = _pixmap.scaled( int(_pixmap.width() * _scale), int(_pixmap.height() * _scale), Qt::KeepAspectRatio, Qt::SmoothTransformation); @@ -102,13 +89,8 @@ SplashScreen::SplashScreen(const QString & filePath) show(); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); QRect screen = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - QRect screen = desktop->screenGeometry(); -#endif move(screen.width() / 2 - width() / 2, screen.height() / 2 - height() / 2); } @@ -153,15 +135,6 @@ LoadProjectSplashScreen::LoadProjectSplashScreen(const QString & filePath) _pixmap.load( QString::fromUtf8(":Resources/Images/loadProjectSplashscreen.png") ); _scale = 1.; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#if defined(Q_OS_WIN) - // code from Gui::devicePixelRatio() - HDC wscreen = GetDC(winId()); - FLOAT horizontalDPI = GetDeviceCaps(wscreen, LOGPIXELSX); - ReleaseDC(0, wscreen); - _scale = static_cast(horizontalDPI) / 96.; -#endif -#endif if (_scale != 1.) { _pixmap = _pixmap.scaled( int(_pixmap.width() * _scale), int(_pixmap.height() * _scale), Qt::KeepAspectRatio, Qt::SmoothTransformation); @@ -169,13 +142,8 @@ LoadProjectSplashScreen::LoadProjectSplashScreen(const QString & filePath) resize( _pixmap.width(), _pixmap.height() ); show(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) QScreen* desktop = QGuiApplication::primaryScreen(); QRect screen = desktop->availableGeometry(); -#else - QDesktopWidget* desktop = QApplication::desktop(); - QRect screen = desktop->screenGeometry(); -#endif move(screen.width() / 2 - width() / 2, screen.height() / 2 - height() / 2); } @@ -209,11 +177,7 @@ LoadProjectSplashScreen::paintEvent(QPaintEvent* /*e*/) QString loadString( tr("Loading ") ); QFontMetrics fm = p.fontMetrics(); QPointF loadStrPos(300 * _scale, _pixmap.height() / 2.); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) p.drawText(QPointF(loadStrPos.x() + (fm.horizontalAdvance(loadString) + 5) * _scale, _pixmap.height() / 2.), _projectName); -#else - p.drawText(QPointF(loadStrPos.x() + (fm.width(loadString) + 5) * _scale, _pixmap.height() / 2.), _projectName); -#endif p.setPen( QColor(243, 137, 0) ); p.drawText(loadStrPos, loadString); } diff --git a/Gui/TabWidget.cpp b/Gui/TabWidget.cpp index 22dcc77856..9ab7d999e5 100644 --- a/Gui/TabWidget.cpp +++ b/Gui/TabWidget.cpp @@ -1521,11 +1521,7 @@ TabBar::makePixmapForDrag(int index) addTab(tabs[index].second, tabs[index].first); QPixmap currentTabPixmap = Gui::screenShot( _tabWidget->tabAt(index)->getWidget() ); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QPixmap tabBarPixmap = QPixmap::grabWidget(this); -#else QPixmap tabBarPixmap = grab(); -#endif ///re-insert all the tabs into the tab bar removeTab(0); @@ -1538,15 +1534,6 @@ TabBar::makePixmapForDrag(int index) QImage tabBarImg = tabBarPixmap.toImage(); QImage currentTabImg = currentTabPixmap.toImage(); -#if defined(Q_OS_DARWIN) && (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - ///Prevent a bug with grabWidget and retina display on Qt4 - qreal devicePixelRatio = _tabWidget->getGui()->devicePixelRatio(); - if (devicePixelRatio > 1) { - tabBarImg = tabBarImg.scaled(tabBarImg.width() / devicePixelRatio, tabBarImg.height() / devicePixelRatio); - currentTabImg = currentTabImg.scaled(currentTabImg.width() / devicePixelRatio, currentTabImg.height() / devicePixelRatio); - } -#endif - //now we just put together the 2 pixmaps and set it with mid transparency QImage ret(currentTabImg.width(), currentTabImg.height() + tabBarImg.height(), QImage::Format_ARGB32_Premultiplied); diff --git a/Gui/TableModelView.cpp b/Gui/TableModelView.cpp index beeaaff85b..2840793d00 100644 --- a/Gui/TableModelView.cpp +++ b/Gui/TableModelView.cpp @@ -917,21 +917,12 @@ ExpandingLineEdit::updateMinimumWidth() { int left, right; -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) QMargins textMargin = textMargins(); int width = textMargin.left() + textMargin.right() + 4; QMargins contentMargin = contentsMargins(); width += contentMargin.left() + contentMargin.right(); QStyleOptionFrame opt; -#else - getTextMargins(&left, 0, &right, 0); - int width = left + right + 4 /*horizontalMargin in qlineedit.cpp*/; - getContentsMargins(&left, 0, &right, 0); - width += left + right; - - QStyleOptionFrameV2 opt; -#endif initStyleOption(&opt); int minWidth = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(width, 0). @@ -949,11 +940,7 @@ ExpandingLineEdit::resizeToContents() } if ( QWidget * parent = parentWidget() ) { QPoint position = pos(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int hintWidth = minimumWidth() + fontMetrics().horizontalAdvance( displayText() ); -#else - int hintWidth = minimumWidth() + fontMetrics().width( displayText() ); -#endif int parentWidth = parent->width(); int maxWidth = isRightToLeft() ? position.x() + oldWidth : parentWidth - position.x(); int newWidth = qBound(originalWidth, hintWidth, maxWidth); @@ -967,15 +954,9 @@ ExpandingLineEdit::resizeToContents() } } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -QWidget* -TableItemEditorFactory::createEditor(QVariant::Type userType, - QWidget *parent) const -#else QWidget* TableItemEditorFactory::createEditor(int userType, QWidget *parent) const -#endif { switch (userType) { case QVariant::UInt: { @@ -1020,13 +1001,8 @@ TableItemEditorFactory::createEditor(int userType, return 0; } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -QByteArray -TableItemEditorFactory::valuePropertyName(QVariant::Type userType) const -#else QByteArray TableItemEditorFactory::valuePropertyName(int userType) const -#endif { switch (userType) { case QVariant::UInt: diff --git a/Gui/TableModelView.h b/Gui/TableModelView.h index 990bf47610..d81040e3ba 100644 --- a/Gui/TableModelView.h +++ b/Gui/TableModelView.h @@ -265,13 +265,8 @@ class TableItemEditorFactory { } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - virtual QWidget * createEditor(QVariant::Type type, QWidget *parent) const OVERRIDE FINAL; - virtual QByteArray valuePropertyName(QVariant::Type type) const OVERRIDE FINAL; -#else virtual QWidget * createEditor(int userType, QWidget *parent) const OVERRIDE FINAL; virtual QByteArray valuePropertyName(int userType) const OVERRIDE FINAL; -#endif }; diff --git a/Gui/TextRenderer.cpp b/Gui/TextRenderer.cpp index ab7886e47f..e24922a9c5 100644 --- a/Gui/TextRenderer.cpp +++ b/Gui/TextRenderer.cpp @@ -38,12 +38,8 @@ CLANG_DIAG_ON(uninitialized) #include "Global/GLIncludes.h" //!= QT_VERSION_CHECK(5, 4, 0) #include #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif NATRON_NAMESPACE_ENTER @@ -150,9 +146,6 @@ TextRendererPrivate::newTransparentTexture() QImage image(TEXTURE_SIZE, TEXTURE_SIZE, QImage::Format_ARGB32); image.fill(Qt::transparent); -#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) - image = QOpenGLWidget::convertToGLFormat(image); -#endif glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, TEXTURE_SIZE, TEXTURE_SIZE, 0, GL_RGBA, GL_UNSIGNED_BYTE, image.bits() ); @@ -178,11 +171,7 @@ TextRendererPrivate::createCharacter(QChar c) } GLuint texture = _usedTextures.back(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) GLsizei width = _fontMetrics.horizontalAdvance(c); -#else - GLsizei width = _fontMetrics.width(c); -#endif GLsizei height = _fontMetrics.height(); // render into a new transparent pixmap using QPainter @@ -200,9 +189,6 @@ TextRendererPrivate::createCharacter(QChar c) // fill the texture with the QImage -#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) - image = QOpenGLWidget::convertToGLFormat(image); -#endif glCheckError(); GLuint savedTexture; @@ -294,11 +280,7 @@ TextRenderer::renderText(float x, if (flags & Qt::AlignHCenter || flags & Qt::AlignRight) { int width = 0; for (int i = 0; i < text.length(); ++i) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) width += p->_fontMetrics.horizontalAdvance(text[i]); -#else - width += p->_fontMetrics.width(text[i]); -#endif } if (flags & Qt::AlignHCenter) { x -= width/2. * scalex; @@ -342,7 +324,6 @@ TextRenderer::renderText(float x, assert( glIsTexture(texture) ); } glCheckError(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) glBegin(GL_QUADS); glTexCoord2f(c->xTexCoords[0], c->yTexCoords[1]); glVertex2f(0, 0); @@ -352,17 +333,6 @@ TextRenderer::renderText(float x, glVertex2f(c->w * scalex, c->h * scaley); glTexCoord2f(c->xTexCoords[0], c->yTexCoords[0]); glVertex2f(0, c->h * scaley); -#else - glBegin(GL_QUADS); - glTexCoord2f(c->xTexCoords[0], c->yTexCoords[0]); - glVertex2f(0, 0); - glTexCoord2f(c->xTexCoords[1], c->yTexCoords[0]); - glVertex2f(c->w * scalex, 0); - glTexCoord2f(c->xTexCoords[1], c->yTexCoords[1]); - glVertex2f(c->w * scalex, c->h * scaley); - glTexCoord2f(c->xTexCoords[0], c->yTexCoords[1]); - glVertex2f(0, c->h * scaley); -#endif glEnd(); glCheckErrorIgnoreOSXBug(); glTranslatef(c->w * scalex, 0, 0); diff --git a/Gui/TimeLineGui.cpp b/Gui/TimeLineGui.cpp index 433c62ed58..585466e7ad 100644 --- a/Gui/TimeLineGui.cpp +++ b/Gui/TimeLineGui.cpp @@ -62,9 +62,7 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include "Gui/ViewerTab.h" #include "Gui/ticks.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif NATRON_NAMESPACE_ENTER @@ -546,11 +544,7 @@ TimeLineGui::paintGL() ticks_fill(half_tick, ticks_max, m1, m2, &ticks); const double smallestTickSize = range * smallestTickSizePixel / rangePixel; const double largestTickSize = range * largestTickSizePixel / rangePixel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const double minTickSizeTextPixel = ( _imp->isTimeFormatFrames ? fm.horizontalAdvance( QLatin1String("00000") ) : fm.horizontalAdvance( QLatin1String("00:00:00:00") ) ) / _imp->_screenPixelRatio; -#else - const double minTickSizeTextPixel = ( _imp->isTimeFormatFrames ? fm.width( QLatin1String("00000") ) : fm.width( QLatin1String("00:00:00:00") ) ) / _imp->_screenPixelRatio; // AXIS-SPECIFIC -#endif const double minTickSizeText = range * minTickSizeTextPixel / rangePixel; for (int i = m1; i <= m2; ++i) { double value = i * smallTickSize + offset; @@ -574,11 +568,7 @@ TimeLineGui::paintGL() if (tickSize > minTickSizeText) { const int tickSizePixel = rangePixel * tickSize / range; const QString s = _imp->isTimeFormatFrames ? QString::number(value) : timecodeString(value, fps); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) const int sSizePixel = fm.horizontalAdvance(s) / _imp->_screenPixelRatio; -#else - const int sSizePixel = fm.width(s) / _imp->_screenPixelRatio; -#endif if (tickSizePixel > sSizePixel) { const int sSizeFullPixel = sSizePixel + minTickSizeTextPixel; double alphaText = 1.0; //alpha; @@ -1093,28 +1083,17 @@ TimeLineGui::mouseReleaseEvent(QMouseEvent* e) void TimeLineGui::wheelEvent(QWheelEvent* e) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { return; } const double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->angleDelta().y() ); -#else - if (e->orientation() != Qt::Vertical) { - return; - } - const double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->delta() ); // no need to use ipow() here, because the result is not cast to int -#endif double newZoomFactor = _imp->tlZoomCtx.zoomFactor * scaleFactor; if (newZoomFactor <= 0.01) { // 1 pixel for 100 frames newZoomFactor = 0.01; } else if (newZoomFactor > 100.) { // 100 pixels per frame seems reasonable, see also DopeSheetView::wheelEvent() newZoomFactor = 100.; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QPointF zoomCenter = toTimeLineCoordinates( e->position().x(), e->position().y() ); -#else - QPointF zoomCenter = toTimeLineCoordinates( e->x(), e->y() ); -#endif double zoomRatio = _imp->tlZoomCtx.zoomFactor / newZoomFactor; _imp->tlZoomCtx.left = zoomCenter.x() - (zoomCenter.x() - _imp->tlZoomCtx.left) * zoomRatio; _imp->tlZoomCtx.bottom = zoomCenter.y() - (zoomCenter.y() - _imp->tlZoomCtx.bottom) * zoomRatio; diff --git a/Gui/TimeLineGui.h b/Gui/TimeLineGui.h index 431dae1a8e..43dbbcd234 100644 --- a/Gui/TimeLineGui.h +++ b/Gui/TimeLineGui.h @@ -39,11 +39,7 @@ CLANG_DIAG_OFF(uninitialized) CLANG_DIAG_ON(deprecated) CLANG_DIAG_ON(uninitialized) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Global/GlobalDefines.h" diff --git a/Gui/TrackerPanel.cpp b/Gui/TrackerPanel.cpp index 0310034174..dd0c32be29 100644 --- a/Gui/TrackerPanel.cpp +++ b/Gui/TrackerPanel.cpp @@ -468,11 +468,7 @@ TrackerPanel::TrackerPanel(const NodeGuiPtr& n, _imp->view->setAttribute(Qt::WA_MacShowFocusRect, 0); -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - _imp->view->header()->setResizeMode(QHeaderView::ResizeToContents); -#else _imp->view->header()->setSectionResizeMode(QHeaderView::ResizeToContents); -#endif _imp->view->header()->setStretchLastSection(true); _imp->mainLayout->addWidget(_imp->view); diff --git a/Gui/VerticalColorBar.h b/Gui/VerticalColorBar.h index af7b4471b2..ba8dabaecd 100644 --- a/Gui/VerticalColorBar.h +++ b/Gui/VerticalColorBar.h @@ -32,11 +32,7 @@ CLANG_DIAG_OFF(deprecated) CLANG_DIAG_OFF(uninitialized) #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#else -#include -#endif #include CLANG_DIAG_ON(deprecated) diff --git a/Gui/ViewerGL.cpp b/Gui/ViewerGL.cpp index b8aaf3f122..98ed44f438 100644 --- a/Gui/ViewerGL.cpp +++ b/Gui/ViewerGL.cpp @@ -34,17 +34,11 @@ #include "Global/GLIncludes.h" //!= QT_VERSION_CHECK(5, 0, 0) #include #include #include // qApp #include #include -#else -#include -#include -#include // qApp -#endif GCC_DIAG_UNUSED_PRIVATE_FIELD_OFF // /opt/local/include/QtGui/qmime.h:119:10: warning: private field 'type' is not used [-Wunused-private-field] @@ -54,11 +48,7 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLExtrasCompat.h" -#endif #include "Engine/Lut.h" #include "Engine/Node.h" @@ -91,9 +81,7 @@ GCC_DIAG_UNUSED_PRIVATE_FIELD_ON #include "Gui/TabWidget.h" #include "Gui/ViewerTab.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif #define USER_ROI_BORDER_TICK_SIZE 15.f @@ -126,11 +114,7 @@ NATRON_NAMESPACE_ENTER ViewerGL::ViewerGL(ViewerTab* parent, const QOpenGLWidget* shareWidget) -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) : QOpenGLWidget(parent) -#else - : QOpenGLWidget(parent, shareWidget) -#endif , _imp( new Implementation(this, parent) ) { // always running in the main thread @@ -194,11 +178,7 @@ ViewerGL::resizeGL(int w, glViewport (0, 0, w, h); double zoomWidth = w; double zoomHeight = h; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) && QT_VERSION < QT_VERSION_CHECK(5, 4, 0) - double screenPixelRatio = getScreenPixelRatio(); - zoomWidth /= screenPixelRatio; - zoomHeight /= screenPixelRatio; -#endif + assert( zoomWidth == width() && zoomHeight == height() ); // if this crashes here, then the viewport size has to be stored to compute glShadow bool zoomSinceLastFit; double oldWidth, oldHeight; @@ -585,11 +565,6 @@ ViewerGL::centerWipe() QPoint pos = mapFromGlobal( QCursor::pos() ); int x = pos.x(); int y = pos.y(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) && QT_VERSION < QT_VERSION_CHECK(5, 4, 0) - double screenPixelRatio = getScreenPixelRatio(); - x *= screenPixelRatio; - y *= screenPixelRatio; -#endif QPointF zoomPos = toZoomCoordinates( QPointF(x, y) ); @@ -1136,11 +1111,7 @@ wordWrap(const QFontMetrics& fm, for (int i = 0; i < words.size(); ++i) { QString word = words[i]; -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) int wordPixels = fm.horizontalAdvance(word); -#else - int wordPixels = fm.width(word); -#endif // If adding the new word to the current line would be too long, // then put it on a new line (and split it up if it's too long). @@ -1167,11 +1138,7 @@ wordWrap(const QFontMetrics& fm, stringL.push_back(curString); curString.clear(); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) wordPixels = fm.horizontalAdvance(word); -#else - wordPixels = fm.width(word); -#endif //tmp.append('\n'); } @@ -1753,11 +1720,7 @@ ViewerGL::setLut(int lut) _imp->displayingImageLut = (ViewerColorSpaceEnum)lut; } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#define QMouseEventLocalPos(e) ( e->posF() ) -#else #define QMouseEventLocalPos(e) ( e->localPos() ) -#endif void ViewerGL::mousePressEvent(QMouseEvent* e) @@ -2768,11 +2731,8 @@ ViewerGL::wheelEvent(QWheelEvent* e) if ( modCASIsControl(e) ) { const int delta_max = 28; // threshold delta to the range -delta_max..delta_max -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) int delta = std::max( -delta_max, std::min(e->angleDelta().y(), delta_max) ); -#else - int delta = std::max( -delta_max, std::min(e->delta(), delta_max) ); -#endif + _imp->wheelDeltaSeekFrame += delta; if (_imp->wheelDeltaSeekFrame <= -delta_max) { _imp->wheelDeltaSeekFrame += delta_max; @@ -2785,11 +2745,7 @@ ViewerGL::wheelEvent(QWheelEvent* e) return; } -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) if (e->angleDelta().x() != 0) { -#else - if (e->orientation() != Qt::Vertical) { -#endif // we only handle vertical motion for zooming return QOpenGLWidget::wheelEvent(e); } @@ -2806,18 +2762,10 @@ ViewerGL::wheelEvent(QWheelEvent* e) double zoomFactor; unsigned int oldMipmapLevel, newMipmapLevel; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->angleDelta().y() ); -#else - double scaleFactor = std::pow( NATRON_WHEEL_ZOOM_PER_DELTA, e->delta() ); // no need to use ipow() here, because the result is not cast to int -#endif { QMutexLocker l(&_imp->zoomCtxMutex); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->position().x(), e->position().y() ); -#else - QPointF zoomCenter = _imp->zoomCtx.toZoomCoordinates( e->x(), e->y() ); -#endif zoomFactor = _imp->zoomCtx.factor(); //oldMipmapLevel = std::log( zoomFactor >= 1 ? 1 : ipow( 2, -std::ceil(std::log(zoomFactor) / M_LN2) ) ) / M_LN2; @@ -3598,12 +3546,8 @@ ViewerGL::swapOpenGLBuffers() { // always running in the main thread assert( qApp && qApp->thread() == QThread::currentThread() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) // calls glSwapBuffers in the widget stack as described in https://doc.qt.io/qt-5/qopenglwidget.html#threading update(); -#else - swapBuffers(); -#endif } /** @@ -3622,11 +3566,7 @@ ViewerGL::redrawNow() { // always running in the main thread assert( qApp && qApp->thread() == QThread::currentThread() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) update(); -#else - updateGL(); -#endif } /** @@ -3661,11 +3601,7 @@ ViewerGL::getPixelScale(double & xScale, double ViewerGL::getScreenPixelRatio() const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) return devicePixelRatio(); -#else - return (_imp->viewerTab && _imp->viewerTab->getGui()) ? _imp->viewerTab->getGui()->devicePixelRatio() : 1.; -#endif } #endif @@ -3699,11 +3635,7 @@ ViewerGL::getWidgetFontHeight() const int ViewerGL::getStringWidthForCurrentFont(const std::string& string) const { -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) return fontMetrics().horizontalAdvance( QString::fromUtf8( string.c_str() ) ); -#else - return fontMetrics().width( QString::fromUtf8( string.c_str() ) ); -#endif } void @@ -4636,14 +4568,11 @@ ViewerGL::getViewerFrameRange(int* first, double ViewerGL::currentTimeForEvent(QInputEvent* e) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) // timestamp() is usually in milliseconds if ( e->timestamp() ) { return (double)e->timestamp() / 1000000; } -#else - Q_UNUSED(e); -#endif + // Qt 4 has no event timestamp, use gettimeofday (defined in Timer.cpp for windows) struct timeval now; gettimeofday(&now, 0); diff --git a/Gui/ViewerGL.h b/Gui/ViewerGL.h index 1dc11c04d9..7da7b4161e 100644 --- a/Gui/ViewerGL.h +++ b/Gui/ViewerGL.h @@ -36,11 +36,7 @@ #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLWidgetCompat.h" -#endif #include "Engine/OpenGLViewerI.h" #include "Engine/ViewIdx.h" diff --git a/Gui/ViewerGLPrivate.cpp b/Gui/ViewerGLPrivate.cpp index 72deb4f23c..957837e3de 100644 --- a/Gui/ViewerGLPrivate.cpp +++ b/Gui/ViewerGLPrivate.cpp @@ -34,11 +34,7 @@ #include "Global/GLIncludes.h" //! // qApp -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#else -#include "Gui/QGLExtrasCompat.h" -#endif #include "Engine/Lut.h" // Color #include "Engine/Settings.h" @@ -49,9 +45,7 @@ #include "Gui/Menu.h" #include "Gui/ViewerTab.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) #include -#endif #ifndef M_PI #define M_PI 3.14159265358979323846264338327950288 /* pi */ @@ -572,11 +566,8 @@ ViewerGL::Implementation::getWipePolygon(const RectD & texRectClipped, if (crossProd11 * crossProd21 < 0) { QLineF e(texRectClipped.x1, texRectClipped.y1, texRectClipped.x2, texRectClipped.y1); QPointF p; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType t = inter.intersects(e, &p); -#else - QLineF::IntersectType t = inter.intersect(e, &p); -#endif + if (t == QLineF::BoundedIntersection) { *polygonPoints << p; } @@ -587,11 +578,7 @@ ViewerGL::Implementation::getWipePolygon(const RectD & texRectClipped, if (crossProd21 * crossProd22 < 0) { QLineF e(texRectClipped.x2, texRectClipped.y1, texRectClipped.x2, texRectClipped.y2); QPointF p; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType t = inter.intersects(e, &p); -#else - QLineF::IntersectType t = inter.intersect(e, &p); -#endif if (t == QLineF::BoundedIntersection) { *polygonPoints << p; } @@ -602,11 +589,7 @@ ViewerGL::Implementation::getWipePolygon(const RectD & texRectClipped, if (crossProd22 * crossProd12 < 0) { QLineF e(texRectClipped.x2, texRectClipped.y2, texRectClipped.x1, texRectClipped.y2); QPointF p; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType t = inter.intersects(e, &p); -#else - QLineF::IntersectType t = inter.intersect(e, &p); -#endif if (t == QLineF::BoundedIntersection) { *polygonPoints << p; } @@ -617,11 +600,7 @@ ViewerGL::Implementation::getWipePolygon(const RectD & texRectClipped, if (crossProd12 * crossProd11 < 0) { QLineF e(texRectClipped.x1, texRectClipped.y2, texRectClipped.x1, texRectClipped.y1); QPointF p; -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QLineF::IntersectionType t = inter.intersects(e, &p); -#else - QLineF::IntersectType t = inter.intersect(e, &p); -#endif if (t == QLineF::BoundedIntersection) { *polygonPoints << p; } diff --git a/Gui/ViewerGLPrivate.h b/Gui/ViewerGLPrivate.h index 5e034df35d..5348df6588 100644 --- a/Gui/ViewerGLPrivate.h +++ b/Gui/ViewerGLPrivate.h @@ -42,11 +42,6 @@ CLANG_DIAG_ON(uninitialized) #include "Gui/ZoomContext.h" #include "Gui/GuiFwd.h" -#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) -#include "Gui/QGLExtrasCompat.h" -#endif - - #define WIPE_MIX_HANDLE_LENGTH 50. #define WIPE_ROTATE_HANDLE_LENGTH 100. #define WIPE_ROTATE_OFFSET 30 diff --git a/Gui/ViewerTab.cpp b/Gui/ViewerTab.cpp index 8d8b7cd9cd..0292f8ef9d 100644 --- a/Gui/ViewerTab.cpp +++ b/Gui/ViewerTab.cpp @@ -146,11 +146,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, "The channels of the layer will be mapped to the RGBA channels of the viewer according to " "its number of channels. (e.g: UV would be mapped to RG)") + QString::fromUtf8("

") ); QObject::connect( _imp->layerChoice, SIGNAL(currentIndexChanged(int)), this, SLOT(onLayerComboChanged(int)) ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->layerChoice->setFixedWidth( fm.horizontalAdvance( QString::fromUtf8("Color.Toto.RGBA") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#else - _imp->layerChoice->setFixedWidth( fm.width( QString::fromUtf8("Color.Toto.RGBA") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#endif _imp->layerChoice->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); _imp->firstRowLayout->addWidget(_imp->layerChoice); @@ -158,11 +154,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, _imp->alphaChannelChoice->setToolTip( QString::fromUtf8("

") + tr("Alpha channel:") + QString::fromUtf8("

") + tr("Select here a channel of any layer that will be used when displaying the " "alpha channel with the Channels choice on the right.") + QString::fromUtf8("

") ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->alphaChannelChoice->setFixedWidth( fm.horizontalAdvance( QString::fromUtf8("Color.alpha") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#else - _imp->alphaChannelChoice->setFixedWidth( fm.width( QString::fromUtf8("Color.alpha") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#endif _imp->alphaChannelChoice->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); QObject::connect( _imp->alphaChannelChoice, SIGNAL(currentIndexChanged(int)), this, SLOT(onAlphaChannelComboChanged(int)) ); _imp->firstRowLayout->addWidget(_imp->alphaChannelChoice); @@ -171,11 +163,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, _imp->viewerChannels->setToolTip( QString::fromUtf8("

") + tr("Display Channels:") + QString::fromUtf8("

") + tr("The channels to display on the viewer.") + QString::fromUtf8("

") ); _imp->firstRowLayout->addWidget(_imp->viewerChannels); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->viewerChannels->setFixedWidth( fm.horizontalAdvance( QString::fromUtf8("Luminance") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#else - _imp->viewerChannels->setFixedWidth( fm.width( QString::fromUtf8("Luminance") ) + 3 * TO_DPIX(DROP_DOWN_ICON_SIZE) ); -#endif _imp->viewerChannels->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); addSpacer(_imp->firstRowLayout); @@ -372,11 +360,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, _imp->firstInputImage = new ComboBox(_imp->firstSettingsRow); _imp->firstInputImage->setToolTip( _imp->firstInputLabel->toolTip() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->firstInputImage->setFixedWidth(fm.horizontalAdvance( QString::fromUtf8("ColorCorrect1") ) + 3 * DROP_DOWN_ICON_SIZE); -#else - _imp->firstInputImage->setFixedWidth(fm.width( QString::fromUtf8("ColorCorrect1") ) + 3 * DROP_DOWN_ICON_SIZE); -#endif _imp->firstInputImage->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); _imp->firstInputImage->addItem( QString::fromUtf8(" - ") ); QObject::connect( _imp->firstInputImage, SIGNAL(currentIndexChanged(QString)), this, SLOT(onFirstInputNameChanged(QString)) ); @@ -392,11 +376,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, _imp->compositingOperator = new ComboBox(_imp->firstSettingsRow); QObject::connect( _imp->compositingOperator, SIGNAL(currentIndexChanged(int)), this, SLOT(onCompositingOperatorIndexChanged(int)) ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->compositingOperator->setFixedWidth(fm.horizontalAdvance( QString::fromUtf8("W-OnionSkin") ) + 3 * DROP_DOWN_ICON_SIZE); -#else - _imp->compositingOperator->setFixedWidth(fm.width( QString::fromUtf8("W-OnionSkin") ) + 3 * DROP_DOWN_ICON_SIZE); -#endif _imp->compositingOperator->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); _imp->compositingOperator->setToolTip( _imp->compositingOperatorLabel->toolTip() ); _imp->compositingOperator->addItem( tr(" - "), QIcon(), QKeySequence(), tr("No wipe or composite: A") ); @@ -419,11 +399,7 @@ ViewerTab::ViewerTab(const std::list & existingNodesContext, _imp->secondInputImage = new ComboBox(_imp->firstSettingsRow); _imp->secondInputImage->setToolTip( _imp->secondInputLabel->toolTip() ); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _imp->secondInputImage->setFixedWidth(fm.horizontalAdvance( QString::fromUtf8("ColorCorrect1") ) + 3 * DROP_DOWN_ICON_SIZE); -#else - _imp->secondInputImage->setFixedWidth(fm.width( QString::fromUtf8("ColorCorrect1") ) + 3 * DROP_DOWN_ICON_SIZE); -#endif _imp->secondInputImage->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); _imp->secondInputImage->addItem( QString::fromUtf8(" - ") ); QObject::connect( _imp->secondInputImage, SIGNAL(currentIndexChanged(QString)), this, SLOT(onSecondInputNameChanged(QString)) ); diff --git a/Gui/ViewerTab10.cpp b/Gui/ViewerTab10.cpp index 3832f4c2fc..b4e8e1b8b0 100644 --- a/Gui/ViewerTab10.cpp +++ b/Gui/ViewerTab10.cpp @@ -858,18 +858,10 @@ ViewerTab::keyPressEvent(QKeyEvent* e) } else if ( isKeybind(kShortcutGroupViewer, kShortcutIDActionHideTop, modifiers, key) ) { toggleTopToolbarVisibility(); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomIn, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, 120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), 120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else if ( isKeybind(kShortcutGroupGlobal, kShortcutIDActionZoomOut, Qt::NoModifier, key) ) { // zoom in/out doesn't care about modifiers -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) QWheelEvent e(mapFromGlobal( QCursor::pos() ), QCursor::pos(), QPoint(), QPoint(0, -120), Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false); -#else - QWheelEvent e(mapFromGlobal( QCursor::pos() ), -120, Qt::NoButton, Qt::NoModifier); // one wheel click = +-120 delta -#endif wheelEvent(&e); } else if (key == Qt::Key_Escape) { _imp->viewer->s_selectionCleared(); diff --git a/PythonBin/PythonBin.pro b/PythonBin/PythonBin.pro index 7b43e384af..9783a482aa 100644 --- a/PythonBin/PythonBin.pro +++ b/PythonBin/PythonBin.pro @@ -17,9 +17,8 @@ # along with Natron. If not, see # ***** END LICENSE BLOCK ***** -QT += core network +QT += core network concurrent QT -= gui -greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent TARGET = natron-python CONFIG += console diff --git a/Renderer/Renderer.pro b/Renderer/Renderer.pro index d225ee8c79..19a27af8bc 100644 --- a/Renderer/Renderer.pro +++ b/Renderer/Renderer.pro @@ -17,9 +17,8 @@ # along with Natron. If not, see # ***** END LICENSE BLOCK ***** -QT += core network +QT += core network concurrent QT -= gui -greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent TARGET = NatronRenderer CONFIG += console diff --git a/Tests/KnobFile_Test.cpp b/Tests/KnobFile_Test.cpp index c5d2352fe4..2a41d9e4f7 100644 --- a/Tests/KnobFile_Test.cpp +++ b/Tests/KnobFile_Test.cpp @@ -30,9 +30,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include -#endif #include "Engine/FileSystemModel.h" #include "Engine/StandardPaths.h" @@ -54,11 +52,7 @@ TEST(SequenceParsing, TestHashCharacter) { ///create temporary files as a sequence and try to read that sequence. QString tempPath = StandardPaths::writableLocation(StandardPaths::eStandardLocationTemp); QDir dir(tempPath); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( QRandomGenerator::global()->generate() ); -#else - QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( qrand() ); -#endif dir.mkpath( QString::fromUtf8(".") ); dir.mkdir(dirName); @@ -229,11 +223,7 @@ TEST(SequenceParsing, TestPrintfLikeSyntax) { ///create temporary files as a sequence and try to read that sequence. QString tempPath = StandardPaths::writableLocation(StandardPaths::eStandardLocationTemp); QDir dir(tempPath); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( QRandomGenerator::global()->generate() ); -#else - QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( qrand() ); -#endif dir.mkpath( QString::fromUtf8(".") ); dir.mkdir(dirName); dir.cd(dirName); @@ -341,11 +331,7 @@ TEST(SequenceParsing, TestViews) { ///create temporary files as a sequence and try to read that sequence. QString tempPath = StandardPaths::writableLocation(StandardPaths::eStandardLocationTemp); QDir dir(tempPath); -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( QRandomGenerator::global()->generate() ); -#else - QString dirName = QString::fromUtf8("NatronUnitTest") + QString::number( qrand() ); -#endif dir.mkpath( QString::fromUtf8(".") ); dir.mkdir(dirName); diff --git a/Tests/Tests.pro b/Tests/Tests.pro index af421fc5c0..32b1dca9a1 100644 --- a/Tests/Tests.pro +++ b/Tests/Tests.pro @@ -23,8 +23,7 @@ CONFIG -= app_bundle CONFIG += moc rcc CONFIG += boost boost-serialization-lib opengl qt cairo python shiboken pyside CONFIG += static-gui static-engine static-host-support static-breakpadclient static-libmv static-openmvg static-ceres static-libtess -QT += gui core opengl network -greaterThan(QT_MAJOR_VERSION, 4): QT += widgets concurrent +QT += gui core opengl network widgets concurrent CONFIG += openmvg-flags glad-flags diff --git a/libs/OpenFX b/libs/OpenFX index d5db5d0483..2303ff811b 160000 --- a/libs/OpenFX +++ b/libs/OpenFX @@ -1 +1 @@ -Subproject commit d5db5d0483faab6a85c104b436f7460897a90aa8 +Subproject commit 2303ff811bee3ffe085287602f684fe5fe5357e0 diff --git a/tools/MINGW-packages/build.sh b/tools/MINGW-packages/build.sh index 4c46741f41..84a6481d68 100644 --- a/tools/MINGW-packages/build.sh +++ b/tools/MINGW-packages/build.sh @@ -2,9 +2,6 @@ set -e -x CWD=`pwd` PKGS=" -mingw-w64-qt4 -mingw-w64-shiboken -mingw-w64-pyside mingw-w64-imath mingw-w64-openexr mingw-w64-libraw-gpl2 diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD b/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD deleted file mode 100644 index e6b8a1f5be..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD +++ /dev/null @@ -1,88 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=opencolorio -pkgbase=mingw-w64-${_realname}-git -pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -# we do not support the new OCIO v2 GPU API (which appeared at commit 809) -gitcommit=a80857f7 -pkgver=808.a80857f7 -pkgrel=5 -pkgdesc="A color management framework for visual effects and animation (mingw-w64)" -arch=('any') -url="http://opencolorio.org" -license=('BSD') -provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") -conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") -depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-glew" - "${MINGW_PACKAGE_PREFIX}-lcms2" - "${MINGW_PACKAGE_PREFIX}-tinyxml" - "${MINGW_PACKAGE_PREFIX}-yaml-cpp") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "git") -options=('strip') -source=("${_realname}"::"git+https://github.com/imageworks/OpenColorIO.git#commit=${gitcommit}" - #${_realname}-${pkgver}.tar.gz::https://github.com/imageworks/OpenColorIO/tarball/v${pkgver}.tar.gz - mingw-w64.patch - fix-redefinitions.patch - msvc-flags.patch - declspec-typo.patch - mingw-no-dupenv_s.patch - detect-mingw-python.patch) -sha256sums=('SKIP' - '071378804d6f54a59c988d6d749b3b5e1e12a64bc1ed1558856c7b40a39782bc' - '802b66e1e52c5b4341afbdcc31211917b1223fb2db111c49603bc415c29d4b91' - '010780ed9be44560684459690eca690de53a70bf822eb70b4e76b3f3df4991ae' - 'e05535790881bdd719084b1da131f2c0a7d858ab6a22c2e9e061eaf451383ea1' - '3251ea540eae1fb0648248f0c60179765956003a1c4adbf6c88e7476171a8702' - '330a81ce83c32bfffe214b3404c5001585b9113a0e58572ea09bb67960a80ced') - -pkgver() { - cd "${srcdir}/${_realname}" - printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" -} - -prepare() { - cd ${_realname} - patch -p1 -i ${srcdir}/mingw-w64.patch - patch -p1 -i ${srcdir}/fix-redefinitions.patch - patch -p1 -i ${srcdir}/msvc-flags.patch - patch -p1 -i ${srcdir}/declspec-typo.patch - patch -p1 -i ${srcdir}/mingw-no-dupenv_s.patch - patch -p1 -i ${srcdir}/detect-mingw-python.patch -} - -build() { - [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" - mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DGLEW_INCLUDES=${MINGW_PREFIX}/include \ - -DGLEW_LIBRARIES=${MINGW_PREFIX}/lib/libglew32.dll.a \ - -DUSE_EXTERNAL_TINYXML=ON \ - -DUSE_EXTERNAL_YAML=ON \ - -DUSE_EXTERNAL_LCMS=ON \ - -DOCIO_USE_BOOST_PTR=ON \ - -DOCIO_BUILD_PYGLUE=ON \ - -DOCIO_BUILD_TRUELIGHT=OFF \ - -DOCIO_BUILD_APPS=OFF \ - -DOCIO_BUILD_NUKE=OFF \ - -DOCIO_BUILD_DOCS=OFF \ - -DOCIO_BUILD_TESTS=OFF \ - -DOCIO_BUILD_GPU_TESTS=OFF \ - -DOCIO_BUILD_PYGLUE=OFF \ - -DOCIO_BUILD_JNIGLUE=OFF \ - ../${_realname} - - make -} - -package() { - cd build-${MINGW_CHOST} - make DESTDIR=${pkgdir} install - install -Dm644 ${srcdir}/${_realname}/LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE -} diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/declspec-typo.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/declspec-typo.patch deleted file mode 100644 index 6dc3b895c4..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/declspec-typo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- opencolorio/src/pyglue/PyUtil.h.orig 2018-01-10 07:42:22.636299200 +0300 -+++ opencolorio/src/pyglue/PyUtil.h 2018-01-10 07:44:50.222168600 +0300 -@@ -54,7 +54,7 @@ - #endif - - #ifdef WIN32 -- #define EXPORT_SYMBOL _declspec(dllexport) -+ #define EXPORT_SYMBOL __declspec(dllexport) - #else - #define EXPORT_SYMBOL - #endif diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/detect-mingw-python.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/detect-mingw-python.patch deleted file mode 100644 index 428cede8d3..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/detect-mingw-python.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- opencolorio/share/cmake/OCIOMacros.cmake.orig 2018-01-10 08:13:42.931606200 +0300 -+++ opencolorio/share/cmake/OCIOMacros.cmake 2018-01-10 08:15:55.689556300 +0300 -@@ -203,7 +203,7 @@ - set(PYTHON_OK NO) - endif() - -- if(WIN32) -+ if(MSVC) - # LIBPL does not exist on Windows, and no variable exist - set(library_cmd "from distutils import sysconfig; print '%s/libs' % sysconfig.get_config_var('prefix')") - else() -@@ -238,14 +238,14 @@ - # Respect Python major/minor version, and UCS version (unicode - # content system). E.g install into "lib/python2.6/ucs4/site-packages" - # Windows & *nix does not use the same path, refer to https://docs.python.org/2/install/ -- if(WIN32) -+ if(MSVC) - set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/${PYTHON_UCS}/site-packages") - else() - set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/python${PYTHON_VERSION}/${PYTHON_UCS}/site-packages") - endif() - else() - # Ignore UCS value and install into lib/python2.6/site-packages dir -- if(WIN32) -+ if(MSVC) - set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/site-packages") - else() - set(PYTHON_VARIANT_PATH "lib${LIB_SUFFIX}/python${PYTHON_VERSION}/site-packages") diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/fix-redefinitions.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/fix-redefinitions.patch deleted file mode 100644 index 8fc922dafb..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/fix-redefinitions.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- opencolorio/src/core/Platform.h.orig 2013-12-28 00:59:03.030200000 +0400 -+++ opencolorio/src/core/Platform.h 2013-12-28 01:00:20.687000000 +0400 -@@ -101,7 +101,9 @@ - // missing functions on Windows - #ifdef WINDOWS - #define snprintf sprintf_s -+#ifndef __MINGW64_VERSION_MAJOR - #define strtok_r strtok_s -+#endif - #define sscanf sscanf_s - #define putenv _putenv - typedef __int64 FilePos; diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-no-dupenv_s.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-no-dupenv_s.patch deleted file mode 100644 index d29a9b8dd0..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-no-dupenv_s.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- opencolorio/src/core/Platform.cpp.orig 2018-01-10 07:38:56.478513300 +0300 -+++ opencolorio/src/core/Platform.cpp 2018-01-10 07:39:05.438364800 +0300 -@@ -18,7 +18,7 @@ - // - void getenv (const char* name, std::string& value) - { --#ifdef WINDOWS -+#ifdef _MSC_VER - // To remove the security compilation warning, the _dupenv_s method - // must be used (instead of the getenv). The improvement is that - // the buffer length is now under control to mitigate buffer overflow attacks. diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-w64.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-w64.patch deleted file mode 100644 index e0970773c7..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/mingw-w64.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- mingw-w64-i686-opencolorio-1.0.9/CMakeLists.txt.orig 2013-12-27 22:36:16.348200000 +0400 -+++ mingw-w64-i686-opencolorio-1.0.9/CMakeLists.txt 2013-12-27 22:43:09.892800000 +0400 -@@ -37,7 +37,7 @@ - option(OCIO_PYGLUE_SONAME "If ON, soname/soversion will be set for Python module library" OFF) - option(OCIO_PYGLUE_LIB_PREFIX "If ON, prefix the Python module with 'lib'" OFF) - --if(UNIX AND NOT APPLE) -+if(UNIX OR MINGW AND NOT APPLE) - option(USE_EXTERNAL_YAML "Use system installed yaml-cpp library." OFF) - option(USE_EXTERNAL_TINYXML "Use system installed tinyxml library." OFF) - option(USE_EXTERNAL_LCMS "Use system install lcms2 library." OFF) -@@ -219,7 +219,11 @@ - ## => great news when build staticaly since we do not want another client project have to link also with tinyxml when he want to use this project - ## => could be problematic if the client project use another version of tinyxml... In this case build tinyxml as shared lib with all projects could be a solution - ## => TODO: so maybe provide a simple cmake way to build 3rdParty as shared and auto install with this project ? -- set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-DTIXML_USE_STL -fPIC -fvisibility-inlines-hidden -fvisibility=hidden") -+ if (MINGW) -+ set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-DTIXML_USE_STL -fvisibility-inlines-hidden -fvisibility=hidden") -+ else() -+ set_target_properties(TINYXML_LIB PROPERTIES COMPILE_FLAGS "-DTIXML_USE_STL -fPIC -fvisibility-inlines-hidden -fvisibility=hidden") -+ endif() - add_definitions(-DTIXML_USE_STL) ## needed to build correctly, and also need to be propagated in child projects (client projects) - list(APPEND EXTERNAL_OBJECTS $) - else() -@@ -420,7 +424,7 @@ - messageonce("SSE Optimizations: ${OCIO_USE_SSE}") - - if(OCIO_USE_SSE) -- if(WIN32) -+ if(MSVC) - # SSE instructions are automatically compiled into 64-bit applications so enabling the option is redundant and - # actually produces an unknown option warning in Visual Studio. - if(NOT CMAKE_CL_64) ---- opencolorio/src/core/CMakeLists.txt.orig 2017-09-17 22:33:47.446262300 +0300 -+++ opencolorio/src/core/CMakeLists.txt 2017-09-17 22:34:26.962522500 +0300 -@@ -75,7 +75,7 @@ - VERSION ${OCIO_VERSION} - SOVERSION ${SOVERSION}) - -- install(TARGETS OpenColorIO_STATIC EXPORT OpenColorIO ARCHIVE DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib/static) -+ install(TARGETS OpenColorIO_STATIC EXPORT OpenColorIO ARCHIVE DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/lib) - endif() - - macro(target_link_OCIO target) diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/msvc-flags.patch b/tools/MINGW-packages/mingw-w64-opencolorio-git/msvc-flags.patch deleted file mode 100644 index 35c20c73aa..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/msvc-flags.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- opencolorio/src/core/CMakeLists.txt.orig 2018-01-09 17:22:14.511093200 +0300 -+++ opencolorio/src/core/CMakeLists.txt 2018-01-09 17:22:19.297367000 +0300 -@@ -48,7 +48,7 @@ - target_link_libraries(OpenColorIO ${EXTERNAL_LIBRARIES}) - endif() - -- if(WIN32) -+ if(MSVC) - # Mute a design issue where the Exception public class inherits - # from a STL Exception. STL classes are never supposed to - # be exported among different dynamic libraries. ---- opencolorio/src/core_gpu_tests/CMakeLists.txt.orig 2018-01-09 17:22:14.511093200 +0300 -+++ opencolorio/src/core_gpu_tests/CMakeLists.txt 2018-01-09 17:22:19.297367000 +0300 -@@ -38,7 +38,9 @@ - # Mute a design issue where the Exception public class inherits - # from a STL Exception. STL classes are never supposed to - # be exported among different dynamic libraries. -+ if(MSVC) - set(EXTERNAL_COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS} /wd4275") -+ endif() - - endif() - ---- opencolorio/src/pyglue/CMakeLists.txt.orig 2018-01-09 17:22:56.163475600 +0300 -+++ opencolorio/src/pyglue/CMakeLists.txt 2018-01-09 17:23:01.249766500 +0300 -@@ -13,7 +13,7 @@ - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing -Wno-missing-field-initializers") - endif() - --if(WIN32) -+if(MSVC) - # Mute a design issue where the Exception public class inherits - # from a STL Exception. STL classes are never supposed to - # be exported among different dynamic libraries. diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/ocio.diff b/tools/MINGW-packages/mingw-w64-opencolorio-git/ocio.diff deleted file mode 100644 index 737f0a547f..0000000000 --- a/tools/MINGW-packages/mingw-w64-opencolorio-git/ocio.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD b/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD -index 12804f5ee..5283dfa13 100644 ---- a/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD -+++ b/tools/MINGW-packages/mingw-w64-opencolorio-git/PKGBUILD -@@ -55,7 +55,7 @@ prepare() { - - build() { - [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" -- mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST} -+ mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST} - - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ -@@ -75,7 +75,7 @@ build() { - -DOCIO_BUILD_TESTS=OFF \ - -DOCIO_BUILD_GPU_TESTS=OFF \ - -DOCIO_BUILD_PYGLUE=OFF \ -- -DOCIO_BUILD_JNIGLUE=OFF \ -+ -DOCIO_BUILD_JNIGLUE=OFF \ - ../${_realname} - - make diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0001-mingw-w64-fix.patch b/tools/MINGW-packages/mingw-w64-openexr25/0001-mingw-w64-fix.patch deleted file mode 100644 index 130c26fdb5..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0001-mingw-w64-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/OpenEXR/IlmImf/ImfSimd.h.orig 2013-11-25 23:49:53.000000000 +0400 -+++ b/OpenEXR/IlmImf/ImfSimd.h 2013-12-28 11:32:14.071000000 +0400 -@@ -44,8 +44,10 @@ - - - // GCC and Visual Studio SSE2 compiler flags --#if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE) -+#ifndef __MINGW64_VERSION_MAJOR -+ #if defined __SSE2__ || (_MSC_VER >= 1300 && !_M_CEE_PURE) - #define IMF_HAVE_SSE2 1 -+ #endif - #endif - - diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0002-openexr-2.1.0-headers.patch b/tools/MINGW-packages/mingw-w64-openexr25/0002-openexr-2.1.0-headers.patch deleted file mode 100644 index b8048fb238..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0002-openexr-2.1.0-headers.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 90de52ef5856c276848dc2c85dd4985f9e2639f4 Mon Sep 17 00:00:00 2001 -From: Stephen -Date: Wed, 24 Feb 2016 14:32:49 -0600 -Subject: [PATCH] Add missing OpenEXR headers to CMake install rule - ---- - IlmImf/CMakeLists.txt | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - -diff --git a/OpenEXR/IlmImf/CMakeLists.txt b/OpenEXR/IlmImf/CMakeLists.txt -index 18d90ed..11f7a1a 100644 ---- a/OpenEXR/IlmImf/CMakeLists.txt -+++ b/OpenEXR/IlmImf/CMakeLists.txt -@@ -350,6 +350,29 @@ INSTALL ( FILES - ImfDeepImageState.h - ImfDeepImageStateAttribute.h - ImfFloatVectorAttribute.h -+ ImfAutoArray.h -+ ImfCheckedArithmetic.h -+ ImfCompressor.h -+ ImfDwaCompressor.h -+ ImfDwaCompressorSimd.h -+ ImfFastHuf.h -+ ImfInputPartData.h -+ ImfInputStreamMutex.h -+ ImfOptimizedPixelReading.h -+ ImfOutputPartData.h -+ ImfOutputStreamMutex.h -+ ImfPizCompressor.h -+ ImfPxr24Compressor.h -+ ImfRle.h -+ ImfRleCompressor.h -+ ImfScanLineInputFile.h -+ ImfSimd.h -+ ImfStdIO.h -+ ImfSystemSpecific.h -+ ImfTiledMisc.h -+ ImfTileOffsets.h -+ ImfZip.h -+ ImfZipCompressor.h - DEPENDENCIES - OpenEXR::Config - IlmBase::Iex diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0005-fix-dirs-in-pkgconfig.patch b/tools/MINGW-packages/mingw-w64-openexr25/0005-fix-dirs-in-pkgconfig.patch deleted file mode 100644 index 5d1db7e2cd..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0005-fix-dirs-in-pkgconfig.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- openexr-2.4.0/IlmBase/IlmBase.pc.in.orig 2019-10-30 09:49:33.334966000 +0300 -+++ openexr-2.4.0/IlmBase/IlmBase.pc.in 2019-10-30 09:53:46.375320200 +0300 -@@ -4,9 +4,9 @@ - ## - - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ -+exec_prefix=${prefix}/@exec_prefix@ -+libdir=${prefix}/@libdir@ -+includedir=${prefix}/@includedir@ - libsuffix=@LIB_SUFFIX_DASH@ - Name: IlmBase - Description: Base math and exception libraries ---- openexr-2.4.0/OpenEXR/OpenEXR.pc.in.orig 2019-10-30 09:54:34.675387800 +0300 -+++ openexr-2.4.0/OpenEXR/OpenEXR.pc.in 2019-10-30 09:54:58.695421500 +0300 -@@ -4,10 +4,10 @@ - ## - - prefix=@prefix@ --exec_prefix=@exec_prefix@ --libdir=@libdir@ --includedir=@includedir@ --OpenEXR_includedir=@includedir@/OpenEXR -+exec_prefix=${prefix}/@exec_prefix@ -+libdir=${prefix}/@libdir@ -+includedir=${prefix}/@includedir@ -+OpenEXR_includedir=${prefix}/@includedir@/OpenEXR - libsuffix=@LIB_SUFFIX_DASH@ - - Name: OpenEXR diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0006-cmake-soversion.patch b/tools/MINGW-packages/mingw-w64-openexr25/0006-cmake-soversion.patch deleted file mode 100644 index b393b9411f..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0006-cmake-soversion.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- openexr-2.4.0/IlmBase/config/IlmBaseSetup.cmake.orig 2019-10-29 15:34:57.792136700 +0300 -+++ openexr-2.4.0/IlmBase/config/IlmBaseSetup.cmake 2019-10-29 15:35:30.172182000 +0300 -@@ -31,7 +31,7 @@ - set(ILMBASE_PACKAGE_NAME "IlmBase ${ILMBASE_VERSION}" CACHE STRING "Public string / label for displaying package") - - # Whether to generate and install a pkg-config file IlmBase.pc on --if(WIN32) -+if(MSVC) - option(ILMBASE_INSTALL_PKG_CONFIG "Install IlmBase.pc file" OFF) - else() - option(ILMBASE_INSTALL_PKG_CONFIG "Install IlmBase.pc file" ON) ---- openexr-2.4.0/IlmBase/config/LibraryDefine.cmake.orig 2019-10-29 15:37:25.812343900 +0300 -+++ openexr-2.4.0/IlmBase/config/LibraryDefine.cmake 2019-10-29 15:38:12.164408900 +0300 -@@ -84,7 +84,9 @@ - ) - endif() - set_target_properties(${libname} PROPERTIES -- OUTPUT_NAME "${libname}${ILMBASE_LIB_SUFFIX}" -+ OUTPUT_NAME "${libname}" -+ RUNTIME_OUTPUT_NAME "${libname}${ILMBASE_LIB_SUFFIX}" -+ ARCHIVE_OUTPUT_NAME "${libname}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" - ) - add_library(${PROJECT_NAME}::${libname} ALIAS ${libname}) ---- openexr-2.4.0/OpenEXR/config/OpenEXRSetup.cmake.orig 2019-10-29 15:39:38.034529100 +0300 -+++ openexr-2.4.0/OpenEXR/config/OpenEXRSetup.cmake 2019-10-29 15:39:43.874537300 +0300 -@@ -21,7 +21,7 @@ - set(OPENEXR_PACKAGE_NAME "IlmBase ${ILMBASE_VERSION}" CACHE STRING "Public string / label for displaying package") - - # Whether to generate and install a pkg-config file OpenEXR.pc --if (WIN32) -+if (MSVC) - option(OPENEXR_INSTALL_PKG_CONFIG "Install OpenEXR.pc file" OFF) - else() - option(OPENEXR_INSTALL_PKG_CONFIG "Install OpenEXR.pc file" ON) ---- openexr-2.4.0/oPENexr/config/LibraryDefine.cmake.orig 2019-10-29 15:38:56.304470700 +0300 -+++ openexr-2.4.0/oPENexr/config/LibraryDefine.cmake 2019-10-29 15:39:22.864507900 +0300 -@@ -78,7 +78,9 @@ - ) - endif() - set_target_properties(${libname} PROPERTIES -- OUTPUT_NAME "${libname}${OPENEXR_LIB_SUFFIX}" -+ OUTPUT_NAME "${libname}" -+ RUNTIME_OUTPUT_NAME "${libname}${OPENEXR_LIB_SUFFIX}" -+ ARCHIVE_OUTPUT_NAME "${libname}" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" - ) - add_library(${PROJECT_NAME}::${libname} ALIAS ${libname}) ---- openexr-2.4.0/IlmBase/IlmBase.pc.in.orig 2019-10-29 16:09:29.326136000 +0300 -+++ openexr-2.4.0/IlmBase/IlmBase.pc.in 2019-10-29 16:09:50.616346500 +0300 -@@ -13,5 +13,5 @@ - Version: @ILMBASE_VERSION@ - Requires: - Conflicts: --Libs: -L${libdir} -lImath${libsuffix} -lHalf${libsuffix} -lIex${libsuffix} -lIexMath${libsuffix} -lIlmThread${libsuffix} @PTHREAD_LIBS@ -+Libs: -L${libdir} -lImath -lHalf -lIex -lIexMath -lIlmThread @PTHREAD_LIBS@ - Cflags: @PTHREAD_CFLAGS@ -I${includedir} -I${includedir}/OpenEXR ---- openexr-2.4.0/OpenEXR/OpenEXR.pc.in.orig 2019-10-29 16:10:13.784661600 +0300 -+++ openexr-2.4.0/OpenEXR/OpenEXR.pc.in 2019-10-29 16:10:17.744888100 +0300 -@@ -14,7 +14,7 @@ - Description: OpenEXR image library - Version: @OPENEXR_VERSION@ - --Libs: -L${libdir} -lIlmImf${libsuffix} -+Libs: -L${libdir} -lIlmImf - Cflags: -I${OpenEXR_includedir} - Requires: IlmBase - Libs.private: -lz diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0009-win-dwalookups.patch b/tools/MINGW-packages/mingw-w64-openexr25/0009-win-dwalookups.patch deleted file mode 100644 index 57dfced275..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0009-win-dwalookups.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/OpenEXR/IlmImf/dwaLookups.cpp -+++ b/OpenEXR/IlmImf/dwaLookups.cpp -@@ -42,6 +42,9 @@ - #include - #include - -+#ifdef _WIN32 -+#include -+#endif - #include - - #ifdef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0012-exports.patch b/tools/MINGW-packages/mingw-w64-openexr25/0012-exports.patch deleted file mode 100644 index d832f87e52..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0012-exports.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -Naur a/OpenEXR/IlmImf/ImfGenericInputFile.h b/OpenEXR/IlmImf/ImfGenericInputFile.h ---- a/OpenEXR/IlmImf/ImfGenericInputFile.h 2018-11-04 22:55:11.645972400 +0300 -+++ b/OpenEXR/IlmImf/ImfGenericInputFile.h 2018-11-04 22:55:48.038053900 +0300 -@@ -42,16 +42,13 @@ - - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - --class GenericInputFile -+class IMF_EXPORT GenericInputFile - { - public: -- IMF_EXPORT - virtual ~GenericInputFile(); - - protected: -- IMF_EXPORT - GenericInputFile(); -- IMF_EXPORT - void readMagicNumberAndVersionField(OPENEXR_IMF_INTERNAL_NAMESPACE::IStream& is, int& version); - }; - -diff -Naur a/OpenEXR/IlmImf/ImfGenericOutputFile.h b/OpenEXR/IlmImf/ImfGenericOutputFile.h ---- a/OpenEXR/IlmImf/ImfGenericOutputFile.h 2018-11-04 22:55:07.805752800 +0300 -+++ b/OpenEXR/IlmImf/ImfGenericOutputFile.h 2018-11-04 22:56:00.851786800 +0300 -@@ -45,18 +45,14 @@ - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - --class GenericOutputFile -+class IMF_EXPORT GenericOutputFile - { - public: -- IMF_EXPORT - virtual ~GenericOutputFile(); - - protected: -- IMF_EXPORT - GenericOutputFile(); -- IMF_EXPORT - void writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, const Header& header); -- IMF_EXPORT - void writeMagicNumberAndVersionField (OPENEXR_IMF_INTERNAL_NAMESPACE::OStream& os, const Header * headers, int parts); - - }; -diff -Naur a/OpenEXR/IlmImf/ImfName.h b/OpenEXR/IlmImf/ImfName.h ---- a/OpenEXR/IlmImf/ImfName.h 2018-08-10 04:34:58.000000000 +0300 -+++ b/OpenEXR/IlmImf/ImfName.h 2018-11-04 22:52:03.670220800 +0300 -@@ -51,7 +51,7 @@ - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - --class Name -+class IMF_EXPORT Name - { - public: - -@@ -59,9 +59,7 @@ - // Constructors - //------------- - -- IMF_EXPORT - Name (); -- IMF_EXPORT - Name (const char text[]); - - -@@ -69,7 +67,6 @@ - // Assignment operator - //-------------------- - -- IMF_EXPORT - Name & operator = (const char text[]); - - -diff -Naur a/OpenEXR/IlmImf/ImfPreviewImage.h b/OpenEXR/IlmImf/ImfPreviewImage.h ---- a/OpenEXR/IlmImf/ImfPreviewImage.h 2018-08-10 04:34:58.000000000 +0300 -+++ b/OpenEXR/IlmImf/ImfPreviewImage.h 2018-11-04 22:39:19.052487200 +0300 -@@ -52,7 +52,7 @@ - OPENEXR_IMF_INTERNAL_NAMESPACE_HEADER_ENTER - - --struct PreviewRgba -+struct IMF_EXPORT PreviewRgba - { - unsigned char r; // Red, green and blue components of - unsigned char g; // the pixel's color; intensity is -@@ -70,7 +70,7 @@ - }; - - --class PreviewImage -+class IMF_EXPORT PreviewImage - { - public: - -@@ -87,7 +87,6 @@ - // - //-------------------------------------------------------------------- - -- IMF_EXPORT - PreviewImage (unsigned int width = 0, - unsigned int height = 0, - const PreviewRgba pixels[] = 0); -@@ -96,12 +95,9 @@ - // Copy constructor, destructor and assignment operator - //----------------------------------------------------- - -- IMF_EXPORT - PreviewImage (const PreviewImage &other); -- IMF_EXPORT - ~PreviewImage (); - -- IMF_EXPORT - PreviewImage & operator = (const PreviewImage &other); - - -diff -Naur a/OpenEXR/IlmImf/ImfStdIO.h b/OpenEXR/IlmImf/ImfStdIO.h ---- a/OpenEXR/IlmImf/ImfStdIO.h 2018-11-04 22:26:43.723504100 +0300 -+++ b/OpenEXR/IlmImf/ImfStdIO.h 2018-11-04 22:43:25.795600100 +0300 -@@ -58,7 +58,7 @@ - // class OPENEXR_IMF_INTERNAL_NAMESPACE::IStream based on class std::ifstream - //------------------------------------------- - --class StdIFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::IStream -+class IMF_EXPORT StdIFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::IStream - { - public: - -@@ -67,7 +67,6 @@ - // The destructor will close the file. - //------------------------------------------------------- - -- IMF_EXPORT - StdIFStream (const char fileName[]); - - -@@ -77,20 +76,14 @@ - // will not close the std::ifstream. - //--------------------------------------------------------- - -- IMF_EXPORT - StdIFStream (std::ifstream &is, const char fileName[]); - - -- IMF_EXPORT - virtual ~StdIFStream (); - -- IMF_EXPORT - virtual bool read (char c[/*n*/], int n); -- IMF_EXPORT - virtual Int64 tellg (); -- IMF_EXPORT - virtual void seekg (Int64 pos); -- IMF_EXPORT - virtual void clear (); - - private: -@@ -105,26 +98,19 @@ - // OPENEXR_IMF_INTERNAL_NAMESPACE::IStream, based on class std::istringstream - //------------------------------------------------ - --class StdISStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::IStream -+class IMF_EXPORT StdISStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::IStream - { - public: - -- IMF_EXPORT - StdISStream (); - -- IMF_EXPORT - virtual bool read (char c[/*n*/], int n); -- IMF_EXPORT - virtual Int64 tellg (); -- IMF_EXPORT - virtual void seekg (Int64 pos); -- IMF_EXPORT - virtual void clear (); - -- IMF_EXPORT - std::string str () const; - -- IMF_EXPORT - void str (const std::string &s); - - private: -@@ -139,7 +125,7 @@ - // class OPENEXR_IMF_INTERNAL_NAMESPACE::OStream based on class std::ofstream - //------------------------------------------- - --class StdOFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream -+class IMF_EXPORT StdOFStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream - { - public: - -@@ -148,7 +134,6 @@ - // The destructor will close the file. - //------------------------------------------------------- - -- IMF_EXPORT - StdOFStream (const char fileName[]); - - -@@ -158,18 +143,13 @@ - // will not close the std::ofstream. - //--------------------------------------------------------- - -- IMF_EXPORT - StdOFStream (std::ofstream &os, const char fileName[]); - - -- IMF_EXPORT - virtual ~StdOFStream (); - -- IMF_EXPORT - virtual void write (const char c[/*n*/], int n); -- IMF_EXPORT - virtual Int64 tellp (); -- IMF_EXPORT - virtual void seekp (Int64 pos); - - private: -@@ -184,21 +164,16 @@ - // OPENEXR_IMF_INTERNAL_NAMESPACE::OStream, based on class std::ostringstream - //------------------------------------------------ - --class StdOSStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream -+class IMF_EXPORT StdOSStream: public OPENEXR_IMF_INTERNAL_NAMESPACE::OStream - { - public: - -- IMF_EXPORT - StdOSStream (); - -- IMF_EXPORT - virtual void write (const char c[/*n*/], int n); -- IMF_EXPORT - virtual Int64 tellp (); -- IMF_EXPORT - virtual void seekp (Int64 pos); - -- IMF_EXPORT - std::string str () const; - - private: diff --git a/tools/MINGW-packages/mingw-w64-openexr25/0013-no-py2.patch b/tools/MINGW-packages/mingw-w64-openexr25/0013-no-py2.patch deleted file mode 100644 index 56bb3fcc36..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/0013-no-py2.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- openexr-2.4.0/PyIlmBase/CMakeLists.txt.orig 2019-09-18 03:02:06.000000000 +0200 -+++ openexr-2.4.0/PyIlmBase/CMakeLists.txt 2019-12-08 14:03:14.054387900 +0100 -@@ -38,7 +38,7 @@ - endif() - - # now determine which (or both), and compile for both --find_package(Python2 COMPONENTS Interpreter Development) -+#find_package(Python2 COMPONENTS Interpreter Development) - find_package(Python3 COMPONENTS Interpreter Development) - if(TARGET Python2::Python AND TARGET Python3::Python) - message(NOTICE ": Found Python ${Python2_VERSION} and ${Python3_VERSION}") diff --git a/tools/MINGW-packages/mingw-w64-openexr25/PKGBUILD b/tools/MINGW-packages/mingw-w64-openexr25/PKGBUILD deleted file mode 100644 index 1003783075..0000000000 --- a/tools/MINGW-packages/mingw-w64-openexr25/PKGBUILD +++ /dev/null @@ -1,124 +0,0 @@ -# Maintainer: Alexey Pavlov - -_realname=openexr -pkgbase=mingw-w64-${_realname} -pkgname=("${MINGW_PACKAGE_PREFIX}-ilmbase" - "${MINGW_PACKAGE_PREFIX}-${_realname}" - #"${MINGW_PACKAGE_PREFIX}-pyilmbase" - ) -pkgver=2.5.8 -pkgrel=99.2 -pkgdesc="Openexr library for EXR images (mingw-w64)" -arch=('any') -url="https://www.openexr.com/" -license=("custom") -makedepends=("${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-boost" - #"${MINGW_PACKAGE_PREFIX}-fltk" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python" - #"${MINGW_PACKAGE_PREFIX}-python-numpy" - ) -options=('staticlibs' 'strip') -source=(${_realname}-${pkgver}.tar.gz::https://github.com/openexr/openexr/archive/v${pkgver}.tar.gz - 0001-mingw-w64-fix.patch - 0002-openexr-2.1.0-headers.patch - 0005-fix-dirs-in-pkgconfig.patch - 0006-cmake-soversion.patch - 0009-win-dwalookups.patch - 0012-exports.patch - 0013-no-py2.patch) -sha256sums=('db261a7fcc046ec6634e4c5696a2fc2ce8b55f50aac6abe034308f54c8495f55' - '68bedb3a4acc6f62b1486c7c47c9025f5ce4131468e17445f0c716545ddd00c1' - '460dcfd86b407241382ed4ba5a003ae251c9fdce68e7cfdea021b09898ad2705' - 'fba4e95d6921bcd253c8c644063b4c1334c84761a2a2232590d442ca81f8d7cd' - '313b0c98abdd792b8213ec9685a5a7b095ec69faa528f6fd0946f23576b6ef07' - '2ca841425ae676f75fa714a16f0124272224147fe40ea507ccc4bf74477f51ab' - 'da9e92f066e9b45583f2b12678a9f49fcbb7fa1f06805d9b472d39fa5f18a629' - '47e4e068439a1adaca41d7d7f966f65f1ae68b4dee1d1dd7c5778256edc3b3e8') - -prepare(){ - cd "${srcdir}/${_realname}-${pkgver}" - - sed -i 's/#define ZLIB_WINAPI/\/\/#define ZLIB_WINAPI/g' OpenEXR/IlmImf/ImfZipCompressor.cpp - sed -i 's/#define ZLIB_WINAPI/\/\/#define ZLIB_WINAPI/g' OpenEXR/IlmImf/ImfPxr24Compressor.cpp - - patch -p1 -i ${srcdir}/0001-mingw-w64-fix.patch - patch -p1 -i ${srcdir}/0002-openexr-2.1.0-headers.patch - #patch -p1 -i ${srcdir}/0005-fix-dirs-in-pkgconfig.patch - patch -p1 -i ${srcdir}/0006-cmake-soversion.patch - patch -p1 -i ${srcdir}/0009-win-dwalookups.patch - patch -p1 -i ${srcdir}/0012-exports.patch - #patch -p1 -i ${srcdir}/0013-no-py2.patch -} - -build() { - declare -a extra_config - if check_option "debug" "n"; then - extra_config+=("-DCMAKE_BUILD_TYPE=Release") - else - extra_config+=("-DCMAKE_BUILD_TYPE=Debug") - fi - - [[ -d "build-${MINGW_CHOST}" ]] && rm -rf "build-${MINGW_CHOST}" - mkdir -p "${srcdir}/build-${MINGW_CHOST}" && cd "${srcdir}/build-${MINGW_CHOST}" - - MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \ - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - ${extra_config} \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DBUILD_SHARED_LIBS=ON \ - -DPYILMBASE_ENABLE=OFF \ - -DOPENEXR_NAMESPACE_VERSIONING=ON \ - -DOPENEXR_CXX_STANDARD=14 \ - ../${_realname}-${pkgver} - - make -} - -package_ilmbase() { - pkgdesc="Base libraries from ILM for OpenEXR (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs") - - cd "${srcdir}/build-${MINGW_CHOST}/IlmBase" - make DESTDIR=${pkgdir} install -} - -package_openexr() { - pkgdesc="An high dynamic-range image file format library (mingw-w64)" - depends=("${MINGW_PACKAGE_PREFIX}-ilmbase=${pkgver}" - "${MINGW_PACKAGE_PREFIX}-zlib") - - cd "${srcdir}/build-${MINGW_CHOST}/OpenEXR" - make DESTDIR=${pkgdir} install -} - -#package_pyilmbase() { -# pkgdesc="Python bindings for OpenEXR library (mingw-w64)" -# depends=("${MINGW_PACKAGE_PREFIX}-openexr=${pkgver}" -# "${MINGW_PACKAGE_PREFIX}-boost" -# #"${MINGW_PACKAGE_PREFIX}-python-numpy" -# ) -# -# cd "${srcdir}/build-${MINGW_CHOST}/PyIlmBase" -# make DESTDIR=${pkgdir} install -# -# # Install python modules -# #local _py3ver=$(${MINGW_PREFIX}/bin/python -c "import sys;sys.stdout.write('.'.join(map(str, sys.version_info[:2])))") -# -# #mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/python${_py3ver}/site-packages -# #cp ${srcdir}/build-${MINGW_CHOST}/python${_py3ver//./_}/*.pyd ${pkgdir}${MINGW_PREFIX}/lib/python${_py3ver}/site-packages/ -#} - -# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; -# vim: set ft=bash : - -# generate wrappers -for _name in "${pkgname[@]}"; do - _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}" - _func="$(declare -f "${_short}")" - eval "${_func/#${_short}/package_${_name}}" -done -# template end; diff --git a/tools/MINGW-packages/mingw-w64-pyside/PKGBUILD b/tools/MINGW-packages/mingw-w64-pyside/PKGBUILD deleted file mode 100644 index 81808b28aa..0000000000 --- a/tools/MINGW-packages/mingw-w64-pyside/PKGBUILD +++ /dev/null @@ -1,92 +0,0 @@ -# Maintainer: ole.andre.rodlie@gmail.com - -_realname=pyside -pkgname=${MINGW_PACKAGE_PREFIX}-natron_${_realname} -pkgver=1.2.4 -pkgrel=8 -arch=('any') -url="http://pyside.github.io/docs/pyside/" -license=("LGPL") -source=(https://mirrors.dotsrc.org/qtproject/official_releases/pyside/PySide-${pkgver}.tar.gz pyside.patch) -sha256sums=('1421bc1bf612c396070de9e1ffe227c07c1f3129278bc7d30c754b5146be2433' - '7e8e3c26a8ab2f279260965cb44ef7e8b8c5f3093898dc9fff6288ef024d44d9') -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python" - "${MINGW_PACKAGE_PREFIX}-natron_shiboken" - "${MINGW_PACKAGE_PREFIX}-natron_qt4") -options=('strip') - -prepare() { - cd ${srcdir}/PySide-${pkgver} - patch -p1 -i ${srcdir}/pyside.patch -} - -build() { - export MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" - for pyv in python2 python3; do - local _conf= - local _major=$(${pyv} -c "import platform; print(platform.python_version_tuple()[0])") - local _minor=$(${pyv} -c "import platform; print(platform.python_version_tuple()[1])") - if [ "${pyv}" = "python2" ]; then - _conf="-DPYTHON_SUFFIX=-python2.7" - fi - [[ -d ${srcdir}/build-${MINGW_CHOST}-${pyv} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}-${pyv} - mkdir -p ${srcdir}/build-${MINGW_CHOST}-${pyv} && cd ${srcdir}/build-${MINGW_CHOST}-${pyv} - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - -DCMAKE_BUILD_TYPE=RELEASE \ - -DBUILD_TESTS=FALSE \ - -DCMAKE_OBJECT_PATH_MAX=1024 \ - ${_conf} \ - -DSITE_PACKAGE=lib/python${_major}.${_minor}/site-packages \ - -DShiboken_DIR=${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/py${_major} \ - -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/${pyv}.exe \ - -DCMAKE_CXX_STANDARD=98 \ - ${srcdir}/PySide-${pkgver}/sources/pyside - make - done -} - -fix_paths() { - local prefixwin=$(cygpath -am ${MINGW_PREFIX}) - local prefixinst=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) - local _files=$(find ${pkgdir}${MINGW_PREFIX}/lib -type f -iname "*.cmake" -o -iname "*.pc") - for f in ${_files}; do - plain "Patching ${f}..." - sed -e "s|${prefixwin}|${MINGW_PREFIX}|g" \ - -e "s|${prefixinst}|${MINGW_PREFIX}|g" \ - -i ${f} - done -} - -package() { - for pyv in python2 python3; do - local _major=$(${pyv} -c "import platform; print(platform.python_version_tuple()[0])") - local _minor=$(${pyv} -c "import platform; print(platform.python_version_tuple()[1])") - local _pyprefix= - if [ "${_major}" = "3" ]; then - _pyprefix="" #".cpython-${_major}${_minor}m" - else - _pyprefix="-python${_major}.${_minor}" - fi - cd ${srcdir}/build-${MINGW_CHOST}-${pyv} - make DESTDIR=${pkgdir} install - mv ${pkgdir}${MINGW_PREFIX}/include/PySide{,-py${_major}} - mv ${pkgdir}${MINGW_PREFIX}/share/PySide{,-py${_major}} - sed -i 's|include/PySide|include/PySide-py'${_major}'|g' ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/pyside.pc - sed -i 's|share/PySide|share/PySide-py'${_major}'|g' ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/pyside.pc - sed -i 's|shiboken|shiboken-py'${_major}'|g' ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/pyside.pc - mv ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/pyside{,-py${_major}}.pc - sed -i 's|include/PySide|include/PySide-py'${_major}'|g' ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig${_pyprefix}.cmake - sed -i 's|share/PySide|share/PySide-py'${_major}'|g' ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig${_pyprefix}.cmake - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/py${_major} - mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig${_pyprefix}.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/py${_major}/PySideConfig.cmake - mv ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfigVersion.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/py${_major}/ - #rm ${pkgdir}${MINGW_PREFIX}/lib/cmake/PySide-${pkgver}/PySideConfig.cmake - done - fix_paths -} - diff --git a/tools/MINGW-packages/mingw-w64-pyside/pyside.patch b/tools/MINGW-packages/mingw-w64-pyside/pyside.patch deleted file mode 100644 index d9d314c6f8..0000000000 --- a/tools/MINGW-packages/mingw-w64-pyside/pyside.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- PySide-1.2.2/sources/pyside/CMakeLists.txt.orig 2015-06-26 11:33:00.602600000 +0300 -+++ PySide-1.2.2/sources/pyside/CMakeLists.txt 2015-06-26 11:33:35.406200000 +0300 -@@ -31,6 +31,9 @@ - if(MSVC) - set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") - else() -+ if(MINGW) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_WINDOWS") -+ endif() - if(CMAKE_HOST_UNIX AND NOT CYGWIN) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") - endif() ---- PySide-1.2.2/sources/pyside/cmake/Macros/PySideModules.cmake.orig 2015-06-26 11:55:02.330400000 +0300 -+++ PySide-1.2.2/sources/pyside/cmake/Macros/PySideModules.cmake 2015-06-26 12:29:31.912800000 +0300 -@@ -22,8 +22,8 @@ - add_custom_command(OUTPUT ${${module_sources}} - COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} - ${pyside_BINARY_DIR}/pyside_global.h -- --include-paths=${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR} -- --typesystem-paths=${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}} -+ --include-paths="${pyside_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}" -+ --typesystem-paths="${pyside_SOURCE_DIR}${PATH_SEP}${${module_typesystem_path}}" - --output-directory=${CMAKE_CURRENT_BINARY_DIR} - --license-file=${CMAKE_CURRENT_SOURCE_DIR}/../licensecomment.txt - ${typesystem_path} ---- PySide-1.2.2/sources/pyside/tests/pysidetest/CMakeLists.txt.orig 2015-06-26 12:32:49.376400000 +0300 -+++ PySide-1.2.2/sources/pyside/tests/pysidetest/CMakeLists.txt 2015-06-26 12:33:01.903200000 +0300 -@@ -36,8 +36,8 @@ - add_custom_command(OUTPUT ${testbinding_SRC} - COMMAND ${SHIBOKEN_BINARY} ${GENERATOR_EXTRA_FLAGS} - ${CMAKE_CURRENT_SOURCE_DIR}/pysidetest_global.h -- --include-paths=${pyside_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${QT_QTCORE_INCLUDE_DIR}${PATH_SEP}${QT_QTGUI_INCLUDE_DIR} -- --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR} -+ --include-paths="${pyside_BINARY_DIR}${PATH_SEP}${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${QT_INCLUDE_DIR}${PATH_SEP}${QT_QTCORE_INCLUDE_DIR}${PATH_SEP}${QT_QTGUI_INCLUDE_DIR}" -+ --typesystem-paths="${CMAKE_CURRENT_SOURCE_DIR}${PATH_SEP}${pyside_SOURCE_DIR}${PATH_SEP}${QtCore_SOURCE_DIR}${PATH_SEP}${QtCore_BINARY_DIR}${PATH_SEP}${QtGui_SOURCE_DIR}${PATH_SEP}${QtGui_BINARY_DIR}" - --output-directory=${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/typesystem_pysidetest.xml - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/tools/MINGW-packages/mingw-w64-qt4/0001-Enable-building-with-C-11-and-C-14.patch b/tools/MINGW-packages/mingw-w64-qt4/0001-Enable-building-with-C-11-and-C-14.patch deleted file mode 100644 index bbc59aa5f4..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0001-Enable-building-with-C-11-and-C-14.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 451dd27fb6c8a0ff69b31e316e110df48c78086a Mon Sep 17 00:00:00 2001 -From: Ikey Doherty -Date: Wed, 3 Aug 2016 23:47:07 +0100 -Subject: [PATCH] Enable building with C++-11 and C++-14 - -This patch is a forward-port of the backport patch found on the cern git: - -https://gitlab.cern.ch/GENSER/lcgcmakeII/blob/master/externals/patches/Qt-4.8.4.patch - -Yay science. - -Signed-off-by: Ikey Doherty ---- - src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h | 4 ++++ - src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h | 2 +- - src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h | 2 +- - src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h | 5 ++++- - 4 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h -index 053b4c0..8fb2fd5 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h -@@ -36,6 +36,10 @@ - #include - #include - #include -+#if __cplusplus >= 201103L -+#include -+using std::signbit; -+#endif - - namespace JSC { - -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h -index 7571efc..1fea6d7 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h -@@ -210,7 +210,7 @@ namespace JSC { - bool m_isPinnedPropertyTable : 1; - bool m_hasGetterSetterProperties : 1; - bool m_hasNonEnumerableProperties : 1; --#if COMPILER(WINSCW) -+#if COMPILER(WINSCW) || __cplusplus >= 201103L - // Workaround for Symbian WINSCW compiler that cannot resolve unsigned type of the declared - // bitfield, when used as argument in make_pair() function calls in structure.ccp. - // This bitfield optimization is insignificant for the Symbian emulator target. -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h -index 42a9233..c84f0e8 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h -@@ -257,7 +257,7 @@ namespace WTF { - - using std::swap; - --#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION) -+#if !COMPILER(MSVC) && !OS(QNX) && __cplusplus < 201103L - // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined. - - // swap pairs by component, in case of pair members that specialize swap -diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h -index 7ba487f..6aaeca3 100644 ---- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h -+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h -@@ -166,8 +166,11 @@ namespace WTF { - typedef T Type; - }; - --#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) -+#if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L -+ template struct HasTrivialConstructor : public std::is_trivially_constructible { }; -+ template struct HasTrivialDestructor : public std::is_trivially_destructible { }; - -+#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600)) - // GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace. - // VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace. - template struct HasTrivialConstructor : public std::tr1::has_trivial_constructor { }; --- -2.9.2 - ---- qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp.orig 2017-10-19 21:49:36.384834048 +0200 -+++ qt-everywhere-opensource-src-4.8.7/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexCompiler.cpp 2017-10-19 21:49:51.987834387 +0200 -@@ -719,7 +719,7 @@ - - constructor.setupOffsets(); - -- return false; -+ return NULL; - }; - - diff --git a/tools/MINGW-packages/mingw-w64-qt4/0001-qt-4.6-demo-plugandpaint.patch b/tools/MINGW-packages/mingw-w64-qt4/0001-qt-4.6-demo-plugandpaint.patch deleted file mode 100644 index 262996aa10..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0001-qt-4.6-demo-plugandpaint.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/examples/tools/plugandpaint/plugandpaint.pro b/examples/tools/plugandpaint/plugandpaint.pro -index 9616eb8..e188bc1 100644 ---- a/examples/tools/plugandpaint/plugandpaint.pro -+++ b/examples/tools/plugandpaint/plugandpaint.pro -@@ -10,7 +10,7 @@ SOURCES = main.cpp \ - symbian { - LIBS = -lpnp_basictools.lib - } else { -- LIBS = -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools -+ LIBS += -L$${QT_BUILD_TREE}/examples/tools/plugandpaint/plugins -lpnp_basictools - } - - if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { diff --git a/tools/MINGW-packages/mingw-w64-qt4/0002-qt-4.8.0-fix-include-windows-h.patch b/tools/MINGW-packages/mingw-w64-qt4/0002-qt-4.8.0-fix-include-windows-h.patch deleted file mode 100644 index 4e119f99a8..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0002-qt-4.8.0-fix-include-windows-h.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/tools/linguist/shared/profileevaluator.cpp b/tools/linguist/shared/profileevaluator.cpp -index 0539efa..f8767b7 100644 ---- a/tools/linguist/shared/profileevaluator.cpp -+++ b/tools/linguist/shared/profileevaluator.cpp -@@ -65,7 +65,7 @@ - #include - #include - #else --#include -+#include - #endif - #include - #include diff --git a/tools/MINGW-packages/mingw-w64-qt4/0003-qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch b/tools/MINGW-packages/mingw-w64-qt4/0003-qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch deleted file mode 100644 index 5171f18841..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0003-qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp.orig 2012-02-08 18:42:31.512669347 +0100 -+++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp 2012-02-08 18:43:18.812512826 +0100 -@@ -68,7 +68,7 @@ - - namespace JSC { - --#if OS(DARWIN) || OS(WINDOWS) -+#if OS(DARWIN) || (OS(WINDOWS) && CPU(X86)) - #define SYMBOL_STRING(name) "_" #name - #else - #define SYMBOL_STRING(name) #name ---- qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h.orig 2012-02-08 18:56:13.967325973 +0100 -+++ qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h 2012-02-08 18:58:18.977552112 +0100 -@@ -1120,7 +1120,7 @@ - /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in. - On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */ - #if ENABLE(ASSEMBLER) --#if CPU(X86_64) -+#if CPU(X86_64) && !OS(WINDOWS) - #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1 - #else - #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1 diff --git a/tools/MINGW-packages/mingw-w64-qt4/0004-qt-4.8.0-fix-mysql-driver-build.patch b/tools/MINGW-packages/mingw-w64-qt4/0004-qt-4.8.0-fix-mysql-driver-build.patch deleted file mode 100644 index 2a8cf9cb99..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0004-qt-4.8.0-fix-mysql-driver-build.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/src/sql/drivers/mysql/qsql_mysql.pri 2012-05-24 13:53:35 +0400 -+++ b/src/sql/drivers/mysql/qsql_mysql.pri 2012-05-24 13:54:31 +0400 -@@ -12,5 +12,5 @@ - QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL - } - } else { -- !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql -+ LIBS += -lmysqlclient - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/0005-qt-4.8.0-no-webkit-tests.patch b/tools/MINGW-packages/mingw-w64-qt4/0005-qt-4.8.0-no-webkit-tests.patch deleted file mode 100644 index 3913cdc6ab..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0005-qt-4.8.0-no-webkit-tests.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/3rdparty/webkit/Source/WebKit.pro b/src/3rdparty/webkit/Source/WebKit.pro -index 9be0f4a..6744f58 100644 ---- a/src/3rdparty/webkit/Source/WebKit.pro -+++ b/src/3rdparty/webkit/Source/WebKit.pro -@@ -22,7 +22,7 @@ contains(QT_CONFIG, declarative) { - exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative - } - --exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests -+#exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests - - build-qtscript { - SUBDIRS += \ diff --git a/tools/MINGW-packages/mingw-w64-qt4/0006-qt-4.8.0-use-fbclient-instead-gds32.patch b/tools/MINGW-packages/mingw-w64-qt4/0006-qt-4.8.0-use-fbclient-instead-gds32.patch deleted file mode 100644 index 3ac47c4b9c..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0006-qt-4.8.0-use-fbclient-instead-gds32.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/sql/drivers/ibase/qsql_ibase.pri 2012-04-06 09:19:46 +0400 -+++ b/src/sql/drivers/ibase/qsql_ibase.pri 2012-04-04 09:35:31 +0400 -@@ -6,6 +6,6 @@ - } else { - !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) { - win32-borland:LIBS += gds32.lib -- else:LIBS += -lgds32_ms -+ else:LIBS += -lfbclient - } - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/0007-qt-4.8.1-fix-activeqt-compilation.patch b/tools/MINGW-packages/mingw-w64-qt4/0007-qt-4.8.1-fix-activeqt-compilation.patch deleted file mode 100644 index 159eba4bf7..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0007-qt-4.8.1-fix-activeqt-compilation.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff --git a/src/activeqt/control/qaxserverbase.cpp b/src/activeqt/control/qaxserverbase.cpp -index f5c495a..123e40f 100644 ---- a/src/activeqt/control/qaxserverbase.cpp -+++ b/src/activeqt/control/qaxserverbase.cpp -@@ -4037,12 +4037,10 @@ HRESULT WINAPI QAxServerBase::SetColorScheme(LOGPALETTE*) - } - - --#ifdef QT_DLL // avoid conflict with symbol in static lib - bool qt_sendSpontaneousEvent(QObject *o, QEvent *e) - { - return QCoreApplication::sendSpontaneousEvent(o, e); - } --#endif - - /* - Tries to set the size of the control. -diff --git a/tools/activeqt/testcon/testcon.pro b/tools/activeqt/testcon/testcon.pro -index 89f8067..696be2e 100644 ---- a/tools/activeqt/testcon/testcon.pro -+++ b/tools/activeqt/testcon/testcon.pro -@@ -7,6 +7,8 @@ CONFIG += qaxserver qaxserver_no_postlink qaxcontainer - INCLUDEPATH += $$QT_SOURCE_TREE/tools/activeqt/container/debug \ - $$QT_SOURCE_TREE/tools/activeqt/container/release \ - $$QT_BUILD_TREE/src/activeqt/container \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-shared \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-shared \ - - SOURCES = main.cpp docuwindow.cpp mainwindow.cpp invokemethod.cpp changeproperties.cpp ambientproperties.cpp controlinfo.cpp - HEADERS = docuwindow.h mainwindow.h invokemethod.h changeproperties.h ambientproperties.h controlinfo.h -diff --git a/tools/designer/src/plugins/activeqt/activeqt.pro b/tools/designer/src/plugins/activeqt/activeqt.pro -index f58df8a..5d9bdd4 100644 ---- a/tools/designer/src/plugins/activeqt/activeqt.pro -+++ b/tools/designer/src/plugins/activeqt/activeqt.pro -@@ -10,6 +10,8 @@ build_all:!build_pass { - - INCLUDEPATH += $$QT_SOURCE_TREE/src/activeqt/shared/ \ - $$QT_BUILD_TREE/src/activeqt/container \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-shared \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-shared \ - ../../lib/uilib - - # Input diff --git a/tools/MINGW-packages/mingw-w64-qt4/0008-qt-4.8.3-assistant-4.8.2+gcc-4.7.patch b/tools/MINGW-packages/mingw-w64-qt4/0008-qt-4.8.3-assistant-4.8.2+gcc-4.7.patch deleted file mode 100644 index 429f06eafc..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0008-qt-4.8.3-assistant-4.8.2+gcc-4.7.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-27 03:02:37.539564947 +0200 -+++ b/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-27 03:03:18.843561620 +0200 -@@ -944,8 +944,7 @@ void MainWindow::updateApplicationFont() - if (helpEngine.usesAppFont()) - font = helpEngine.appFont(); - -- const QWidgetList &widgets = qApp->allWidgets(); -- foreach (QWidget* widget, widgets) -+ foreach (QWidget* widget, QApplication::allWidgets()) - widget->setFont(font); - } - diff --git a/tools/MINGW-packages/mingw-w64-qt4/0009-qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch b/tools/MINGW-packages/mingw-w64-qt4/0009-qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch deleted file mode 100644 index 59c0c5bf3a..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0009-qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/qmake/generators/makefile.cpp.orig 2012-10-09 21:39:01 +0400 -+++ b/qmake/generators/makefile.cpp 2012-10-09 21:47:20 +0400 -@@ -94,20 +94,30 @@ - QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) const - { - QString ret = "@$(CHK_DIR_EXISTS) "; -+ -+ QString dirLocalOS = dir; -+ -+ bool isWinCmdExe = false; -+ if(isWindowsShell() || -+ (project->values("QMAKE_SH").isEmpty() && -+ project->values("QMAKE_HOST.os").indexOf("Windows") != -1)) { -+ isWinCmdExe = true; -+ dirLocalOS = Option::fixPathToLocalOS(dir,false,false); -+ } - if(escape) -- ret += escapeFilePath(dir); -+ ret += escapeFilePath(dirLocalOS); - else -- ret += dir; -+ ret += dirLocalOS; - ret += " "; -- if(isWindowsShell()) -+ if(isWinCmdExe) - ret += "$(MKDIR)"; - else - ret += "|| $(MKDIR)"; - ret += " "; - if(escape) -- ret += escapeFilePath(dir); -+ ret += escapeFilePath(dirLocalOS); - else -- ret += dir; -+ ret += dirLocalOS; - ret += " "; - return ret; - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/0010-qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch b/tools/MINGW-packages/mingw-w64-qt4/0010-qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch deleted file mode 100644 index 781c9060d5..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0010-qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt.prf.orig 2013-07-05 00:05:01.084522022 +0200 -+++ qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt.prf 2013-07-05 00:05:19.402521256 +0200 -@@ -7,7 +7,7 @@ - QT_ENV_DLL = $$(QT_DLL) - QT_ENV_NO_DLL = $$(QT_NODLL) - isEmpty(QT_ENV_NO_DLL) { -- shared|!isEmpty(QT_ENV_DLL):DEFINES += QT_DLL -+ shared|!isEmpty(QT_ENV_DLL):!static:DEFINES += QT_DLL - } - contains(DEFINES, QT_MAKEDLL)|contains(DEFINES, QT_DLL):QMAKE_QT_DLL = 1 - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/0011-qt4-merge-static-and-shared-library-trees.patch b/tools/MINGW-packages/mingw-w64-qt4/0011-qt4-merge-static-and-shared-library-trees.patch deleted file mode 100644 index e8ffb9a19b..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0011-qt4-merge-static-and-shared-library-trees.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- a/mkspecs/features/qt_functions.prf 2014-08-01 23:54:20.441986402 +0200 -+++ b/mkspecs/features/qt_functions.prf 2014-08-01 23:55:33.603172013 +0200 -@@ -83,6 +83,19 @@ - QMAKE_LFLAGS *= --lsb-shared-libs=$${LIB_NAME}$${QT_LIBINFIX} - } - LIBS += $$LINKAGE -+ -+ win32:CONFIG(static) { -+ isEqual(LIB_NAME, QtCore) { -+ LIBS += $$QMAKE_LIBS_CORE -+ } else:isEqual(LIB_NAME, QtGui) { -+ LIBS += $$QMAKE_LIBS_GUI -+ } else:isEqual(LIB_NAME, QtNetwork) { -+ LIBS += $$QMAKE_LIBS_NETWORK -+ } else:isEqual(LIB_NAME, QtOpenGL) { -+ LIBS += $$QMAKE_LIBS_OPENGL -+ } -+ } -+ - export(LIBS) - export(INCLUDEPATH) - export(QMAKE_FRAMEWORKPATH) ---- a/mkspecs/features/default_post.prf 2014-08-01 23:51:16.864011435 +0200 -+++ b/mkspecs/features/default_post.prf 2014-08-01 23:51:29.830221559 +0200 -@@ -96,6 +96,11 @@ - QMAKE_INCDIR += $$QMAKE_INCDIR_POST - QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST - -+win32:contains(CONFIG, static) { -+ DEFINES += QT_STATIC -+ QMAKE_LFLAGS += -static -+} -+ - # Let every project have a standard GNU `check' target - !contains(QMAKE_EXTRA_TARGETS, check) { - # `make check' should iterate through all subdirs ---- a/configure 2012-12-10 23:51:02.920255366 +0100 -+++ b/configure 2012-12-10 23:55:58.101753703 +0100 -@@ -6032,6 +6032,12 @@ - QT_EDITION = $Edition - QT_CONFIG += $QT_CONFIG - -+contains(CONFIG, static) { -+ CONFIG -= shared -+ QT_CONFIG += static jpeg gif -+ QT_CONFIG -= shared -+} -+ - #versioning - QT_VERSION = $QT_VERSION - QT_MAJOR_VERSION = $QT_MAJOR_VERSION diff --git a/tools/MINGW-packages/mingw-w64-qt4/0012-qt4-use-correct-pkg-config-static-flags.patch b/tools/MINGW-packages/mingw-w64-qt4/0012-qt4-use-correct-pkg-config-static-flags.patch deleted file mode 100644 index 4dd5b6f5df..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0012-qt4-use-correct-pkg-config-static-flags.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.6/configure.orig 2015-03-21 18:07:24.056403965 +0100 -+++ qt-everywhere-opensource-src-4.8.6/configure 2015-03-21 18:09:40.642912613 +0100 -@@ -5164,6 +5164,10 @@ - if [ -z "$PKG_CONFIG" ]; then - PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null` - fi -+if [ -n "$PKG_CONFIG" && "$CFG_SHARED" = "no" ] ; then -+ PKG_CONFIG="$PKG_CONFIG --static" -+ [ "$OPT_VERBOSE" = "yes" ] && echo "Using '$PKG_CONFIG' because we're doing a static build" -+fi - - # Work out if we can use pkg-config - if [ "$QT_CROSS_COMPILE" = "yes" ]; then diff --git a/tools/MINGW-packages/mingw-w64-qt4/0013-qt4-fix-linking-against-static-dbus.patch b/tools/MINGW-packages/mingw-w64-qt4/0013-qt4-fix-linking-against-static-dbus.patch deleted file mode 100644 index 53369042c7..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0013-qt4-fix-linking-against-static-dbus.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/dbus/qdbus_symbols_p.h 2014-08-02 12:32:15.112000000 +0200 -+++ b/src/dbus/qdbus_symbols_p.h 2014-08-02 12:33:33.286000000 +0200 -@@ -55,6 +55,11 @@ - #define QDBUS_SYMBOLS_P_H - - #include -+ -+#ifdef QT_STATIC -+#define DBUS_STATIC_BUILD -+#endif -+ - #include - - #ifndef QT_NO_DBUS diff --git a/tools/MINGW-packages/mingw-w64-qt4/0014-qt-4.8.6-use-force-with-shell-commands.patch b/tools/MINGW-packages/mingw-w64-qt4/0014-qt-4.8.6-use-force-with-shell-commands.patch deleted file mode 100644 index 4cc477c64d..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0014-qt-4.8.6-use-force-with-shell-commands.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- x86_64/mkspecs/win32-g++/qmake.conf.orig 2014-07-10 09:46:02.909594400 +0400 -+++ x86_64/mkspecs/win32-g++/qmake.conf 2014-07-10 09:46:44.978387100 +0400 -@@ -86,10 +86,10 @@ - MINGW_IN_SHELL = 1 - QMAKE_DIR_SEP = / - QMAKE_QMAKE ~= s,\\\\,/, -- QMAKE_COPY = cp -- QMAKE_COPY_DIR = cp -r -+ QMAKE_COPY = cp -f -+ QMAKE_COPY_DIR = cp -rf - QMAKE_MOVE = mv -- QMAKE_DEL_FILE = rm -+ QMAKE_DEL_FILE = rm -f - QMAKE_MKDIR = mkdir -p - QMAKE_DEL_DIR = rmdir - QMAKE_CHK_DIR_EXISTS = test -d diff --git a/tools/MINGW-packages/mingw-w64-qt4/0015-qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch b/tools/MINGW-packages/mingw-w64-qt4/0015-qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch deleted file mode 100644 index fa3f1d9bdc..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0015-qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/qmake/generators/makefile.cpp.orig 2014-07-28 00:26:53.515911500 +0300 -+++ b/qmake/generators/makefile.cpp 2014-07-28 00:29:44.271678100 +0300 -@@ -3151,7 +3151,7 @@ - ret.prepend(project->first("DESTDIR")); - ret = Option::fixPathToLocalOS(fileFixify(ret, qmake_getpwd(), Option::output_dir)); - } -- return ret; -+ return ret.replace('\\', '/'); - } - - QString ---- a/src/qbase.pri 2015-05-28 16:20:44.113119800 +0300 -+++ b/src/qbase.pri 2015-05-28 16:21:39.712559300 +0300 -@@ -21,7 +21,7 @@ - #sure the same version is used - VERSIONS_LIST = $$split(VERSION, ".") - QT_LIBS_OVERRIDE = $$member(VERSIONS_LIST, 0) -- for(lib, $$list(qtcore qtgui qtnetwork qtxml qtopengl qtsql qt3support)) { -+ for(lib, $$list(qtcore qtdbus qtgui qtnetwork qtxml qtopengl qtsql qtwebkit qt3support)) { - eval(QMAKE_$${upper($$lib)}_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) - eval(QMAKE_$${upper($$lib)}D_VERSION_OVERRIDE = $$QT_LIBS_OVERRIDE) - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/0016-qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch b/tools/MINGW-packages/mingw-w64-qt4/0016-qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch deleted file mode 100644 index 42806a14dd..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0016-qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 -+++ b/qmake/generators/win32/mingw_make.cpp 2014-10-19 12:16:07.387600000 +0400 -@@ -280,7 +280,7 @@ - processVars(); - - if (!project->values("RES_FILE").isEmpty()) { -- project->values("QMAKE_LIBS") += escapeFilePaths(project->values("RES_FILE")); -+ project->values("OBJECTS") += escapeFilePaths(project->values("RES_FILE")); - } - - // LIBS defined in Profile comes first for gcc diff --git a/tools/MINGW-packages/mingw-w64-qt4/0017-qt-4.8.7-mingw-configure.patch b/tools/MINGW-packages/mingw-w64-qt4/0017-qt-4.8.7-mingw-configure.patch deleted file mode 100644 index a5207f3196..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0017-qt-4.8.7-mingw-configure.patch +++ /dev/null @@ -1,280 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.7/configure.orig 2015-05-07 17:14:56.000000000 +0300 -+++ qt-everywhere-opensource-src-4.8.7/configure 2015-06-03 15:18:52.103556600 +0300 -@@ -48,9 +48,19 @@ - relconf=`basename $0` - # the directory of this script is the "source tree" - relpath=`dirname $0` --relpath=`(cd "$relpath"; /bin/pwd)` -+if [ -n "$MSYSTEM" ]; then -+ relpath=$(cygpath -ma "$relpath") -+ relpath=${relpath%/} -+else -+ relpath=`(cd "$relpath"; /bin/pwd)` -+fi - # the current directory is the "build tree" or "object tree" --outpath=`/bin/pwd` -+if [ -n "$MSYSTEM" ]; then -+ outpath=$(cygpath -ma $(/bin/pwd)) -+ outpath=${outpath%/} -+else -+ outpath=`/bin/pwd` -+fi - - #license file location - LICENSE_FILE="$QT_LICENSE_FILE" -@@ -753,6 +763,7 @@ - CFG_ZLIB=auto - CFG_SYMBIAN_DEFFILES=auto - CFG_S60=auto -+CFG_NATIVE_GESTURES=auto - CFG_SQLITE=qt - CFG_GIF=auto - CFG_TIFF=auto -@@ -1144,7 +1155,7 @@ - VAL=no - ;; - #Qt style yes options -- -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu) -+ -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-native-gestures|-usedeffiles|-icu) - VAR=`echo $1 | sed "s,^-\(.*\),\1,"` - VAL=yes - ;; -@@ -1376,7 +1387,11 @@ - CFG_PSQL_CONFIG="$VAL" - ;; - prefix) -- QT_INSTALL_PREFIX="$VAL" -+ if [ -n "$MSYSTEM" ]; then -+ QT_INSTALL_PREFIX=$(cygpath -ma "$VAL") -+ else -+ QT_INSTALL_PREFIX="$VAL" -+ fi - ;; - hostprefix) - QT_HOST_PREFIX="$VAL" -@@ -1988,6 +2003,13 @@ - UNKNOWN_OPT=yes - fi - ;; -+ native-gestures) -+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then -+ CFG_NATIVE_GESTURES="$VAL" -+ else -+ UNKNOWN_OPT=yes -+ fi -+ ;; - usedeffiles) - if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then - CFG_SYMBIAN_DEFFILES="$VAL" -@@ -2966,6 +2988,12 @@ - - Also available for Reliant UNIX: reliant-cds-64 - " - ;; -+ MSYS*:* | MINGW*:*) -+ PLATFORM=win32-g++ -+ if [ -z "$XPLATFORM" ]; then -+ XPLATFORM="win32-g++" -+ fi -+ ;; - CYGWIN*:*) - PLATFORM=cygwin-g++ - ;; -@@ -3139,6 +3167,13 @@ - - if [ -z "${CFG_HOST_ARCH}" ]; then - case "$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_MACHINE" in -+ MINGW*:*:*) -+ MACHINE_GCC=`(gcc -dumpmachine) 2>/dev/null` -+ CFG_HOST_ARCH=${MACHINE_GCC%%-*} -+ if [ "$OPT_VERBOSE" = "yes" ]; then -+ echo " MINGW/MSYS ($CFG_HOST_ARCH)" -+ fi -+ ;; - GNU:*:*) - CFG_HOST_ARCH=`echo ${UNAME_MACHINE} | sed -e 's,[-/].*$,,'` - case "$CFG_HOST_ARCH" in -@@ -3754,6 +3794,8 @@ - if [ -z "$QT_INSTALL_SETTINGS" ]; then #default - if [ "$PLATFORM_MAC" = "yes" ]; then - QT_INSTALL_SETTINGS=/Library/Preferences/Qt -+ elif [ "$XPLATFORM_MINGW" = "yes" ]; then -+ QT_INSTALL_SETTINGS="$QT_INSTALL_PREFIX/etc" - else - QT_INSTALL_SETTINGS=/etc/xdg - fi -@@ -4545,6 +4587,15 @@ - EOF - fi - -+if [ "$XPLATFORM_MINGW" = "yes" ]; then -+ cat << EOF -+ -+Qt for Windows only: -+ -no-native-gestures ............ Do not use native gestures on Windows 7. -+ + -native-gestures ............... Use native gestures on Windows 7. -+EOF -+fi -+ - if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then - cat << EOF - -@@ -4943,7 +4994,15 @@ - - #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured - rm -rf mkspecs/default -- ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default -+ if [ "$XPLATFORM_MINGW" = "yes" ]; then -+ mkdir -p mkspecs/default -+ _spec=$(echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,") -+ echo "QMAKESPEC_ORIGINAL=$XQMAKESPEC" > mkspecs/default/qmake.conf -+ echo "include(../${_spec}/qmake.conf)" >> mkspecs/default/qmake.conf -+ echo "#include \"../${_spec}/qplatformdefs.conf\"" > mkspecs/default/qplatformdefs.h -+ else -+ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default -+ fi - # fix makefiles - for mkfile in GNUmakefile Makefile; do - EXTRA_LFLAGS= -@@ -4953,7 +5012,11 @@ - # if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then - # (cd qmake && qmake) >/dev/null 2>&1 && continue - # fi -- in_mkfile="${mkfile}.unix" -+ if [ "$PLATFORM" = "win32-g++" ]; then -+ in_mkfile="${mkfile}.win32-g++-sh" -+ else -+ in_mkfile="${mkfile}.unix" -+ fi - fi - in_mkfile="$relpath/qmake/$in_mkfile" - mkfile="$outpath/qmake/$mkfile" -@@ -5362,7 +5425,7 @@ - fi - - # check IPC support --if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then -+if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then - # Raptor does not support configure tests. - if ! compileTest unix/ipc_sysv "ipc_sysv" ; then - # SYSV IPC is not supported - check POSIX IPC -@@ -5415,6 +5478,13 @@ - CFG_LARGEFILE=yes - fi - -+if [ "$CFG_NATIVE_GESTURES" = auto ]; then -+ if [ "$XPLATFORM_MINGW" = "yes" ]; then -+ CFG_NATIVE_GESTURES=yes -+ else -+ CFG_NATIVE_GESTURES=no -+ fi -+fi - - if [ "$CFG_S60" = "auto" ]; then - if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then -@@ -5579,7 +5649,7 @@ - if [ "$CFG_SQL_psql" != "no" ]; then - [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config` - # Be careful not to use native pg_config when cross building. -- if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then -+ if [ -x "$CFG_PSQL_CONFIG" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then - QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null` - QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null` - fi -@@ -6699,6 +6769,24 @@ - - fi # QWS - -+if [ "$XPLATFORM_MINGW" = "yes" ] && [ "$QT_CROSS_COMPILE" = "no" ]; then -+ # auto-detect FontConfig support -+ if [ "$CFG_FONTCONFIG" != "no" ]; then -+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then -+ QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null` -+ QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null` -+ else -+ QT_CFLAGS_FONTCONFIG= -+ QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig" -+ fi -+ if compileTest x11/fontconfig "FontConfig" $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then -+ QT_CONFIG="$QT_CONFIG fontconfig" -+ QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG" -+ QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG" -+ fi -+ fi -+fi # MINGW -+ - EGL_VARIANT=none - # EGL Support - if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then -@@ -7398,7 +7486,7 @@ - QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" - QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" - fi --if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then -+if [ "$CFG_LARGEFILE" = "yes" ]; then - QMAKE_CONFIG="$QMAKE_CONFIG largefile" - fi - if [ "$CFG_STL" = "no" ]; then -@@ -7669,6 +7757,10 @@ - # Follow default behavior of configure.exe by overriding with "rtti" - # (also on Symbian). - QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti" -+ -+ if [ "$CFG_NATIVE_GESTURES" = "yes" ]; then -+ QTCONFIG_CONFIG="$QTCONFIG_CONFIG native-gestures" -+ fi - fi - - if [ "$CFG_ALSA" = "yes" ]; then -@@ -8263,6 +8355,15 @@ - ;; - esac - -+if [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_SHARED" = "yes" ]; then -+ cat >>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" <>"$outpath/src/corelib/global/qconfig.h.new" - [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new" - --if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then -+if [ "$CFG_LARGEFILE" = "yes" ]; then - echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new" - fi - -@@ -8508,7 +8609,7 @@ - [ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV" - [ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB" - [ "$CFG_QGTKSTYLE" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_STYLE_GTK" --if [ "$XPLATFORM_SYMBIAN" = "no" ]; then -+if [ "$XPLATFORM_SYMBIAN" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ]; then - # Do not apply following negative X11/Unix/Mac only flags on Symbian, so that - # configuration matches with the one generated by configure executable tool - [ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS" -@@ -9010,6 +9111,7 @@ - fi - echo "Support for S60 ........ $CFG_S60" - echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" -+echo "Use native gestures .... $CFG_NATIVE_GESTURES" - echo "STL support ............ $CFG_STL" - echo "PCH support ............ $CFG_PRECOMPILE" - echo "MMX/3DNOW/SSE/SSE2/SSE3. ${CFG_MMX}/${CFG_3DNOW}/${CFG_SSE}/${CFG_SSE2}/${CFG_SSE3}" -@@ -9058,6 +9160,10 @@ - fi - echo "zlib support ........... $CFG_ZLIB" - echo "Session management ..... $CFG_SM" -+if [ "$XPLATFORM_MINGW" = "yes" ]; then -+ echo "Freetype2 support ...... $CFG_LIBFREETYPE" -+ echo "FontConfig support ..... $CFG_FONTCONFIG" -+fi - if [ "$PLATFORM_QWS" = "yes" ]; then - echo "Embedded support ....... $CFG_EMBEDDED" - if [ "$CFG_QWS_FREETYPE" = "auto" ]; then diff --git a/tools/MINGW-packages/mingw-w64-qt4/0018-qt-4.8.7-mingw-unix-tests.patch b/tools/MINGW-packages/mingw-w64-qt4/0018-qt-4.8.7-mingw-unix-tests.patch deleted file mode 100644 index f1a9b01e40..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0018-qt-4.8.7-mingw-unix-tests.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- a/config.tests/unix/ibase/ibase.pro 2015-05-27 14:49:31.512616600 +0300 -+++ b/config.tests/unix/ibase/ibase.pro 2015-05-27 14:49:38.480009800 +0300 -@@ -1,4 +1,4 @@ - SOURCES = ibase.cpp - CONFIG -= qt dylib - mac:CONFIG -= app_bundle --LIBS += -lgds -+LIBS += -lfbclient ---- a/config.tests/unix/endian.test 2015-05-27 15:39:33.702970300 +0300 -+++ b/config.tests/unix/endian.test 2015-05-27 15:44:28.057531900 +0300 -@@ -11,7 +11,7 @@ - - # build and run a test program - test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian" --"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QMAKE_CXXFLAGS*=$SYSROOT" "LIBS*=$SYSROOT" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 -+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=" "CONFIG-=debug_and_release" "QMAKE_CXXFLAGS*=$SYSROOT" "LIBS*=$SYSROOT" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1 - cd "$OUTDIR/config.tests/unix/endian" - - ---- a/config.tests/unix/makeabs 2015-05-28 10:41:35.515153200 +0300 -+++ b/config.tests/unix/makeabs 2015-05-28 10:55:00.222674400 +0300 -@@ -4,6 +4,7 @@ - RES="$FILE" - - CUT_ARG="-b1" -+CUT_ARG2="-b2" - if [ `uname -s` = "QNX" ]; then - # QNX does not understand "-b1" - CUT_ARG="-c1" -@@ -11,6 +12,8 @@ - - if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then - true -+elif [ `echo $FILE | cut $CUT_ARG2` = ":" ]; then -+ true - else - RES="$PWD/$FILE" - test -d "$RES" && RES="$RES/" -@@ -21,5 +24,10 @@ - - RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"` - fi -+ -+if [[ -n "$MSYSTEM" ]]; then -+ RES=$(cygpath -wm $RES) -+fi -+ - echo $RES #return - diff --git a/tools/MINGW-packages/mingw-w64-qt4/0019-qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch b/tools/MINGW-packages/mingw-w64-qt4/0019-qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch deleted file mode 100644 index 074512a893..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0019-qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch +++ /dev/null @@ -1,132 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.7/src/gui/image/qmnghandler.cpp 2015-05-07 15:14:44.000000000 +0100 -+++ qt4-4.8.7/src/gui/image/qmnghandler.cpp 2015-07-15 10:44:14.858545100 +0100 -@@ -45,7 +45,12 @@ - #include "qvariant.h" - #include "qcolor.h" - --#define MNG_USE_SO -+#if defined(Q_OS_WIN) && !defined(QT_STATIC) -+ #define MNG_USE_DLL -+#else -+ #define MNG_USE_SO -+#endif -+ - #include - - QT_BEGIN_NAMESPACE -@@ -82,7 +87,7 @@ - QMngHandler *q_ptr; - }; - --static mng_bool myerror(mng_handle /*hMNG*/, -+static mng_bool MNG_DECL myerror(mng_handle /*hMNG*/, - mng_int32 iErrorcode, - mng_int8 /*iSeverity*/, - mng_chunkid iChunkname, -@@ -101,7 +106,7 @@ - return TRUE; - } - --static mng_ptr myalloc(mng_size_t iSize) -+static mng_ptr MNG_DECL myalloc(mng_size_t iSize) - { - #if defined(Q_OS_WINCE) - mng_ptr ptr = malloc(iSize); -@@ -112,24 +117,24 @@ - #endif - } - --static void myfree(mng_ptr pPtr, mng_size_t /*iSize*/) -+static void MNG_DECL myfree(mng_ptr pPtr, mng_size_t /*iSize*/) - { - free(pPtr); - } - --static mng_bool myopenstream(mng_handle) -+static mng_bool MNG_DECL myopenstream(mng_handle) - { - return MNG_TRUE; - } - --static mng_bool myclosestream(mng_handle hMNG) -+static mng_bool MNG_DECL myclosestream(mng_handle hMNG) - { - QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); - pMydata->haveReadAll = true; - return MNG_TRUE; - } - --static mng_bool myreaddata(mng_handle hMNG, -+static mng_bool MNG_DECL myreaddata(mng_handle hMNG, - mng_ptr pBuf, - mng_uint32 iSize, - mng_uint32p pRead) -@@ -138,7 +143,7 @@ - return pMydata->readData(pBuf, iSize, pRead); - } - --static mng_bool mywritedata(mng_handle hMNG, -+static mng_bool MNG_DECL mywritedata(mng_handle hMNG, - mng_ptr pBuf, - mng_uint32 iSize, - mng_uint32p pWritten) -@@ -147,7 +152,7 @@ - return pMydata->writeData(pBuf, iSize, pWritten); - } - --static mng_bool myprocessheader(mng_handle hMNG, -+static mng_bool MNG_DECL myprocessheader(mng_handle hMNG, - mng_uint32 iWidth, - mng_uint32 iHeight) - { -@@ -155,14 +160,14 @@ - return pMydata->processHeader(iWidth, iHeight); - } - --static mng_ptr mygetcanvasline(mng_handle hMNG, -+static mng_ptr MNG_DECL mygetcanvasline(mng_handle hMNG, - mng_uint32 iLinenr) - { - QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); - return (mng_ptr)pMydata->image.scanLine(iLinenr); - } - --static mng_bool myrefresh(mng_handle /*hMNG*/, -+static mng_bool MNG_DECL myrefresh(mng_handle /*hMNG*/, - mng_uint32 /*iX*/, - mng_uint32 /*iY*/, - mng_uint32 /*iWidth*/, -@@ -171,13 +176,13 @@ - return MNG_TRUE; - } - --static mng_uint32 mygettickcount(mng_handle hMNG) -+static mng_uint32 MNG_DECL mygettickcount(mng_handle hMNG) - { - QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); - return pMydata->elapsed++; - } - --static mng_bool mysettimer(mng_handle hMNG, -+static mng_bool MNG_DECL mysettimer(mng_handle hMNG, - mng_uint32 iMsecs) - { - QMngHandlerPrivate *pMydata = reinterpret_cast(mng_get_userdata(hMNG)); -@@ -186,7 +191,7 @@ - return MNG_TRUE; - } - --static mng_bool myprocessterm(mng_handle hMNG, -+static mng_bool MNG_DECL myprocessterm(mng_handle hMNG, - mng_uint8 iTermaction, - mng_uint8 /*iIteraction*/, - mng_uint32 /*iDelay*/, -@@ -198,7 +203,7 @@ - return MNG_TRUE; - } - --static mng_bool mytrace(mng_handle, -+static mng_bool MNG_DECL mytrace(mng_handle, - mng_int32 iFuncnr, - mng_int32 iFuncseq, - mng_pchar zFuncname) diff --git a/tools/MINGW-packages/mingw-w64-qt4/0020-qt-4.8.5-qmake-implib.patch b/tools/MINGW-packages/mingw-w64-qt4/0020-qt-4.8.5-qmake-implib.patch deleted file mode 100644 index a3aba25c71..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0020-qt-4.8.5-qmake-implib.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- origsrc/qt-everywhere-opensource-src-4.8.5/qmake/generators/makefile.cpp 2013-06-07 00:17:01.000000000 -0500 -+++ src/qt-everywhere-opensource-src-4.8.5/qmake/generators/makefile.cpp 2014-01-02 03:14:39.097301000 -0600 -@@ -3258,8 +3258,6 @@ MakefileGenerator::writePkgConfigFile() - } else { - pkgConfiglibDir = "-L${libdir}"; - pkgConfiglibName = "-l" + lname.left(lname.length()-Option::libtool_ext.length()); -- if (project->isActiveConfig("shared")) -- pkgConfiglibName += project->first("TARGET_VERSION_EXT"); - } - t << pkgConfiglibDir << " " << pkgConfiglibName << " " << endl; - ---- origsrc/qt-everywhere-opensource-src-4.8.5/qmake/generators/win32/mingw_make.cpp 2013-06-07 00:17:01.000000000 -0500 -+++ src/qt-everywhere-opensource-src-4.8.5/qmake/generators/win32/mingw_make.cpp 2014-01-02 14:54:11.503450300 -0600 -@@ -77,7 +77,7 @@ QString MingwMakefileGenerator::escapeDe - - QString MingwMakefileGenerator::getLibTarget() - { -- return QString("lib" + project->first("TARGET") + project->first("TARGET_VERSION_EXT") + ".a"); -+ return QString("lib" + project->first("TARGET") + ".dll.a"); - } - - bool MingwMakefileGenerator::findLibraries() -@@ -106,9 +106,6 @@ bool MingwMakefileGenerator::findLibrari - suffix = project->first("QMAKE_" + steam.toUpper() + "_SUFFIX"); - for (QList::Iterator dir_it = dirs.begin(); dir_it != dirs.end(); ++dir_it) { - QString extension; -- int ver = findHighestVersion((*dir_it).local(), steam, "dll.a|a"); -- if (ver != -1) -- extension += QString::number(ver); - extension += suffix; - if(QMakeMetaInfo::libExists((*dir_it).local() + Option::dir_sep + steam) || - exists((*dir_it).local() + Option::dir_sep + steam + extension + ".a") || -@@ -299,7 +296,7 @@ void MingwMakefileGenerator::init() - if(!project->first("DESTDIR").isEmpty()) - destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false); - project->values("MINGW_IMPORT_LIB").prepend(destDir + "lib" + project->first("TARGET") -- + project->first("TARGET_VERSION_EXT") + ".a"); -+ + ".dll.a"); - project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB")); - } - diff --git a/tools/MINGW-packages/mingw-w64-qt4/0021-qt-4.8.7-fix-testcon-static-compile.patch b/tools/MINGW-packages/mingw-w64-qt4/0021-qt-4.8.7-fix-testcon-static-compile.patch deleted file mode 100644 index 40ce424ccd..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0021-qt-4.8.7-fix-testcon-static-compile.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/tools/activeqt/testcon/testcon.pro -+++ b/tools/activeqt/testcon/testcon.pro -@@ -9,6 +9,8 @@ - $$QT_BUILD_TREE/src/activeqt/container \ - $$QT_BUILD_TREE/src/activeqt/container/.uic/release-shared \ - $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-shared \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/release-static \ -+ $$QT_BUILD_TREE/src/activeqt/container/.uic/debug-static \ - - SOURCES = main.cpp docuwindow.cpp mainwindow.cpp invokemethod.cpp changeproperties.cpp ambientproperties.cpp controlinfo.cpp - HEADERS = docuwindow.h mainwindow.h invokemethod.h changeproperties.h ambientproperties.h controlinfo.h ---- a/tools/activeqt/testcon/testcon.pro -+++ b/tools/activeqt/testcon/testcon.pro -@@ -23,3 +23,4 @@ - !win32-g++*:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR) - - } -+QMAKE_LFLAGS += -Wl,--allow-multiple-definition diff --git a/tools/MINGW-packages/mingw-w64-qt4/0030-moc-boost-workaround.patch b/tools/MINGW-packages/mingw-w64-qt4/0030-moc-boost-workaround.patch deleted file mode 100644 index 79493340de..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0030-moc-boost-workaround.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin -qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h ---- qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h.majmin 2015-05-07 09:14:48.000000000 -0500 -+++ qt-everywhere-opensource-src-4.8.7/src/corelib/global/qglobal.h 2016-12-08 12:10:29.677359701 -0600 -@@ -52,7 +52,7 @@ - /* - can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) - */ --#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) -+#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch)) - - #define QT_PACKAGEDATE_STR "2015-05-07" - -diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp ---- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.000000000 -0500 -+++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-12-08 12:32:46.638962448 -0600 -@@ -188,8 +188,12 @@ int runMoc(int _argc, char **_argv) - pp.macros["Q_MOC_RUN"]; - pp.macros["__cplusplus"]; - -- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829 -+ // Workaround a bugs while parsing some boost headers. See QTBUG-22829 - pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; -+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"]; -+ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"]; -+ pp.macros["BOOST_TYPE_TRAITS_HPP"]; -+ pp.macros["_SYS_SYSMACROS_H_OUTER"]; - - QByteArray filename; - QByteArray output; diff --git a/tools/MINGW-packages/mingw-w64-qt4/0031-qt4-gcc6.patch b/tools/MINGW-packages/mingw-w64-qt4/0031-qt4-gcc6.patch deleted file mode 100644 index d65cd2463c..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0031-qt4-gcc6.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensource-src-4.8.7/configure ---- qt-everywhere-opensource-src-4.8.7/configure.gcc6 2016-04-15 07:04:19.430268222 -0500 -+++ qt-everywhere-opensource-src-4.8.7/configure 2016-04-15 07:05:22.157568689 -0500 -@@ -7744,7 +7744,7 @@ case "$XPLATFORM" in - *-g++*) - # Check gcc's version - case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in -- 5*|4*|3.4*) -+ 8*|7*|6*|5*|4*|3.4*) - ;; - 3.3*) - canBuildWebKit="no" -@@ -8060,7 +8060,7 @@ g++*) - 3.*) - COMPILER_VERSION="3.*" - ;; -- 5*|4.*) -+ 8*|7*|6*|5*|4.*) - COMPILER_VERSION="4" - ;; - *) -diff -up qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 -qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h ---- qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 2015-05-07 09:14:48.000000000 -0500 -+++ qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h 2016-04-15 07:04:19.431268227 -0500 -@@ -70,8 +70,8 @@ namespace QPatternist - ForegroundShift = 10, - BackgroundShift = 20, - SpecialShift = 20, -- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift, -- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift -+ ForegroundMask = 0x1f << ForegroundShift, -+ BackgroundMask = 0x7 << BackgroundShift - }; - - public: diff --git a/tools/MINGW-packages/mingw-w64-qt4/0032-qt4-icu59.patch b/tools/MINGW-packages/mingw-w64-qt4/0032-qt4-icu59.patch deleted file mode 100644 index ed6a8b52bf..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0032-qt4-icu59.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- qt-everywhere-opensource-src-4.8.7/src/corelib/tools/qlocale_icu.cpp~ 2017-04-25 07:42:22.000000000 +0000 -+++ qt-everywhere-opensource-src-4.8.7/src/corelib/tools/qlocale_icu.cpp 2017-04-25 07:44:34.675363008 +0000 -@@ -43,6 +43,8 @@ - #include "qlibrary.h" - #include "qdebug.h" - -+#define UCHAR_TYPE unsigned short -+ - #include "unicode/uversion.h" - #include "unicode/ucol.h" - diff --git a/tools/MINGW-packages/mingw-w64-qt4/0100-qt4-build-debug-qmake.patch b/tools/MINGW-packages/mingw-w64-qt4/0100-qt4-build-debug-qmake.patch deleted file mode 100644 index 7a44e3099a..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/0100-qt4-build-debug-qmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/qmake/Makefile.win32-g++-sh 2015-03-21 18:07:24.056403965 +0100 -+++ b/qmake/Makefile.win32-g++-sh 2015-03-21 18:09:40.642912613 +0100 -@@ -12,7 +12,7 @@ - # specific stuff for mingw g++ make - # - CXX = g++ --CFLAGS = -c -o$@ -O \ -+CFLAGS = -c -o$@ -O0 -ggdb \ - -I. -Igenerators -Igenerators/unix \ - -Igenerators/win32 -Igenerators/mac \ - -Igenerators/symbian -Igenerators/integrity \ diff --git a/tools/MINGW-packages/mingw-w64-qt4/PKGBUILD b/tools/MINGW-packages/mingw-w64-qt4/PKGBUILD deleted file mode 100644 index 09568ff83c..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/PKGBUILD +++ /dev/null @@ -1,427 +0,0 @@ -# Maintainer: ole.andre.rodlie@gmail.com - -# Please keep this file exactly the same (except _variant=) -# as {mingw-w64-qt4/PKGBUILD,mingw-w64-qt4-static/PKGBUILD} -#_variant=-static -_variant=-shared - -if [ "${_variant}" = "-static" ]; then - _namesuff="-static" -else - _namesuff= -fi - -_realname=qt4${_namesuff} -pkgbase="mingw-w64-natron_${_realname}" -pkgname="${MINGW_PACKAGE_PREFIX}-natron_${_realname}" - -# qt4-static must be kept in its own prefix hierarchy -# as otherwise it will conflict with qt4 itself -if [ "${_variant}" = "-static" ]; then - _qt4_prefix="${MINGW_PREFIX}/${_realname}" -else - _qt4_prefix="${MINGW_PREFIX}" -fi - -pkgver=4.8.7 -pkgrel=99.5 -arch=('any') -url='https://www.qt.io/' -install=qt4-${CARCH}.install -license=('GPL3' 'LGPL' 'FDL' 'custom') -conflicts=("${MINGW_PACKAGE_PREFIX}-qt4" "${MINGW_PACKAGE_PREFIX}-qt5") -depends=( - "${MINGW_PACKAGE_PREFIX}-gcc-libs" - "${MINGW_PACKAGE_PREFIX}-dbus" - "${MINGW_PACKAGE_PREFIX}-fontconfig" - "${MINGW_PACKAGE_PREFIX}-freetype" - "${MINGW_PACKAGE_PREFIX}-libiconv" - "${MINGW_PACKAGE_PREFIX}-libjpeg" - "${MINGW_PACKAGE_PREFIX}-libmng" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-libtiff" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-openssl" - "${MINGW_PACKAGE_PREFIX}-pcre" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-zlib" - ) -makedepends=( - "bison" - "flex" - "gperf" - "lndir" - "m4" - "perl" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-firebird2" - "${MINGW_PACKAGE_PREFIX}-libmariadbclient" - "${MINGW_PACKAGE_PREFIX}-postgresql" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python" - "${MINGW_PACKAGE_PREFIX}-ruby" - "${MINGW_PACKAGE_PREFIX}-sqlite3" - #"${MINGW_PACKAGE_PREFIX}-perl" - #"${MINGW_PACKAGE_PREFIX}-gperf" - ) -optdepends=( - $([[ "$_variant" == "-shared" ]] && echo \ - "${MINGW_PACKAGE_PREFIX}-libmariadbclient" \ - "${MINGW_PACKAGE_PREFIX}-libfbclient" \ - "${MINGW_PACKAGE_PREFIX}-postgresql") - ) -groups=("${MINGW_PACKAGE_PREFIX}-qt4") -options=('!strip' 'staticlibs') -_pkgfqn="qt-everywhere-opensource-src-${pkgver}" -source=("https://download.qt.io/archive/qt/${pkgver%.*}/${pkgver}/${_pkgfqn}.tar.gz" - 0001-qt-4.6-demo-plugandpaint.patch - 0002-qt-4.8.0-fix-include-windows-h.patch - 0003-qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch - 0004-qt-4.8.0-fix-mysql-driver-build.patch - 0005-qt-4.8.0-no-webkit-tests.patch - 0006-qt-4.8.0-use-fbclient-instead-gds32.patch - 0007-qt-4.8.1-fix-activeqt-compilation.patch - 0008-qt-4.8.3-assistant-4.8.2+gcc-4.7.patch - 0009-qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch - 0010-qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch - 0011-qt4-merge-static-and-shared-library-trees.patch - 0012-qt4-use-correct-pkg-config-static-flags.patch - 0013-qt4-fix-linking-against-static-dbus.patch - 0014-qt-4.8.6-use-force-with-shell-commands.patch - 0015-qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch - 0016-qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch - 0017-qt-4.8.7-mingw-configure.patch - 0018-qt-4.8.7-mingw-unix-tests.patch - 0019-qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch - 0020-qt-4.8.5-qmake-implib.patch - 0021-qt-4.8.7-fix-testcon-static-compile.patch - 0030-moc-boost-workaround.patch - 0031-qt4-gcc6.patch - 0032-qt4-icu59.patch - 0100-qt4-build-debug-qmake.patch - patch-qt-custom-threadpool.diff - relwithdeb.diff - qt4-pcre.patch - 0001-Enable-building-with-C-11-and-C-14.patch - qt4-selection-flags-static_cast.patch - qt-CVE-2020-17507.patch - qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch - qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch - qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch - qt-everywhere-opensource-src-4.8.7-gcc11.patch - qt-everywhere-opensource-src-4.8.7-qforeach.patch - force-cpp98-and-win7.diff - fix-win-openssl-load.diff - ) -sha256sums=('e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0' - 'e7c8fccf933dfee061b2960b5754e4835e7cb87c0e36166d3b11d69632732215' - '5e6a61ced784d7d24c65d81e769b67b8f6066a33581c8b17cdf374a4c723cd23' - 'fba6cf2b0bd5f6229b21b1cf4adf093c216a10c97255527d71979599b7047be8' - '002714db2e77c6a0c753d0caa9b63da0831dbb87cf542d660fd74d61aa12db90' - '1e0eb85e1a88438ee1f99b5d27b775bf7d077bebf5de2e57fe831d0e39ce6df1' - '8346737d3924598c1197202f8fcaa5cad4a5b81c2947797221357992b25260bd' - '45cd7287a2b51a31a1e89831f4ac71aa933d504f05c780185319b91247116db5' - '32e5e4cf899bbd4387c8c3633e51739b8e839ff2626b8386ea6153ae2408ead2' - 'ebd267ec82e718516cf8fb6d14035ae1b6e251d80ccef098f1514bd7599a9cb0' - '1402443bca2ae19e983b8bbc3349c7c5d9f3f7ea53e88e339225737e76d38a64' - '1f20dc102fa126f585e2fc84eb96bfe9ca617c4e475eb11f438ebcaa1cdce3d5' - '723bcb7b17cf71bde47d223646de22b0dec715055b4a9306eb8fbf7023731f61' - 'c1084a627ec116c59ba91ed5729a7522ec82bb50457dc080161f414e6bb7d48f' - 'c9f09112daf40f5b896035d06eb71ead68db30197b8b4fcfbee6d3fcc895a7f4' - 'db6a5287c23e48c12bf1869eda7e9dd4482526df3202a78343697afa73a6ee5e' - 'e5d18b22410dedd75341edcaeb4cb32458c467d22459c754fb5c0ee711d4bb5b' - '0bb41f9ddccbf5a649ffd73c1675ac3cbe7b05698abd875205ffe4f6e24913de' - '00bc046d0c5de7bbb30d87c4fa76a0e699bb0f65bd262e5e4f4a753c46d6e757' - 'e0565cf9b3e54bbb030e478a93181314de88bebcd3bb25cbe8e597fbc5032e09' - 'e77b682e3728b835fe36d9dc48ab8c7472aed6d2ecf95a38219db95152602b32' - 'ddee93f387730551b5f8f6f468f97c5e6fd9b43a21458171ebd7ed0e9a909043' - '62bc20838da22d832c550b9d38f98afb8fa4874915466945ea320575e264869a' - '51da49e41edac66559d3ec8dd0a152995a51a53e5d1f63f09fa089a8af7e3112' - '61d6bf45649c728dec5f8d22be5b496ed9d40f52c2c70102696d07133cd1750d' - 'e19a32b9dc050b3a605a6a5cb40fc3da8d8167ef240c105bb0737cc8bebadceb' - '42c555937269b36c1a34d2a183ea98cf8ab1aac9f4af447ece635a49e738524e' - '453cb5bd4a0fc1183636db9a22360f2d6fa58b43f0b5ed02a80c2d1e0a894be0' - '92ce0bf38d902acc2f0123f300568f8490849d8602b4919b5ffe55592e1146bb' - '7a25e1f42e7a689a4bb3d71f412d03e1c3c45676767ce5c3a2dce9835a9e4fae' - '3c35b393b3c4397d4e69e949cd5a77df590938c0f95731c771bf6be6565deaba' - 'e5f8db55f33352034e55a98ff035192b7ccb87a5f54ae44ccbb2982fd43afa90' - 'b59135832f6e72dc38e26fc742f5160aa5246b31cddf26948da7237784c5d9bb' - '349c2f47ed499bacbf0e68f67bed4711783a14c6ea9276195368b4cbda81c1d6' - 'ca1ee58b37dcd1d8af86b41f8774043d8ebfc179cf36141e297186416c079ff9' - '8a6c3584cc2822809567bf0194a4b937f4e6768a12c50c9405e49558ab9a5af5' - '9c049b66ffe4c5e5976d68c28c514c2eca89b4846d0ae53c78964944dc8b4e88' - 'd4ebcd12ea6d3e1880d32a6f170b737b850748d0afcf0319fbe42ccc956389a8' - '0cb9be5382f8347ea83ebc4252c36c63bcb59af8aa06fdb562f2deffb55f937f' - ) - -prepare() { - cd ${srcdir}/${_pkgfqn} - patch -p1 -i ${srcdir}/0001-qt-4.6-demo-plugandpaint.patch - patch -p1 -i ${srcdir}/0002-qt-4.8.0-fix-include-windows-h.patch - patch -p1 -i ${srcdir}/0003-qt-4.8.0-fix-javascript-jit-on-mingw-x86_64.patch - patch -p1 -i ${srcdir}/0004-qt-4.8.0-fix-mysql-driver-build.patch - patch -p1 -i ${srcdir}/0005-qt-4.8.0-no-webkit-tests.patch - patch -p1 -i ${srcdir}/0006-qt-4.8.0-use-fbclient-instead-gds32.patch - patch -p1 -i ${srcdir}/0007-qt-4.8.1-fix-activeqt-compilation.patch - patch -p1 -i ${srcdir}/0008-qt-4.8.3-assistant-4.8.2+gcc-4.7.patch - patch -p1 -i ${srcdir}/0009-qt-4.8.3-qmake-cmd-mkdir-slash-direction.patch - patch -p1 -i ${srcdir}/0010-qt-4.8.5-dont-set-qt-dll-define-for-static-builds.patch - patch -p1 -i ${srcdir}/0011-qt4-merge-static-and-shared-library-trees.patch - patch -p1 -i ${srcdir}/0012-qt4-use-correct-pkg-config-static-flags.patch - patch -p1 -i ${srcdir}/0013-qt4-fix-linking-against-static-dbus.patch - patch -p1 -i ${srcdir}/0014-qt-4.8.6-use-force-with-shell-commands.patch - patch -p1 -i ${srcdir}/0015-qt-4-8-makefile_generator_gen_pkgconfig_fix_mingw.patch - patch -p1 -i ${srcdir}/0016-qt-4.8.7-dont-add-resource-files-to-qmake-libs.patch - patch -p1 -i ${srcdir}/0017-qt-4.8.7-mingw-configure.patch - patch -p1 -i ${srcdir}/0018-qt-4.8.7-mingw-unix-tests.patch - patch -p1 -i ${srcdir}/0019-qt-4.8.7-MinGW-w64-fix-qmng-define-MNG_USE_DLL-and-use-MNG_DECL.patch - patch -p2 -i ${srcdir}/0020-qt-4.8.5-qmake-implib.patch - patch -p1 -i ${srcdir}/0021-qt-4.8.7-fix-testcon-static-compile.patch - patch -p1 -i ${srcdir}/0030-moc-boost-workaround.patch - patch -p1 -i ${srcdir}/0031-qt4-gcc6.patch - patch -p1 -i ${srcdir}/0032-qt4-icu59.patch - patch -p0 -i ${srcdir}/patch-qt-custom-threadpool.diff - patch -p0 -i ${srcdir}/relwithdeb.diff - patch -p0 -i ${srcdir}/qt4-pcre.patch - patch -p1 -i ${srcdir}/0001-Enable-building-with-C-11-and-C-14.patch - patch -p1 -i ${srcdir}/qt4-selection-flags-static_cast.patch - patch -p1 -i ${srcdir}/qt-CVE-2020-17507.patch - patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch - patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch - patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch - patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-gcc11.patch - patch -p1 -i ${srcdir}/qt-everywhere-opensource-src-4.8.7-qforeach.patch - patch -p0 -i ${srcdir}/force-cpp98-and-win7.diff - patch -p0 -i ${srcdir}/fix-win-openssl-load.diff - - if check_option "debug" "y"; then - patch -p1 -i ${srcdir}/0100-qt4-build-debug-qmake.patch - fi - - #cd ${srcdir} - #mkdir ${CARCH} - #lndir ${srcdir}/${_pkgfqn} ${srcdir}/${CARCH} - #cd ${CARCH} - - local _optim= - case ${MINGW_CHOST} in - i686*) - _optim+=" -march=i686 -mtune=core2" - ;; - x86_64*) - _optim+=" -march=nocona -mtune=core2" - ;; - esac - - local STATIC_LD= - - sed -i "s|^QMAKE_CFLAGS =\(.*\)$|QMAKE_CFLAGS = \1 ${_optim} |g" mkspecs/win32-g++/qmake.conf - sed -i "s|^QMAKE_LFLAGS =\(.*\)$|QMAKE_LFLAGS = \1 ${STATIC_LD}|g" mkspecs/win32-g++/qmake.conf - sed -i "s|^QMAKE_LIBS =\(.*\)$|QMAKE_LIBS =\1 -llcms2 -llzma|g" mkspecs/win32-g++/qmake.conf - - cd ${srcdir} - mv ${_pkgfqn} ${_realname}-${pkgver} -} - -build() { - cd ${srcdir}/${_realname}-${pkgver} - - local _buildpkgdir=${pkgdirbase}/${pkgname}/${_qt4_prefix} - mkdir -p ${_buildpkgdir} - local QTDIR_WIN=$(cygpath -am ${_buildpkgdir}) - - local pkg_conf_inc="-I ${MINGW_PREFIX}/include/mariadb" - #pkg_conf_inc=$(pkg-config --dont-define-prefix --cflags-only-I libxml-2.0 dbus-1) - export PATH=${srcdir}/${_realname}-${pkgver}/bin:${srcdir}/${_realname}-${pkgver}/lib:${PATH} - - OPENSSL_LIBS="`pkg-config --libs-only-l openssl`" \ - ./configure \ - -prefix ${_buildpkgdir} \ - -datadir ${_buildpkgdir}/share/qt4 \ - -docdir ${_buildpkgdir}/share/qt4/doc \ - -headerdir ${_buildpkgdir}/include/qt4 \ - -plugindir ${_buildpkgdir}/share/qt4/plugins \ - -importdir ${_buildpkgdir}/share/qt4/imports \ - -translationdir ${_buildpkgdir}/share/qt4/translations \ - -sysconfdir ${_buildpkgdir}/etc \ - -examplesdir ${_buildpkgdir}/share/qt4/examples \ - -demosdir ${_buildpkgdir}/share/qt4/demos \ - -opensource \ - -confirm-license \ - -debug-and-release \ - -platform win32-g++ \ - -xplatform win32-g++ \ - -plugin-sql-ibase \ - -plugin-sql-mysql \ - -plugin-sql-psql \ - -plugin-sql-sqlite \ - -plugin-sql-odbc \ - -fontconfig \ - -openssl \ - -dbus \ - ${_variant} \ - -iconv \ - -qt3support \ - -optimized-qmake \ - -exceptions \ - -fast \ - -force-pkg-config \ - -little-endian \ - -xmlpatterns \ - -multimedia \ - -no-webkit \ - -audio-backend \ - -phonon \ - -phonon-backend \ - -javascript-jit \ - -system-libmng \ - -system-libtiff \ - -system-libpng \ - -system-libjpeg \ - -system-sqlite \ - -system-zlib \ - -native-gestures \ - -s60 \ - -largefile \ - -no-sse4.2 -no-avx -no-neon \ - -nomake tests \ - -nomake demos \ - -nomake examples \ - -verbose \ - ${pkg_conf_inc} - - # Fix building - #cp -rf mkspecs ${pkgdir}${MINGW_PREFIX}/ - - make - -} - -package() { - cd ${srcdir}/${_realname}-${pkgver} - export PATH=${srcdir}/${CARCH}/bin:${PATH} - make install - rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.dll - - if [ "${_variant}" = "-static" ]; then - - rm -rf ${pkgdir}${MINGW_PREFIX}/bin - rm -rf ${pkgdir}${MINGW_PREFIX}/include - rm -rf ${pkgdir}${MINGW_PREFIX}/share - rm -rf ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig - rm -f ${pkgdir}${MINGW_PREFIX}/lib/*.prl - - else - - plain "Install private headers" - local PRIVATE_HEADERS=( - phonon - Qt3Support - QtCore - QtDBus - QtDeclarative - QtDesigner - QtGui - QtHelp - QtMeeGoGraphicsSystemHelper - QtMultimedia - QtNetwork - QtOpenGl - QtOpenVG - QtScript - QtScriptTools - QtSql - QtSvg - QtTest - QtUiTools - QtWebkit - QtXmlPatterns - ) - - for priv_headers in ${PRIVATE_HEADERS[@]} - do - mkdir -p ${pkgdir}${MINGW_PREFIX}/include/Qt4/${priv_headers} - mkdir -p ${pkgdir}${MINGW_PREFIX}/include/Qt4/${priv_headers}/private - done - - plain "----> Qt3Support" - cp -rfv `find src/qt3support -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/Qt3Support/private - cp -rfv `find src/qt3support -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/Qt3Support/private - - plain "----> QtCore" - cp -rfv `find src/corelib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtCore/private - cp -rfv `find src/corelib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtCore/private - - plain "----> QtDBus" - cp -rfv `find src/dbus -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDBus/private - - plain "----> QtDeclarative" - cp -rfv `find src/declarative -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDeclarative/private - - plain "----> QtDesigner" - cp -rfv `find tools/designer/src/lib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDesigner/private - cp -rfv `find tools/designer/src/lib -type f -name "*_pch.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtDesigner/private - - plain "----> QtGui" - cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtGui/private - cp -rfv `find src/gui -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtGui/private - - plain "----> QtHelp" - cp -rfv `find tools/assistant -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtHelp/private - - plain "----> QtMeeGoGraphicsSystemHelper" - cp -rfv `find tools/qmeegographicssystemhelper -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtMeeGoGraphicsSystemHelper/private - - plain "----> QtMultimedia" - cp -rfv `find src/multimedia -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtMultimedia/private - - plain "----> QtNetwork" - cp -rfv `find src/network -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtNetwork/private - - plain "----> QtOpenGl" - cp -rfv `find src/opengl -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtOpenGl/private - - plain "----> QtOpenVG" - cp -rfv `find src/openvg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtOpenVG/private - - plain "----> QtScript" - cp -rfv `find src/script -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtScript/private - - plain "----> QtScriptTools" - cp -rfv `find src/scripttools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtScriptTools/private - - plain "----> QtSql" - cp -rfv `find src/sql -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtSql/private - - plain "----> QtSvg" - cp -rfv `find src/svg -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtSvg/private - - plain "----> QtTest" - cp -rfv `find src/testlib -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtTest/private - - plain "----> QtUiTools" - cp -rfv `find tools/designer/src/uitools -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtUiTools/private - - plain "----> QtWebkit" - cp -rfv `find src/3rdparty/webkit -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtWebkit/private - - plain "----> QtXmlPatterns" - cp -rfv `find src/xmlpatterns -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/QtXmlPatterns/private - - plain "----> phonon" - cp -rfv `find src/3rdparty/phonon/phonon -type f -name "*_p.h"` ${pkgdir}${MINGW_PREFIX}/include/Qt4/phonon/private - - plain "---> Done install private headers" - - cp -rf lib/pkgconfig/* ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/ - fi - - #for tool in ${pkgdir}${MINGW_PREFIX}/bin/*.exe ; do - # mv ${pkgdir}${MINGW_PREFIX}/bin/${tool} ${pkgdir}${MINGW_PREFIX}/bin/${tool%.exe}-qt4.exe - #done - - sed -i 's/ -std=c++98//g' ${pkgdir}/${MINGW_PREFIX}/share/qt4/mkspecs/win32-g++/qmake.conf -} diff --git a/tools/MINGW-packages/mingw-w64-qt4/fix-win-openssl-load.diff b/tools/MINGW-packages/mingw-w64-qt4/fix-win-openssl-load.diff deleted file mode 100644 index bbc73b8e8d..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/fix-win-openssl-load.diff +++ /dev/null @@ -1,19 +0,0 @@ ---- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2022-12-28 21:57:38.113422400 +0100 -+++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2022-12-28 21:59:57.432599300 +0100 -@@ -492,14 +492,14 @@ - pair.first = 0; - pair.second = 0; - -- QSystemLibrary *ssleay32 = new QSystemLibrary(QLatin1String("ssleay32")); -+ QSystemLibrary *ssleay32 = new QSystemLibrary(QLatin1String("libssl-1_1-x64")); - if (!ssleay32->load(false)) { - // Cannot find ssleay32.dll - delete ssleay32; - return pair; - } - -- QSystemLibrary *libeay32 = new QSystemLibrary(QLatin1String("libeay32")); -+ QSystemLibrary *libeay32 = new QSystemLibrary(QLatin1String("libcrypto-1_1-x64")); - if (!libeay32->load(false)) { - delete ssleay32; - delete libeay32; diff --git a/tools/MINGW-packages/mingw-w64-qt4/force-cpp98-and-win7.diff b/tools/MINGW-packages/mingw-w64-qt4/force-cpp98-and-win7.diff deleted file mode 100644 index 991ad386d9..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/force-cpp98-and-win7.diff +++ /dev/null @@ -1,24 +0,0 @@ ---- src/corelib/global/qt_windows.h.orig 2022-07-19 17:58:47.037436200 +0200 -+++ src/corelib/global/qt_windows.h 2022-07-19 18:00:32.679623800 +0200 -@@ -56,7 +56,7 @@ - #if defined(Q_CC_MINGW) - // mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation - #ifndef WINVER --#define WINVER 0x500 -+#define WINVER 0x601 - #endif - #endif - ---- mkspecs/win32-g++/qmake.conf.orig 2022-07-20 00:18:26.081755800 +0200 -+++ mkspecs/win32-g++/qmake.conf 2022-07-20 00:21:02.583601300 +0200 -@@ -40,8 +40,8 @@ - QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS - QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON - QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF --QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE --QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -std=c++98 -+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -std=c++98 - QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC - QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD - QMAKE_CXXFLAGS_RTTI_ON = -frtti diff --git a/tools/MINGW-packages/mingw-w64-qt4/patch-qt-custom-threadpool.diff b/tools/MINGW-packages/mingw-w64-qt4/patch-qt-custom-threadpool.diff deleted file mode 100644 index 1cd25b59f9..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/patch-qt-custom-threadpool.diff +++ /dev/null @@ -1,149 +0,0 @@ ---- src/corelib/concurrent/qthreadpool.cpp.orig 2015-05-07 16:14:48.000000000 +0200 -+++ src/corelib/concurrent/qthreadpool.cpp 2016-03-18 11:00:22.000000000 +0100 -@@ -45,6 +45,8 @@ - - #ifndef QT_NO_THREAD - -+static QScopedPointer gThreadPool(new QThreadPool()); -+ - QT_BEGIN_NAMESPACE - - inline bool operator<(int priority, const QPair &p) -@@ -56,23 +58,6 @@ - return priority < p.second; - } - --Q_GLOBAL_STATIC(QThreadPool, theInstance) -- --/* -- QThread wrapper, provides synchronization against a ThreadPool --*/ --class QThreadPoolThread : public QThread --{ --public: -- QThreadPoolThread(QThreadPoolPrivate *manager); -- void run(); -- void registerThreadInactive(); -- -- QWaitCondition runnableReady; -- QThreadPoolPrivate *manager; -- QRunnable *runnable; --}; -- - /* - QThreadPool private class. - */ -@@ -81,8 +66,8 @@ - /*!\internal - - */ --QThreadPoolThread::QThreadPoolThread(QThreadPoolPrivate *manager) -- :manager(manager), runnable(0) -+QThreadPoolThread::QThreadPoolThread() -+ :manager(0), runnable(0) - { } - - /* \internal -@@ -240,13 +225,20 @@ - return activeThreadCount > maxThreadCount && (activeThreadCount - reservedThreads) > 1; - } - -+QThreadPoolThread* QThreadPool::createThreadPoolThread() const -+{ -+ QThreadPoolThread* ret = new QThreadPoolThread(); -+ ret->setObjectName(QLatin1String("Thread (pooled)")); -+ return ret; -+} -+ - /*! \internal - - */ - void QThreadPoolPrivate::startThread(QRunnable *runnable) - { -- QScopedPointer thread(new QThreadPoolThread(this)); -- thread->setObjectName(QLatin1String("Thread (pooled)")); -+ QScopedPointer thread(q_func()->createThreadPoolThread()); -+ thread->manager = this; - allThreads.insert(thread.data()); - ++activeThreads; - -@@ -444,7 +436,13 @@ - */ - QThreadPool *QThreadPool::globalInstance() - { -- return theInstance(); -+ return gThreadPool.data(); -+} -+ -+void -+QThreadPool::setGlobalInstance(QThreadPool* instance) -+{ -+ gThreadPool.reset(instance); - } - - /*! ---- src/corelib/concurrent/qthreadpool.h.orig 2015-05-07 16:14:48.000000000 +0200 -+++ src/corelib/concurrent/qthreadpool.h 2016-03-18 11:01:55.000000000 +0100 -@@ -46,15 +46,43 @@ - - #include - #include -+#include - - #ifndef QT_NO_THREAD - -+#define QT_CUSTOM_THREADPOOL -+ - QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE - - QT_MODULE(Core) - -+ - class QThreadPoolPrivate; -+class QThreadPool; -+ -+/* -+ QThread wrapper, provides synchronization against a ThreadPool -+ */ -+class Q_CORE_EXPORT QThreadPoolThread : public QThread -+{ -+public: -+ QThreadPoolThread(); -+ void run(); -+ -+private: -+ -+ friend class QThreadPoolPrivate; -+ friend class QThreadPool; -+ -+ void registerThreadInactive(); -+ -+ QWaitCondition runnableReady; -+ QThreadPoolPrivate *manager; -+ QRunnable *runnable; -+}; -+ -+ - class Q_CORE_EXPORT QThreadPool : public QObject - { - Q_OBJECT -@@ -69,6 +97,7 @@ - ~QThreadPool(); - - static QThreadPool *globalInstance(); -+ static void setGlobalInstance(QThreadPool* instance); - - void start(QRunnable *runnable, int priority = 0); - bool tryStart(QRunnable *runnable); -@@ -86,6 +115,10 @@ - - void waitForDone(); - bool waitForDone(int msecs); -+ -+protected: -+ -+ virtual QThreadPoolThread* createThreadPoolThread() const; - }; - - QT_END_NAMESPACE diff --git a/tools/MINGW-packages/mingw-w64-qt4/qmake.conf.orig b/tools/MINGW-packages/mingw-w64-qt4/qmake.conf.orig deleted file mode 100644 index 6909b3b8a0..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qmake.conf.orig +++ /dev/null @@ -1,118 +0,0 @@ -# -# qmake configuration for win32-g++ -# -# Written for MinGW -# -# Cross compile example for i686-w64-mingw32-g++: -# configure -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -# - -MAKEFILE_GENERATOR = MINGW - -load(device_config) - -equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe - -TEMPLATE = app -CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header -QT += core gui -DEFINES += UNICODE -QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 - -QMAKE_EXT_OBJ = .o -QMAKE_EXT_RES = _res.o - -QMAKE_CC = $${CROSS_COMPILE}gcc -QMAKE_LEX = flex -QMAKE_LEXFLAGS = -QMAKE_YACC = byacc -QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -pipe -QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -Wall -Wextra -QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g -QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses - -QMAKE_CXX = $${CROSS_COMPILE}g++ -QMAKE_CXXFLAGS = $$QMAKE_CFLAGS -QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS -QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF -QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG -QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC -QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD -QMAKE_CXXFLAGS_RTTI_ON = -frtti -QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti -QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads -QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions - -QMAKE_INCDIR = -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] - -QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< -QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src -QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< - -QMAKE_LINK = $${CROSS_COMPILE}g++ -QMAKE_LINK_C = $${CROSS_COMPILE}gcc -QMAKE_LFLAGS = -QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -QMAKE_LFLAGS_EXCEPTIONS_OFF = -QMAKE_LFLAGS_RELEASE = -Wl,-s -QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console -QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows -QMAKE_LFLAGS_DLL = -shared -QMAKE_LINK_OBJECT_MAX = 10 -QMAKE_LINK_OBJECT_SCRIPT= object_script -QMAKE_PREFIX_STATICLIB = lib -QMAKE_EXTENSION_STATICLIB = a - - -QMAKE_LIBS = -QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 -QMAKE_LIBS_NETWORK = -lws2_32 -QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32 -QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 -QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain - -!isEmpty(QMAKE_SH) { - MINGW_IN_SHELL = 1 - QMAKE_DIR_SEP = / - QMAKE_QMAKE ~= s,\\\\,/, - QMAKE_COPY = cp - QMAKE_COPY_DIR = cp -r - QMAKE_MOVE = mv - QMAKE_DEL_FILE = rm - QMAKE_MKDIR = mkdir -p - QMAKE_DEL_DIR = rmdir - QMAKE_CHK_DIR_EXISTS = test -d -} else { - QMAKE_COPY = copy /y - QMAKE_COPY_DIR = xcopy /s /q /y /i - QMAKE_MOVE = move - QMAKE_DEL_FILE = del - QMAKE_MKDIR = mkdir - QMAKE_DEL_DIR = rmdir - QMAKE_CHK_DIR_EXISTS = if not exist -} - -QMAKE_MOC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}moc$${EXE_SUFFIX} -QMAKE_UIC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}uic$${EXE_SUFFIX} -QMAKE_IDC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}idc$${EXE_SUFFIX} -QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc$${EXE_SUFFIX} - -QMAKE_IDL = midl -QMAKE_LIB = $${CROSS_COMPILE}ar -ru -QMAKE_RC = $${CROSS_COMPILE}windres -QMAKE_ZIP = zip -r -9 - -QMAKE_STRIP = $${CROSS_COMPILE}strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded -load(qt_config) diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-4.8.4-fix-sse-suppport-build-regression.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-4.8.4-fix-sse-suppport-build-regression.patch deleted file mode 100644 index a2329f72da..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-4.8.4-fix-sse-suppport-build-regression.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/gui/gui.pro.orig 2012-12-09 18:18:57.962442233 +0100 -+++ b/src/gui/gui.pro 2012-12-09 18:20:44.086202991 +0100 -@@ -80,7 +80,7 @@ - DEFINES += QT_NO_DIRECTWRITE - } - --contains(QMAKE_MAC_XARCH, no) { -+mac:contains(QMAKE_MAC_XARCH, no) { - DEFINES += QT_NO_MAC_XARCH - } else { - win32-g++*|!win32:!win32-icc*:!macx-icc* { diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-CVE-2020-17507.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-CVE-2020-17507.patch deleted file mode 100644 index 3504b36820..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-CVE-2020-17507.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp.me qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp ---- qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp.me 2020-08-13 11:20:45.943402169 +0200 -+++ qt-everywhere-opensource-src-4.8.7/src/gui/image/qxbmhandler.cpp 2020-08-13 11:21:26.025976881 +0200 -@@ -154,7 +154,9 @@ static bool read_xbm_body(QIODevice *dev - w = (w+7)/8; // byte width - - while (y < h) { // for all encoded bytes... -- if (p) { // p = "0x.." -+ if (p && p < (buf + readBytes - 3)) { // p = "0x.." -+ if (!isxdigit(p[2]) || !isxdigit(p[3])) -+ return false; - *b++ = hex2byte(p+2); - p += 2; - if (++x == w && ++y < h) { diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch deleted file mode 100644 index 8b9de2afc3..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-clamp-parsed-doubles-to-float-representtable-values.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp.me qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp ---- qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp.me 2021-03-09 14:23:00.636840796 +0100 -+++ qt-everywhere-opensource-src-4.8.7/src/svg/qsvghandler.cpp 2021-03-09 21:34:46.240482104 +0100 -@@ -68,6 +68,7 @@ - #include "private/qmath_p.h" - - #include "float.h" -+#include - - QT_BEGIN_NAMESPACE - -@@ -630,15 +631,10 @@ static qreal toDouble(const QChar *&str) - if (neg) - val = -val; - } else { --#if defined(Q_WS_QWS) && !defined(Q_OS_VXWORKS) -- if(sizeof(qreal) == sizeof(float)) -- val = strtof(temp, 0); -- else --#endif -- { -- bool ok = false; -- val = qstrtod(temp, 0, &ok); -- } -+ val = QByteArray::fromRawData(temp, pos).toDouble(); -+ // Do not tolerate values too wild to be represented normally by floats -+ if (std::fpclassify(float(val)) != FP_NORMAL) -+ val = 0; - } - return val; - -@@ -2945,6 +2941,8 @@ static QSvgStyleProperty *createRadialGr - ncy = toDouble(cy); - if (!r.isEmpty()) - nr = toDouble(r); -+ if (nr < 0.5) -+ nr = 0.5; - - qreal nfx = ncx; - if (!fx.isEmpty()) diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc11.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc11.patch deleted file mode 100644 index 94764d687c..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc11.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp -index d66075e4..b51a27ad 100644 ---- a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp -+++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp -@@ -74,7 +74,7 @@ PassRefPtr HTMLImageElement::createForJSConstructor(Document* - RefPtr image = adoptRef(new HTMLImageElement(imgTag, document)); - if (optionalWidth) - image->setWidth(*optionalWidth); -- if (optionalHeight > 0) -+ if (optionalHeight != 0) - image->setHeight(*optionalHeight); - return image.release(); - } -diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp -index 61c5389f..8d43d14b 100644 ---- a/tools/linguist/linguist/messagemodel.cpp -+++ b/tools/linguist/linguist/messagemodel.cpp -@@ -183,7 +183,7 @@ static int calcMergeScore(const DataModel *one, const DataModel *two) - if (ContextItem *c = one->findContext(oc->context())) { - for (int j = 0; j < oc->messageCount(); ++j) { - MessageItem *m = oc->messageItem(j); -- if (c->findMessage(m->text(), m->comment()) >= 0) -+ if (c->findMessage(m->text(), m->comment()) != 0) - ++inBoth; - } - } diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch deleted file mode 100644 index 7e79d2174b..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-gcc8_qtscript.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 qt-everywhere-opensource-src-4.8.7/src/script/script.pro ---- qt-everywhere-opensource-src-4.8.7/src/script/script.pro.gcc8 2015-05-07 09:14:43.000000000 -0500 -+++ qt-everywhere-opensource-src-4.8.7/src/script/script.pro 2018-05-19 16:01:24.699926959 -0500 -@@ -91,6 +91,9 @@ symbian { - TARGET.UID3=0x2001B2E1 - } - -+# hack around gcc8 optimization bug with -O2 -+QMAKE_CXXFLAGS_RELEASE += -O1 -+ - symbian { - symbian-abld|symbian-sbsv2 { - MMP_RULES += ALWAYS_BUILD_AS_ARM diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch deleted file mode 100644 index 6a99460309..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-openssl-1.1.patch +++ /dev/null @@ -1,694 +0,0 @@ -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslcertificate.cpp 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslcertificate.cpp 2018-01-05 17:44:16.997588265 +0100 -@@ -259,10 +259,10 @@ - QByteArray QSslCertificate::version() const - { - QMutexLocker lock(QMutexPool::globalInstanceGet(d.data())); -- if (d->versionString.isEmpty() && d->x509) -+ if (d->versionString.isEmpty() && d->x509) { - d->versionString = -- QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1); -- -+ QByteArray::number(qlonglong(q_X509_get_version(d->x509)) + 1); -+ } - return d->versionString; - } - -@@ -276,7 +276,7 @@ - { - QMutexLocker lock(QMutexPool::globalInstanceGet(d.data())); - if (d->serialNumberString.isEmpty() && d->x509) { -- ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber; -+ ASN1_INTEGER *serialNumber = q_X509_get_serialNumber(d->x509); - // if we cannot convert to a long, just output the hexadecimal number - if (serialNumber->length > 4) { - QByteArray hexString; -@@ -489,24 +489,33 @@ - QSslKey key; - - key.d->type = QSsl::PublicKey; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - X509_PUBKEY *xkey = d->x509->cert_info->key; -+#else -+ X509_PUBKEY *xkey = q_X509_get_X509_PUBKEY(d->x509); -+#endif - EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey); - Q_ASSERT(pkey); - -- if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) { -+ int key_id; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ key_id = q_EVP_PKEY_type(pkey->type); -+#else -+ key_id = q_EVP_PKEY_base_id(pkey); -+#endif -+ if (key_id == EVP_PKEY_RSA) { - key.d->rsa = q_EVP_PKEY_get1_RSA(pkey); - key.d->algorithm = QSsl::Rsa; - key.d->isNull = false; -- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) { -+ } else if (key_id == EVP_PKEY_DSA) { - key.d->dsa = q_EVP_PKEY_get1_DSA(pkey); - key.d->algorithm = QSsl::Dsa; - key.d->isNull = false; -- } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) { -+ } else if (key_id == EVP_PKEY_DH) { - // DH unsupported - } else { - // error? - } -- - q_EVP_PKEY_free(pkey); - return key; - } -@@ -687,7 +696,11 @@ - unsigned char *data = 0; - int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e)); - info[QString::fromUtf8(obj)] = QString::fromUtf8((char*)data, size); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - q_CRYPTO_free(data); -+#else -+ q_CRYPTO_free(data, __FILE__, __LINE__); -+#endif - } - return info; - } -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslkey.cpp 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslkey.cpp 2018-01-05 18:00:27.453937599 +0100 -@@ -321,8 +321,19 @@ - { - if (d->isNull) - return -1; -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - return (d->algorithm == QSsl::Rsa) - ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p); -+#else -+ if (d->algorithm == QSsl::Rsa) { -+ return q_RSA_bits(d->rsa); -+ } else { -+ const BIGNUM *p = (const BIGNUM *) NULL; -+ q_DSA_get0_pqg(d->dsa, &p, (const BIGNUM **) NULL, (const BIGNUM **) NULL); -+ return q_BN_num_bits(p); -+ } -+#endif -+ - } - - /*! -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl.cpp 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl.cpp 2018-01-05 12:06:06.336990956 +0100 -@@ -93,6 +93,7 @@ - bool QSslSocketPrivate::s_loadedCiphersAndCerts = false; - bool QSslSocketPrivate::s_loadRootCertsOnDemand = false; - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - /* \internal - - From OpenSSL's thread(3) manual page: -@@ -174,6 +175,8 @@ - } - } // extern "C" - -+#endif //OPENSSL_VERSION_NUMBER >= 0x10100000L -+ - QSslSocketBackendPrivate::QSslSocketBackendPrivate() - : ssl(0), - ctx(0), -@@ -222,9 +225,12 @@ - ciph.d->encryptionMethod = descriptionList.at(4).mid(4); - ciph.d->exportable = (descriptionList.size() > 6 && descriptionList.at(6) == QLatin1String("export")); - -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - ciph.d->bits = cipher->strength_bits; - ciph.d->supportedBits = cipher->alg_bits; -- -+#else -+ ciph.d->bits = q_SSL_CIPHER_get_bits(cipher, &ciph.d->supportedBits); -+#endif - } - return ciph; - } -@@ -363,7 +369,7 @@ - // - // See also: QSslContext::fromConfiguration() - if (caCertificate.expiryDate() >= QDateTime::currentDateTime()) { -- q_X509_STORE_add_cert(ctx->cert_store, (X509 *)caCertificate.handle()); -+ q_X509_STORE_add_cert(q_SSL_CTX_get_cert_store(ctx), (X509 *)caCertificate.handle()); - } - } - -@@ -500,8 +506,10 @@ - */ - void QSslSocketPrivate::deinitialize() - { -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - q_CRYPTO_set_id_callback(0); - q_CRYPTO_set_locking_callback(0); -+#endif - } - - /*! -@@ -522,13 +530,17 @@ - return false; - - // Check if the library itself needs to be initialized. -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - QMutexLocker locker(openssl_locks()->initLock()); -+#endif - if (!s_libraryLoaded) { - s_libraryLoaded = true; - - // Initialize OpenSSL. -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - q_CRYPTO_set_id_callback(id_function); - q_CRYPTO_set_locking_callback(locking_function); -+#endif - if (q_SSL_library_init() != 1) - return false; - q_SSL_load_error_strings(); -@@ -567,7 +579,9 @@ - - void QSslSocketPrivate::ensureCiphersAndCertsLoaded() - { -- QMutexLocker locker(openssl_locks()->initLock()); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ QMutexLocker locker(openssl_locks()->initLock()); -+#endif - if (s_loadedCiphersAndCerts) - return; - s_loadedCiphersAndCerts = true; -@@ -659,13 +673,18 @@ - STACK_OF(SSL_CIPHER) *supportedCiphers = q_SSL_get_ciphers(mySsl); - for (int i = 0; i < q_sk_SSL_CIPHER_num(supportedCiphers); ++i) { - if (SSL_CIPHER *cipher = q_sk_SSL_CIPHER_value(supportedCiphers, i)) { -- if (cipher->valid) { -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ if (cipher->valid) { -+#endif - QSslCipher ciph = QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(cipher); - if (!ciph.isNull()) { - if (!ciph.name().toLower().startsWith(QLatin1String("adh"))) - ciphers << ciph; - } -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - } -+#endif - } - } - -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_p.h 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_p.h 2018-01-05 12:06:06.337990940 +0100 -@@ -84,6 +84,10 @@ - #include - #endif - -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#define OPENSSL_NO_SSL2 -+#endif -+ - #if OPENSSL_VERSION_NUMBER >= 0x10000000L - typedef _STACK STACK; - #endif -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols.cpp 2018-01-05 17:59:10.636973932 +0100 -@@ -111,16 +111,30 @@ - DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return); - DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return) - DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return) -+#else -+DEFINEFUNC(BIO *, BIO_new, const BIO_METHOD *a, a, return 0, return) -+#endif - DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return) - DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return) -+#else -+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return) -+#endif - DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return) - DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return) - DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG) - DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG) -+#endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG) -+#else -+DEFINEFUNC3(void, CRYPTO_free, void *a, a, const char *b, b, int c, c, return, DUMMYARG) -+#endif - DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG) - #if OPENSSL_VERSION_NUMBER < 0x00908000L - DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return) -@@ -157,6 +171,7 @@ - DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG) - DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return) - DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return) - DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG) - #if OPENSSL_VERSION_NUMBER >= 0x10000000L -@@ -166,6 +181,12 @@ - DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG) - DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return) - #endif -+#else -+DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return) -+DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG) -+DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG) -+DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return) -+#endif - DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return) - DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return) - DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return) -@@ -213,8 +234,12 @@ - #else - DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, return -1, return) - #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return) - DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG) -+#else -+DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return) -+#endif - DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return) - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return) -@@ -229,13 +254,21 @@ - DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) - #endif - DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) -+#else -+DEFINEFUNC(const SSL_METHOD *, TLS_client_method, DUMMYARG, DUMMYARG, return 0, return) -+#endif - DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) - #ifndef OPENSSL_NO_SSL2 - DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) - #endif - DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) -+#else -+DEFINEFUNC(const SSL_METHOD *, TLS_server_method, DUMMYARG, DUMMYARG, return 0, return) -+#endif - DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) - #else - DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) -@@ -274,7 +307,11 @@ - DEFINEFUNC(int, X509_STORE_CTX_get_error, X509_STORE_CTX *a, a, return -1, return) - DEFINEFUNC(int, X509_STORE_CTX_get_error_depth, X509_STORE_CTX *a, a, return -1, return) - DEFINEFUNC(X509 *, X509_STORE_CTX_get_current_cert, X509_STORE_CTX *a, a, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get_chain, X509_STORE_CTX *a, a, return 0, return) -+#else -+DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return 0, return) -+#endif - DEFINEFUNC(X509_STORE_CTX *, X509_STORE_CTX_new, DUMMYARG, DUMMYARG, return 0, return) - #ifdef SSLEAY_MACROS - DEFINEFUNC2(int, i2d_DSAPrivateKey, const DSA *a, a, unsigned char **b, b, return -1, return) -@@ -282,10 +319,34 @@ - DEFINEFUNC3(RSA *, d2i_RSAPrivateKey, RSA **a, a, unsigned char **b, b, long c, c, return 0, return) - DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsigned char **b, b, long c, c, return 0, return) - #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG) - DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG) -+#else -+DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return) -+#endif - DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - DEFINEFUNC(long, SSLeay, void, DUMMYARG, return 0, return) -+#else -+DEFINEFUNC(unsigned long, OpenSSL_version_num, void, DUMMYARG, return 0, return) -+#endif -+DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return) -+ -+DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return) -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return) -+DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return) -+DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return) -+DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return) -+DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return) -+DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return) -+DEFINEFUNC(int, RSA_bits, const RSA *rsa, rsa, return 0, return) -+DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return) -+DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x, return 0, return) -+DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return) -+DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return) -+#endif - - #ifdef Q_OS_SYMBIAN - #define RESOLVEFUNC(func, ordinal, lib) \ -@@ -580,7 +641,11 @@ - static volatile bool symbolsResolved = false; - static volatile bool triedToResolveSymbols = false; - #ifndef QT_NO_THREAD -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_SSL_library_init)); -+#else -+ QMutexLocker locker(QMutexPool::globalInstanceGet((void *)&q_OPENSSL_init_ssl)); -+#endif - #endif - if (symbolsResolved) - return true; -@@ -614,9 +679,11 @@ - RESOLVEFUNC(BIO_write, 269, libs.second ) - RESOLVEFUNC(BN_num_bits, 387, libs.second ) - RESOLVEFUNC(CRYPTO_free, 469, libs.second ) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(CRYPTO_num_locks, 500, libs.second ) - RESOLVEFUNC(CRYPTO_set_id_callback, 513, libs.second ) - RESOLVEFUNC(CRYPTO_set_locking_callback, 516, libs.second ) -+#endif - RESOLVEFUNC(DSA_free, 594, libs.second ) - RESOLVEFUNC(ERR_error_string, 744, libs.second ) - RESOLVEFUNC(ERR_get_error, 749, libs.second ) -@@ -674,8 +741,10 @@ - RESOLVEFUNC(SSL_get_peer_cert_chain, 117, libs.first ) - RESOLVEFUNC(SSL_get_peer_certificate, 118, libs.first ) - RESOLVEFUNC(SSL_get_verify_result, 132, libs.first ) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSL_library_init, 137, libs.first ) - RESOLVEFUNC(SSL_load_error_strings, 139, libs.first ) -+#endif - RESOLVEFUNC(SSL_new, 140, libs.first ) - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - RESOLVEFUNC(SSL_ctrl, 95, libs.first ) -@@ -747,9 +816,11 @@ - RESOLVEFUNC(BIO_write) - RESOLVEFUNC(BN_num_bits) - RESOLVEFUNC(CRYPTO_free) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(CRYPTO_num_locks) - RESOLVEFUNC(CRYPTO_set_id_callback) - RESOLVEFUNC(CRYPTO_set_locking_callback) -+#endif - RESOLVEFUNC(DSA_free) - RESOLVEFUNC(ERR_error_string) - RESOLVEFUNC(ERR_get_error) -@@ -779,10 +850,17 @@ - RESOLVEFUNC(RAND_seed) - RESOLVEFUNC(RAND_status) - RESOLVEFUNC(RSA_free) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(sk_free) - RESOLVEFUNC(sk_num) - RESOLVEFUNC(sk_pop_free) - RESOLVEFUNC(sk_value) -+#else -+ RESOLVEFUNC(OPENSSL_sk_free) -+ RESOLVEFUNC(OPENSSL_sk_num) -+ RESOLVEFUNC(OPENSSL_sk_pop_free) -+ RESOLVEFUNC(OPENSSL_sk_value) -+#endif - RESOLVEFUNC(SSL_CIPHER_description) - RESOLVEFUNC(SSL_CTX_check_private_key) - RESOLVEFUNC(SSL_CTX_ctrl) -@@ -797,6 +875,7 @@ - RESOLVEFUNC(SSL_CTX_use_PrivateKey) - RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey) - RESOLVEFUNC(SSL_CTX_use_PrivateKey_file) -+ RESOLVEFUNC(SSL_CTX_get_cert_store) - RESOLVEFUNC(SSL_accept) - RESOLVEFUNC(SSL_clear) - RESOLVEFUNC(SSL_connect) -@@ -807,8 +886,12 @@ - RESOLVEFUNC(SSL_get_peer_cert_chain) - RESOLVEFUNC(SSL_get_peer_certificate) - RESOLVEFUNC(SSL_get_verify_result) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSL_library_init) - RESOLVEFUNC(SSL_load_error_strings) -+#else -+ RESOLVEFUNC(OPENSSL_init_ssl) -+#endif - RESOLVEFUNC(SSL_new) - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - RESOLVEFUNC(SSL_ctrl) -@@ -819,17 +902,47 @@ - RESOLVEFUNC(SSL_set_connect_state) - RESOLVEFUNC(SSL_shutdown) - RESOLVEFUNC(SSL_write) -+ -+ RESOLVEFUNC(X509_get_serialNumber) -+#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+ RESOLVEFUNC(SSL_CTX_ctrl) -+ RESOLVEFUNC(EVP_PKEY_id) -+ RESOLVEFUNC(EVP_PKEY_base_id) -+ RESOLVEFUNC(SSL_CIPHER_get_bits) -+ RESOLVEFUNC(SSL_CTX_set_options) -+ RESOLVEFUNC(X509_get_version) -+ RESOLVEFUNC(X509_get_X509_PUBKEY) -+ RESOLVEFUNC(RSA_bits) -+ RESOLVEFUNC(DSA_security_bits) -+ RESOLVEFUNC(DSA_get0_pqg) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L -+ RESOLVEFUNC(X509_get_notAfter) -+ RESOLVEFUNC(X509_get_notBefore) -+#else -+ RESOLVEFUNC(X509_getm_notAfter) -+ RESOLVEFUNC(X509_getm_notBefore) -+#endif -+#endif -+ - #ifndef OPENSSL_NO_SSL2 - RESOLVEFUNC(SSLv2_client_method) - #endif - RESOLVEFUNC(SSLv3_client_method) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLv23_client_method) -+#else -+ RESOLVEFUNC(TLS_client_method) -+#endif - RESOLVEFUNC(TLSv1_client_method) - #ifndef OPENSSL_NO_SSL2 - RESOLVEFUNC(SSLv2_server_method) - #endif - RESOLVEFUNC(SSLv3_server_method) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLv23_server_method) -+#else -+ RESOLVEFUNC(TLS_server_method) -+#endif - RESOLVEFUNC(TLSv1_server_method) - RESOLVEFUNC(X509_NAME_entry_count) - RESOLVEFUNC(X509_NAME_get_entry) -@@ -846,7 +959,11 @@ - RESOLVEFUNC(X509_STORE_CTX_get_error) - RESOLVEFUNC(X509_STORE_CTX_get_error_depth) - RESOLVEFUNC(X509_STORE_CTX_get_current_cert) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(X509_STORE_CTX_get_chain) -+#else -+ RESOLVEFUNC(X509_STORE_CTX_get0_chain) -+#endif - RESOLVEFUNC(X509_cmp) - #ifndef SSLEAY_MACROS - RESOLVEFUNC(X509_dup) -@@ -867,10 +984,18 @@ - RESOLVEFUNC(d2i_DSAPrivateKey) - RESOLVEFUNC(d2i_RSAPrivateKey) - #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(OPENSSL_add_all_algorithms_noconf) - RESOLVEFUNC(OPENSSL_add_all_algorithms_conf) -+#else -+ RESOLVEFUNC(OPENSSL_init_crypto) -+#endif - RESOLVEFUNC(SSL_CTX_load_verify_locations) -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - RESOLVEFUNC(SSLeay) -+#else -+ RESOLVEFUNC(OpenSSL_version_num) -+#endif - #endif // Q_OS_SYMBIAN - symbolsResolved = true; - delete libs.first; -diff -ur qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h ---- qt-everywhere-opensource-src-4.8.7/src/network/ssl/qsslsocket_openssl_symbols_p.h 2015-05-07 16:14:44.000000000 +0200 -+++ qt-everywhere-opensource-src-4.8.7-openssl-1.1/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-01-05 17:59:42.041550255 +0100 -@@ -207,16 +207,31 @@ - int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b); - long q_BIO_ctrl(BIO *a, int b, long c, void *d); - int q_BIO_free(BIO *a); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - BIO *q_BIO_new(BIO_METHOD *a); -+#else -+BIO *q_BIO_new(const BIO_METHOD *a); -+#endif - BIO *q_BIO_new_mem_buf(void *a, int b); - int q_BIO_read(BIO *a, void *b, int c); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - BIO_METHOD *q_BIO_s_mem(); -+#else -+const BIO_METHOD *q_BIO_s_mem(); -+#endif - int q_BIO_write(BIO *a, const void *b, int c); - int q_BN_num_bits(const BIGNUM *a); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - int q_CRYPTO_num_locks(); - void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int)); - void q_CRYPTO_set_id_callback(unsigned long (*a)()); - void q_CRYPTO_free(void *a); -+#else -+#define q_CRYPTO_num_locks() 1 -+#define q_CRYPTO_set_locking_callback(a) -+#define q_CRYPTO_set_id_callback(a) -+void q_CRYPTO_free(void *a, const char *b, int c); -+#endif - void q_DSA_free(DSA *a); - #if OPENSSL_VERSION_NUMBER >= 0x00908000L - // 0.9.8 broke SC and BC by changing this function's signature. -@@ -258,6 +273,7 @@ - void q_RAND_seed(const void *a, int b); - int q_RAND_status(); - void q_RSA_free(RSA *a); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - int q_sk_num(STACK *a); - void q_sk_pop_free(STACK *a, void (*b)(void *)); - #if OPENSSL_VERSION_NUMBER >= 0x10000000L -@@ -267,6 +283,16 @@ - void q_sk_free(STACK *a); - char * q_sk_value(STACK *a, int b); - #endif -+#else -+int q_OPENSSL_sk_num(STACK *a); -+void q_OPENSSL_sk_pop_free(STACK *a, void (*b)(void *)); -+void q_OPENSSL_sk_free(_STACK *a); -+void * q_OPENSSL_sk_value(STACK *a, int b); -+#define q_sk_num q_OPENSSL_sk_num -+#define q_sk_pop_free q_OPENSSL_sk_pop_free -+#define q_sk_free q_OPENSSL_sk_free -+#define q_sk_value q_OPENSSL_sk_value -+#endif - int q_SSL_accept(SSL *a); - int q_SSL_clear(SSL *a); - char *q_SSL_CIPHER_description(SSL_CIPHER *a, char *b, int c); -@@ -314,8 +340,14 @@ - #else - long q_SSL_get_verify_result(SSL *a); - #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - int q_SSL_library_init(); - void q_SSL_load_error_strings(); -+#else -+int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); -+#define q_SSL_library_init() q_OPENSSL_init_ssl(0, (const OPENSSL_INIT_SETTINGS *) NULL) -+#define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, (const OPENSSL_INIT_SETTINGS *) NULL) -+#endif - SSL *q_SSL_new(SSL_CTX *a); - #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT) - long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg); -@@ -328,11 +360,21 @@ - #if OPENSSL_VERSION_NUMBER >= 0x10000000L - const SSL_METHOD *q_SSLv2_client_method(); - const SSL_METHOD *q_SSLv3_client_method(); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - const SSL_METHOD *q_SSLv23_client_method(); -+#else -+const SSL_METHOD *q_TLS_client_method(); -+#define q_SSLv23_client_method q_TLS_client_method -+#endif - const SSL_METHOD *q_TLSv1_client_method(); - const SSL_METHOD *q_SSLv2_server_method(); - const SSL_METHOD *q_SSLv3_server_method(); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - const SSL_METHOD *q_SSLv23_server_method(); -+#else -+const SSL_METHOD *q_TLS_server_method(); -+#define q_SSLv23_server_method q_TLS_server_method -+#endif - const SSL_METHOD *q_TLSv1_server_method(); - #else - SSL_METHOD *q_SSLv2_client_method(); -@@ -377,7 +419,12 @@ - int q_X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); - int q_X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); - X509 *q_X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - STACK_OF(X509) *q_X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx); -+#else -+STACK_OF(X509) *q_X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx); -+#define q_X509_STORE_CTX_get_chain q_X509_STORE_CTX_get0_chain -+#endif - - #define q_BIO_get_mem_data(b, pp) (int)q_BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)pp) - #define q_BIO_pending(b) (int)q_BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL) -@@ -399,7 +446,25 @@ - PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\ - bp,(char *)x,enc,kstr,klen,cb,u) - #endif -+ -+X509_STORE * q_SSL_CTX_get_cert_store(const SSL_CTX *ctx); -+ASN1_INTEGER * q_X509_get_serialNumber(X509 *x); -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) -+#define q_X509_get_version(x) X509_get_version(x) -+#else -+int q_EVP_PKEY_id(const EVP_PKEY *pkey); -+int q_EVP_PKEY_base_id(const EVP_PKEY *pkey); -+int q_SSL_CIPHER_get_bits(const SSL_CIPHER *cipher, int *alg_bits); -+long q_SSL_CTX_set_options(SSL_CTX *ctx, long options); -+long q_X509_get_version(X509 *x); -+X509_PUBKEY * q_X509_get_X509_PUBKEY(X509 *x); -+int q_RSA_bits(const RSA *rsa); -+int q_DSA_security_bits(const DSA *dsa); -+void q_DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); -+#endif -+ - #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st) - #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i) - #define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st)) -@@ -410,8 +475,17 @@ - #define q_sk_SSL_CIPHER_value(st, i) q_SKM_sk_value(SSL_CIPHER, (st), (i)) - #define q_SSL_CTX_add_extra_chain_cert(ctx,x509) \ - q_SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509) -+ -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - #define q_X509_get_notAfter(x) X509_get_notAfter(x) - #define q_X509_get_notBefore(x) X509_get_notBefore(x) -+#else -+ASN1_TIME *q_X509_getm_notAfter(X509 *x); -+ASN1_TIME *q_X509_getm_notBefore(X509 *x); -+#define q_X509_get_notAfter(x) q_X509_getm_notAfter(x) -+#define q_X509_get_notBefore(x) q_X509_getm_notBefore(x) -+#endif -+ - #define q_EVP_PKEY_assign_RSA(pkey,rsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ - (char *)(rsa)) - #define q_EVP_PKEY_assign_DSA(pkey,dsa) q_EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ -@@ -421,10 +495,21 @@ - #else - #define q_OpenSSL_add_all_algorithms() q_OPENSSL_add_all_algorithms_noconf() - #endif -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - void q_OPENSSL_add_all_algorithms_noconf(); - void q_OPENSSL_add_all_algorithms_conf(); -+#else -+int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings); -+#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | OPENSSL_INIT_LOAD_CONFIG, (const OPENSSL_INIT_SETTINGS *) NULL) -+# define q_OPENSSL_add_all_algorithms_noconf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, (const OPENSSL_INIT_SETTINGS *) NULL) -+#endif - int q_SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath); -+#if OPENSSL_VERSION_NUMBER < 0x10100000L - long q_SSLeay(); -+#else -+unsigned long q_OpenSSL_version_num(); -+#define q_SSLeay q_OpenSSL_version_num -+#endif - - // Helper function - class QDateTime; diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-qforeach.patch b/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-qforeach.patch deleted file mode 100644 index 836dc13a43..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt-everywhere-opensource-src-4.8.7-qforeach.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- a/src/corelib/global/qglobal.h -+++ b/src/corelib/global/qglobal.h -@@ -2482,22 +2482,32 @@ typedef uint Flags; - - #endif /* Q_NO_TYPESAFE_FLAGS */ - --#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_RVCT) -+#if (defined(Q_CC_GNU) && !defined(Q_CC_RVCT)) - /* make use of typeof-extension */ - template - class QForeachContainer { - public: -- inline QForeachContainer(const T& t) : c(t), brk(0), i(c.begin()), e(c.end()) { } -+ inline QForeachContainer(const T& t) : c(t), i(c.begin()), e(c.end()), control(1) { } - const T c; - int brk; - typename T::const_iterator i, e; -+ int control; - }; - -+// Explanation of the control word: -+// - it's initialized to 1 -+// - that means both the inner and outer loops start -+// - if there were no breaks, at the end of the inner loop, it's set to 0, which -+// causes it to exit (the inner loop is run exactly once) -+// - at the end of the outer loop, it's inverted, so it becomes 1 again, allowing -+// the outer loop to continue executing -+// - if there was a break inside the inner loop, it will exit with control still -+// set to 1; in that case, the outer loop will invert it to 0 and will exit too - #define Q_FOREACH(variable, container) \ - for (QForeachContainer<__typeof__(container)> _container_(container); \ -- !_container_.brk && _container_.i != _container_.e; \ -- __extension__ ({ ++_container_.brk; ++_container_.i; })) \ -- for (variable = *_container_.i;; __extension__ ({--_container_.brk; break;})) -+ _container_.control && _container_.i != _container_.e; \ -+ ++_container_.i, _container_.control ^= 1) \ -+ for (variable = *_container_.i; _container_.control; _container_.control = 0) - - #else - diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt4-build-debug-qmake.patch b/tools/MINGW-packages/mingw-w64-qt4/qt4-build-debug-qmake.patch deleted file mode 100644 index 7a44e3099a..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt4-build-debug-qmake.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/qmake/Makefile.win32-g++-sh 2015-03-21 18:07:24.056403965 +0100 -+++ b/qmake/Makefile.win32-g++-sh 2015-03-21 18:09:40.642912613 +0100 -@@ -12,7 +12,7 @@ - # specific stuff for mingw g++ make - # - CXX = g++ --CFLAGS = -c -o$@ -O \ -+CFLAGS = -c -o$@ -O0 -ggdb \ - -I. -Igenerators -Igenerators/unix \ - -Igenerators/win32 -Igenerators/mac \ - -Igenerators/symbian -Igenerators/integrity \ diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt4-i686.install b/tools/MINGW-packages/mingw-w64-qt4/qt4-i686.install deleted file mode 100644 index b37eab7cb3..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt4-i686.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - if [ -f "mingw32/bin/qmake.exe" ]; then - cd mingw32/bin - ./qtbinpatcher --verbose --nobackup - cd - - fi -} - -post_upgrade() { - post_install -} diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt4-pcre.patch b/tools/MINGW-packages/mingw-w64-qt4/qt4-pcre.patch deleted file mode 100644 index f3b0747305..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt4-pcre.patch +++ /dev/null @@ -1,35 +0,0 @@ -see https://github.com/LLNL/spack/pull/4270 - ---- src/3rdparty/javascriptcore/JavaScriptCore/runtime/RegExp.cpp.orig 2017-10-19 12:31:15.746459533 +0200 -+++ src/3rdparty/javascriptcore/JavaScriptCore/runtime/RegExp.cpp 2017-10-19 12:31:56.426453093 +0200 -@@ -44,7 +44,7 @@ - #include "JIT.h" - #include "WRECGenerator.h" - #endif --#include -+#include "../pcre/pcre.h" - - #endif - ---- src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp.orig 2017-10-19 12:30:27.103456305 +0200 -+++ src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.cpp 2017-10-19 12:30:44.690456526 +0200 -@@ -32,7 +32,7 @@ - #include "MacroAssembler.h" - #include "RegexCompiler.h" - --#include "pcre.h" // temporary, remove when fallback is removed. -+#include "../pcre/pcre.h" // temporary, remove when fallback is removed. - - #if ENABLE(YARR_JIT) - ---- src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h.orig 2017-10-19 12:25:59.564457578 +0200 -+++ src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexJIT.h 2017-10-19 12:30:06.110459690 +0200 -@@ -34,7 +34,7 @@ - #include "RegexPattern.h" - #include - --#include -+#include "../pcre/pcre.h" - struct JSRegExp; // temporary, remove when fallback is removed. - - #if CPU(X86) && !COMPILER(MSVC) diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt4-selection-flags-static_cast.patch b/tools/MINGW-packages/mingw-w64-qt4/qt4-selection-flags-static_cast.patch deleted file mode 100644 index bf11018497..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt4-selection-flags-static_cast.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur qt-everywhere-opensource-src-4.8.6/src/plugins/accessible/widgets/itemviews.cpp qt-everywhere-opensource-src-4.8.6.static_cast/src/plugins/accessible/widgets/itemviews.cpp ---- qt-everywhere-opensource-src-4.8.6/src/plugins/accessible/widgets/itemviews.cpp 2014-04-10 14:37:12.000000000 -0400 -+++ qt-everywhere-opensource-src-4.8.6.static_cast/src/plugins/accessible/widgets/itemviews.cpp 2016-09-20 14:26:25.000000000 -0400 -@@ -393,7 +393,7 @@ - QModelIndex index = view()->model()->index(0, column, view()->rootIndex()); - if (!index.isValid() || view()->selectionMode() & QAbstractItemView::NoSelection) - return false; -- view()->selectionModel()->select(index, QItemSelectionModel::Columns & QItemSelectionModel::Deselect); -+ view()->selectionModel()->select(index, static_cast(QItemSelectionModel::Columns & QItemSelectionModel::Deselect)); - return true; - } - diff --git a/tools/MINGW-packages/mingw-w64-qt4/qt4-x86_64.install b/tools/MINGW-packages/mingw-w64-qt4/qt4-x86_64.install deleted file mode 100644 index d47c43adfd..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/qt4-x86_64.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - if [ -f "mingw64/bin/qmake.exe" ]; then - cd mingw64/bin - ./qtbinpatcher --verbose --nobackup - cd - -fi -} - -post_upgrade() { - post_install -} diff --git a/tools/MINGW-packages/mingw-w64-qt4/relwithdeb.diff b/tools/MINGW-packages/mingw-w64-qt4/relwithdeb.diff deleted file mode 100644 index 0cb9f98c89..0000000000 --- a/tools/MINGW-packages/mingw-w64-qt4/relwithdeb.diff +++ /dev/null @@ -1,20 +0,0 @@ ---- mkspecs/win32-g++/qmake.conf.orig 2016-10-25 18:48:28.257655800 +0200 -+++ mkspecs/win32-g++/qmake.conf 2016-10-25 18:49:15.413905800 +0200 -@@ -31,7 +31,7 @@ - QMAKE_CFLAGS_DEPS = -M - QMAKE_CFLAGS_WARN_ON = -Wall -Wextra - QMAKE_CFLAGS_WARN_OFF = -w --QMAKE_CFLAGS_RELEASE = -O2 -+QMAKE_CFLAGS_RELEASE = -O2 -g - QMAKE_CFLAGS_DEBUG = -g - QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses - -@@ -63,7 +63,7 @@ - QMAKE_LFLAGS = - QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads - QMAKE_LFLAGS_EXCEPTIONS_OFF = --QMAKE_LFLAGS_RELEASE = -Wl,-s -+QMAKE_LFLAGS_RELEASE = - QMAKE_LFLAGS_DEBUG = - QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console - QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows diff --git a/tools/MINGW-packages/mingw-w64-shiboken/PKGBUILD b/tools/MINGW-packages/mingw-w64-shiboken/PKGBUILD deleted file mode 100644 index d12a30fb84..0000000000 --- a/tools/MINGW-packages/mingw-w64-shiboken/PKGBUILD +++ /dev/null @@ -1,95 +0,0 @@ -# Maintainer: ole.andre.rodlie@gmail.com - -_realname=shiboken -pkgname=${MINGW_PACKAGE_PREFIX}-natron_${_realname} -pkgver=1.2.4 -pkgrel=8 -arch=('any') -url="https://github.com/PySide" -license=("LGPL") -source=(https://mirrors.dotsrc.org/qtproject/official_releases/pyside/PySide-${pkgver}.tar.gz - shiboken.patch - python3.patch - cmake.patch) -sha256sums=('1421bc1bf612c396070de9e1ffe227c07c1f3129278bc7d30c754b5146be2433' - '603b3ac935a60494cc9cb52c3e0847f61353df546dfea88544025e9ddea5e7c0' - '7073df687703e8e403b78e9dac903d43128d44e426d2c386fb8ff5445ba58e4d' - '840baf2e182c9fa40affc5cc2de4b8f2af920ecb2d1e2559fbe2b8657d919fbf') -makedepends=("${MINGW_PACKAGE_PREFIX}-libxml2" - "${MINGW_PACKAGE_PREFIX}-libxslt" - "${MINGW_PACKAGE_PREFIX}-python2" - "${MINGW_PACKAGE_PREFIX}-python" - "${MINGW_PACKAGE_PREFIX}-natron_qt4" - "${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-cmake") -options=('strip') - -prepare() { - cd ${srcdir}/PySide-${pkgver} - patch -p1 -i ${srcdir}/shiboken.patch - patch -p1 -i ${srcdir}/python3.patch - patch -p0 -i ${srcdir}/cmake.patch -} - -build() { - export MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX" - for pyv in python2 python3; do - local _conf= - if [ "${pyv}" = "python3" ]; then - _conf="-DUSE_PYTHON3=yes" - fi - [[ -d ${srcdir}/build-${MINGW_CHOST}-${pyv} ]] && rm -rf ${srcdir}/build-${MINGW_CHOST}-${pyv} - mkdir -p ${srcdir}/build-${MINGW_CHOST}-${pyv} && cd ${srcdir}/build-${MINGW_CHOST}-${pyv} - ${MINGW_PREFIX}/bin/cmake \ - -G"MSYS Makefiles" \ - -DBUILD_TESTS=FALSE \ - -DCMAKE_OBJECT_PATH_MAX=1024 \ - -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \ - ${_conf} \ - -DCMAKE_BUILD_TYPE=RELEASE \ - -DCMAKE_CXX_STANDARD=98 \ - -DPYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/${pyv}.exe \ - ${srcdir}/PySide-${pkgver}/sources/shiboken - make -j${MKJOBS} - done -} - -fix_paths() { - local prefixwin=$(cygpath -am ${MINGW_PREFIX}) - local prefixinst=$(cygpath -am ${pkgdir}${MINGW_PREFIX}) - local _files=$(find ${pkgdir}${MINGW_PREFIX}/lib -type f -iname "*.cmake" -o -iname "*.pc") - for f in ${_files}; do - plain "Patching ${f}..." - sed -e "s|${prefixwin}|${MINGW_PREFIX}|g" \ - -e "s|${prefixinst}|${MINGW_PREFIX}|g" \ - -i ${f} - done -} - -package() { - for pyv in python2 python3; do - local _major=$(${pyv} -c "import platform; print(platform.python_version_tuple()[0])") - local _minor=$(${pyv} -c "import platform; print(platform.python_version_tuple()[1])") - local _pyprefix= - if [ "${_major}" = "3" ]; then - _pyprefix="" #".cpython-${_major}${_minor}m" - else - _pyprefix="-python${_major}.${_minor}" - fi - cd ${srcdir}/build-${MINGW_CHOST}-${pyv} - make DESTDIR=${pkgdir} install - mv ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/shiboken{,-py${_major}}.pc - mv ${pkgdir}${MINGW_PREFIX}/bin/shiboken{,-py${_major}}.exe - mv ${pkgdir}${MINGW_PREFIX}/include/shiboken{,-py${_major}} - sed -i 's#bin/shiboken#bin/shiboken-py'${_major}'#' ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig${_pyprefix}.cmake - sed -i 's#bin/shiboken#bin/shiboken-py'${_major}'#' ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/shiboken-py${_major}.pc - sed -i 's#include/shiboken#include/shiboken-py'${_major}'#' ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig${_pyprefix}.cmake - sed -i 's#include/shiboken#include/shiboken-py'${_major}'#' ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/shiboken-py${_major}.pc - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/py${_major} - cp ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig${_pyprefix}.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/py${_major}/ShibokenConfig.cmake - cp ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfigVersion.cmake ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/py${_major}/ - done - rm -f ${pkgdir}${MINGW_PREFIX}/lib/cmake/Shiboken-${pkgver}/ShibokenConfig.cmake - rm -rf ${pkgdir}${MINGW_PREFIX}/share - fix_paths -} diff --git a/tools/MINGW-packages/mingw-w64-shiboken/cmake.patch b/tools/MINGW-packages/mingw-w64-shiboken/cmake.patch deleted file mode 100644 index a4957438fe..0000000000 --- a/tools/MINGW-packages/mingw-w64-shiboken/cmake.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- sources/shiboken/CMakeLists.txt.orig 2022-07-20 02:44:12.831611200 +0200 -+++ sources/shiboken/CMakeLists.txt 2022-07-20 02:45:58.234299400 +0200 -@@ -19,15 +19,15 @@ - option(USE_PYTHON3 "Use python3 libraries to build shiboken." FALSE) - - if (USE_PYTHON3) -- find_package(Python3Libs) -- find_package(Python3InterpWithDebug) -+ find_package(PythonLibs 3.6 REQUIRED) -+ find_package(PythonInterpWithDebug 3.6 REQUIRED) - #use commom vars -- set(PYTHONLIBS_FOUND ${PYTHON3LIBS_FOUND}) -- set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES}) -- set(PYTHON_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIRS}) -- set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES}) -- set(PYTHONINTERP_FOUND ${PYTHON3INTERP_FOUND}) -- set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE}) -+ #set(PYTHONLIBS_FOUND ${PYTHON3LIBS_FOUND}) -+ #set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES}) -+ #set(PYTHON_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIRS}) -+ #set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES}) -+ #set(PYTHONINTERP_FOUND ${PYTHON3INTERP_FOUND}) -+ #set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE}) - else() - find_package(PythonLibs 2.6) - find_package(PythonInterpWithDebug) diff --git a/tools/MINGW-packages/mingw-w64-shiboken/python3.patch b/tools/MINGW-packages/mingw-w64-shiboken/python3.patch deleted file mode 100644 index 9afc56cc9c..0000000000 --- a/tools/MINGW-packages/mingw-w64-shiboken/python3.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/sources/shiboken/cmake/Modules/FindPython3Libs.cmake 2014-04-22 23:42:48.000000000 +0800 -+++ b/sources/shiboken/cmake/Modules/FindPython3Libs.cmake 2015-09-21 15:17:27.014598399 +0800 -@@ -27,7 +27,7 @@ - # Search for the python framework on Apple. - # CMAKE_FIND_FRAMEWORKS(Python) - --FOREACH(_CURRENT_VERSION 3.4 3.3 3.2 3.1 3.0) -+FOREACH(_CURRENT_VERSION 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0) - IF(_CURRENT_VERSION GREATER 3.1) - SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "") - ELSE() ---- a/sources/shiboken/libshiboken/sbkenum.cpp 2021-02-09 14:52:17.062065563 -> -+++ b/sources/shiboken/libshiboken/sbkenum.cpp 2021-02-09 14:52:59.965800766 -> -@@ -529,7 +529,9 @@ - ::memset(type, 0, sizeof(SbkEnumType)); - Py_TYPE(type) = &SbkEnumType_Type; - type->tp_basicsize = sizeof(SbkEnumObject); -+#ifndef IS_PY3K - type->tp_print = &SbkEnumObject_print; -+#endif - type->tp_repr = &SbkEnumObject_repr; - type->tp_str = &SbkEnumObject_repr; - type->tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES; diff --git a/tools/MINGW-packages/mingw-w64-shiboken/shiboken.patch b/tools/MINGW-packages/mingw-w64-shiboken/shiboken.patch deleted file mode 100644 index 5ff9bca1dc..0000000000 --- a/tools/MINGW-packages/mingw-w64-shiboken/shiboken.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- PySide-1.2.2/sources/shiboken/CMakeLists.txt.orig 2015-06-26 11:25:44.610800000 +0300 -+++ PySide-1.2.2/sources/shiboken/CMakeLists.txt 2015-06-26 11:27:46.225600000 +0300 -@@ -49,6 +49,9 @@ - if(MSVC) - set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") - else() -+ if(MINGW) -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_WINDOWS") -+ endif() - if(CMAKE_HOST_UNIX AND NOT CYGWIN) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") - endif() ---- PySide-1.2.2/sources/shiboken/libshiboken/basewrapper.cpp.orig 2015-06-26 11:25:44.610800000 +0300 -+++ PySide-1.2.2/sources/shiboken/libshiboken/basewrapper.cpp 2015-06-26 11:27:46.225600000 +0300 -@@ -770,7 +770,7 @@ - Py_hash_t hash(PyObject* pyObj) - { - assert(Shiboken::Object::checkType(pyObj)); -- return reinterpret_cast(pyObj); -+ return reinterpret_cast(pyObj); - } - - static void setSequenceOwnership(PyObject* pyObj, bool owner) ---- PySide-1.2.2/sources/shiboken/shibokenmodule/CMakeLists.txt.orig 2015-06-26 07:00:25.341400000 +0300 -+++ PySide-1.2.2/sources/shiboken/shibokenmodule/CMakeLists.txt 2015-06-26 07:00:39.974200000 +0300 -@@ -9,7 +9,7 @@ - ) - - add_custom_command(OUTPUT ${sample_SRC} --COMMAND ${shibokengenerator_BINARY_DIR}/shiboken --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} -+COMMAND ${shibokengenerator_BINARY_DIR}/shiboken.exe --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMENT "Running generator for 'shiboken'..." - ) ---- PySide-1.2.2/sources/shiboken/tests/libsample/objecttype.h.orig 2015-06-26 10:11:42.262200000 +0300 -+++ PySide-1.2.2/sources/shiboken/tests/libsample/objecttype.h 2015-06-26 10:15:29.335800000 +0300 -@@ -70,7 +70,7 @@ - Str objectName() const; - void setObjectName(const Str& name); - -- inline unsigned long identifier() const { return reinterpret_cast(this); } -+ inline unsigned long identifier() const { return reinterpret_cast(this); } - - bool causeEvent(Event::EventType eventType); - ---- PySide-1.2.2/sources/shiboken/tests/libsample/transform.cpp.orig 2015-06-26 07:02:00.766600000 +0300 -+++ PySide-1.2.2/sources/shiboken/tests/libsample/transform.cpp 2015-06-26 07:02:07.271800000 +0300 -@@ -27,7 +27,9 @@ - #ifdef _WIN32 - #include - #include -+#ifndef __MINGW64_VERSION_MAJOR - static inline bool isfinite(double a) { return _finite(a); } -+#endif - #else - #include - #endif ---- PySide-1.2.2/sources/shiboken/generator/shiboken/overloaddata.cpp.orig 2015-06-26 10:00:46.779800000 +0300 -+++ PySide-1.2.2/sources/shiboken/generator/shiboken/overloaddata.cpp 2015-06-26 10:02:01.441400000 +0300 -@@ -882,7 +882,7 @@ - - s << "}" << endl; - } else { -- QString argId = QString("arg_%1").arg((ulong)this); -+ QString argId = QString("arg_%1").arg((uintptr_t)this); - s << argId << ';' << endl; - - s << indent << '"' << argId << "\" [shape=\"plaintext\" style=\"filled,bold\" margin=\"0\" fontname=\"freemono\" fillcolor=\"white\" penwidth=1 "; diff --git a/tools/jenkins/build-OSX-installer.sh b/tools/jenkins/build-OSX-installer.sh index d95490f7b1..4682ca29f2 100755 --- a/tools/jenkins/build-OSX-installer.sh +++ b/tools/jenkins/build-OSX-installer.sh @@ -357,17 +357,15 @@ elif [ -e "/opt/homebrew" ]; then HOMEBREW="/opt/homebrew" fi SBKVER="1.2" -QT_VERSION_MAJOR=${QT_VERSION_MAJOR:-4} +QT_VERSION_MAJOR=${QT_VERSION_MAJOR:-5} +if [ "${QT_VERSION_MAJOR}" -lt 5 ]; then + echo "QT_VERSION_MAJOR ${QT_VERSION_MAJOR} not supported." + exit 1 +fi QTDIR=${QTDIR:-${SDK_HOME}/libexec/qt${QT_VERSION_MAJOR}} PYTHON_HOME=${PYTHON_HOME:-${SDK_HOME}/Library/Frameworks/Python.framework/Versions/${PYVER}} ## all Qt frameworks: case "${QT_VERSION_MAJOR}" in -4) - qt_libs=( Qt3Support QtCLucene QtCore QtDBus QtDeclarative QtDesigner QtDesignerComponents QtGui QtHelp QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns ) - ## Qt frameworks used by Natron + PySide + Qt plugins: - #qt_libs=( Qt3Support QtCLucene QtCore QtDBus QtDeclarative QtDesigner QtGui QtHelp QtMultimedia QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns ) - qt_frameworks_dir="${QTDIR}/Library/Frameworks" - ;; 5) qt_libs=( Qt3DAnimation Qt3DCore Qt3DExtras Qt3DInput Qt3DLogic Qt3DQuick Qt3DQuickAnimation Qt3DQuickExtras Qt3DQuickInput Qt3DQuickRender Qt3DQuickScene2D Qt3DRender QtBluetooth QtCharts QtConcurrent QtCore QtDBus QtDataVisualization QtDesigner QtDesignerComponents QtGamepad QtGui QtHelp QtLocation QtMacExtras QtMultimedia QtMultimediaQuick QtMultimediaWidgets QtNetwork QtNetworkAuth QtNfc QtOpenGL QtPdf QtPdfWidgets QtPositioning QtPositioningQuick QtPrintSupport QtQml QtQmlModels QtQmlWorkerScript QtQuick QtQuickControls2 QtQuickParticles QtQuickShapes QtQuickTemplates2 QtQuickTest QtQuickWidgets QtRemoteObjects QtRepParser QtScript QtScriptTools QtScxml QtSensors QtSerialBus QtSerialPort QtSql QtSvg QtTest QtTextToSpeech QtUiPlugin QtWebChannel QtWebEngine QtWebEngineCore QtWebEngineWidgets QtWebSockets QtWidgets QtXml QtXmlPatterns ) qt_frameworks_dir="${QTDIR}/lib" @@ -383,9 +381,8 @@ app_for_macdeployqt="$(dirname "${package}")/Natron.app" # make a temporary link to Natron.app ln -sf "${package}" "${app_for_macdeployqt}" MACDEPLOYQT_OPTS=( -no-strip ) -if [ "${QT_VERSION_MAJOR}" -ge 5 ]; then - MACDEPLOYQT_OPTS+=( -libpath="${SDK_HOME}/lib/nss" -libpath="${SDK_HOME}/lib/nspr" ) -fi +MACDEPLOYQT_OPTS+=( -libpath="${SDK_HOME}/lib/nss" -libpath="${SDK_HOME}/lib/nspr" ) + for bin in "${natronbins[@]}" "${otherbins[@]}"; do binary="$app_for_macdeployqt/Contents/MacOS/${bin}" if [ ! -e "${binary}" ] && [ -e "${SDK_HOME}/bin/${bin}" ]; then @@ -395,15 +392,15 @@ for bin in "${natronbins[@]}" "${otherbins[@]}"; do MACDEPLOYQT_OPTS+=( -executable="${binary}" ) fi done -if [ "${QT_VERSION_MAJOR}" -ge 5 ]; then - if [ -n "${CODE_SIGN_IDENTITY}" ]; then - echo "* executing macdeployqt without code signing" - #MACDEPLOYQT_OPTS+=( -codesign="${CODE_SIGN_IDENTITY}" ) - fi - #if [ "${macosx}" -ge 18 ]; then - # MACDEPLOYQT_OPTS+=( -hardened-runtime ) - #fi + +if [ -n "${CODE_SIGN_IDENTITY}" ]; then + echo "* executing macdeployqt without code signing" + #MACDEPLOYQT_OPTS+=( -codesign="${CODE_SIGN_IDENTITY}" ) fi +#if [ "${macosx}" -ge 18 ]; then +# MACDEPLOYQT_OPTS+=( -hardened-runtime ) +#fi + echo Executing: "${QTDIR}"/bin/macdeployqt "${app_for_macdeployqt}" "${MACDEPLOYQT_OPTS[@]}" #echo "********** DISABLED! press return" #read @@ -558,61 +555,6 @@ for qtlib in "${qt_libs[@]}"; do fi done -if [ "${QT_VERSION_MAJOR}" = 4 ]; then - echo "*** Repairing Qt4 frameworks" - # macdeployqt from Qt4 forgets the Info.plist (necessary for code signing) - # For the correct Framework Bundle structure, see https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html - for f in "${qt_libs[@]}"; do - if [ ! -e "${package}/Contents/Frameworks/${f}.framework" ]; then - echo "Error: ${f}.framework is missing" - exit 1 - #continue - fi - echo "fixing ${f}.framework" - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Versions/Current" ]; then - echo "fixing ${f}.framework/Versions/Current" - (cd "${package}/Contents/Frameworks/${f}.framework/Versions"; ln -sf "${QT_VERSION_MAJOR}" Current) - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources" ]; then - echo "adding ${f}.framework/Versions/Current/Resources" - if [ -d "${package}/Contents/Frameworks/${f}.framework/Resources" ]; then - echo "moving ${f}.framework/Resources to ${f}.framework/Versions/Current/Resources" - mv "${package}/Contents/Frameworks/${f}.framework/Resources" "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources" - else - echo "creating ${f}.framework/Versions/Current/Resources" - mkdir "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources" - fi - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources/Info.plist" ]; then - echo "adding ${f}.framework/Versions/Current/Resources/Info.plist" - if [ -e "${qt_frameworks_dir}/${f}.framework/Contents/Info.plist" ]; then - echo "copying ${f}.framework/Versions/Current/Resources/Info.plist from ${qt_frameworks_dir}/${f}.framework/Contents/Info.plist" - cp "${qt_frameworks_dir}/${f}.framework/Contents/Info.plist" "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources/Info.plist" - fi - if [ -e "${qt_frameworks_dir}/${f}.framework/Versions/Current/Resources/Info.plist" ]; then - echo "copying ${f}.framework/Versions/Current/Resources/Info.plist from ${qt_frameworks_dir}/${f}.framework/Versions/Current/Resources/Info.plist" - cp "${qt_frameworks_dir}/${f}.framework/Versions/Current/Resources/Info.plist" "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources/Info.plist" - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Versions/Current/Resources/Info.plist" ]; then - echo "Error: couldn't find Info.plist for ${qt_frameworks_dir}/${f}.framework" - exit 1 - fi - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/${f}" ]; then - echo "creating link ${f}.framework/${f}" - (cd "${package}/Contents/Frameworks/${f}.framework"; ln -sf "Versions/Current/${f}" .) - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Resources" ]; then - echo "creating link ${f}.framework/Resources" - (cd "${package}/Contents/Frameworks/${f}.framework"; ln -sf "Versions/Current/Resources" .) - fi - if [ ! -e "${package}/Contents/Frameworks/${f}.framework/Resources/Info.plist" ]; then - echo "Error: ${f}.framework/Resources/Info.plist is missing" - exit 1 - fi - done -fi - if [ "${LIBGCC}" = "1" ]; then echo "*** Copying and fixing GCC libs" for l in ${gcclibs}; do @@ -678,9 +620,7 @@ cp -a "${SDK_HOME}/share/poppler" "${package}/Contents/Resources/" # install PySide in site-packages -if [ "${QT_VERSION_MAJOR}" = 4 ]; then - PYSIDE_PKG="PySide" -elif [ "${QT_VERSION_MAJOR}" = 5 ]; then +if [ "${QT_VERSION_MAJOR}" = 5 ]; then PYSIDE_PKG="PySide2" else PYSIDE_PKG="PySide${QT_VERSION_MAJOR}" @@ -701,31 +641,7 @@ PYLIB="Python.framework/Versions/${PYVER}/lib/python${PYVER}" PYSIDE="${PYLIB}/site-packages/${PYSIDE_PKG}" rm -rf "${package}/Contents/Frameworks/${PYSIDE}" cp -a "${SDK_HOME}/Library/Frameworks/${PYSIDE}" "${package}/Contents/Frameworks/${PYSIDE}" -if [ "${QT_VERSION_MAJOR}" = 4 ]; then - PYSHIBOKEN="${PYLIB}/site-packages/shiboken.so" - rm -rf "${package}/Contents/Frameworks/${PYSHIBOKEN}" - cp "${SDK_HOME}/Library/Frameworks/${PYSHIBOKEN}" "${package}/Contents/Frameworks/${PYSHIBOKEN}" - # fix shiboken.so - lib_shiboken="shiboken${pypart}.${SBKVER}" - dylib_shiboken="lib${lib_shiboken}.dylib" - lib_pyside="pyside${pypart}.${SBKVER}" - dylib_pyside="lib${l}.dylib" - binary="${package}/Contents/Frameworks/${PYSHIBOKEN}" - install_name_tool -change "${SDK_HOME}/lib/${dylib_shiboken}" "@executable_path/../Frameworks/${dylib_shiboken}" "${binary}" - install_name_tool -change "${SDK_HOME}/lib/${dylib_pyside}" "@executable_path/../Frameworks/${dylib_pyside}" "${binary}" - # install pyside and shiboken libs, and fix deps from Qt - for l in "${lib_shiboken}" "${lib_pyside}"; do - dylib="lib${l}.dylib" - binary="${package}/Contents/Frameworks/${dylib}" - cp "${SDK_HOME}/lib/${dylib}" "${binary}" - install_name_tool -id "@executable_path/../Frameworks/${dylib}" "${binary}" - install_name_tool -change "${SDK_HOME}/lib/${dylib_shiboken}" "@executable_path/../Frameworks/${dylib_shiboken}" "${binary}" - install_name_tool -change "${SDK_HOME}/lib/${dylib_pyside}" "@executable_path/../Frameworks/${dylib_pyside}" "${binary}" - for f in "${qt_libs[@]}"; do - install_name_tool -change "${qt_frameworks_dir}/${f}.framework/Versions/${QT_VERSION_MAJOR}/${f}" "@executable_path/../Frameworks/${f}.framework/Versions/${QT_VERSION_MAJOR}/${f}" "${binary}" - done - done -elif [ "${QT_VERSION_MAJOR}" = 5 ]; then +if [ "${QT_VERSION_MAJOR}" = 5 ]; then PYSHIBOKEN="${PYLIB}/site-packages/shiboken2" cp -a "${SDK_HOME}/Library/Frameworks/${PYSHIBOKEN}" "${package}/Contents/Frameworks/${PYSHIBOKEN}" rm -rf "${package}/Contents/Frameworks/${PYSHIBOKEN}/docs" @@ -852,10 +768,9 @@ while [ ${#bins[@]} -gt 0 ]; do for f in Python; do install_name_tool -change "${SDK_HOME}/Library/Frameworks/${f}.framework/Versions/${PYVER}/${f}" "@executable_path/../Frameworks/${f}.framework/Versions/${PYVER}/${f}" "${bin}" || true done - if [ "${QT_VERSION_MAJOR}" -ge 5 ]; then - install_name_tool -rpath "${SDK_HOME}/Library/Frameworks/${PYSHIBOKEN}" "@executable_path/../Frameworks/${PYSHIBOKEN}" "${bin}" || true - install_name_tool -rpath "${SDK_HOME}/Library/Frameworks/${PYSIDE}" "@executable_path/../Frameworks/${PYSIDE}" "${bin}" || true - fi + + install_name_tool -rpath "${SDK_HOME}/Library/Frameworks/${PYSHIBOKEN}" "@executable_path/../Frameworks/${PYSHIBOKEN}" "${bin}" || true + install_name_tool -rpath "${SDK_HOME}/Library/Frameworks/${PYSIDE}" "@executable_path/../Frameworks/${PYSIDE}" "${bin}" || true done if [ ${#more_bins[@]} -gt 0 ]; then bins=( "${more_bins[@]}" ) @@ -1285,14 +1200,8 @@ if [ -x "${NATRON_PYTHON}" ]; then "${PY_EXE}" get-pip.py --target "${PYDIR}/site-packages" rm get-pip.py # Install qtpy - if [ "${QT_VERSION_MAJOR}" = 4 ]; then - # Qt4 support was dropped after QtPy 1.11.2 - "${NATRON_PYTHON}" -m pip install qtpy==1.11.2 - # qtpy bug fix for Qt4 - ${GSED} -i "s/^except ImportError:/except (ImportError, PythonQtError):/" "${PYDIR}/site-packages/qtpy/__init__.py" - else - "${PY_EXE}" -m pip install qtpy --upgrade --target "${PYDIR}/site-packages" - fi + "${PY_EXE}" -m pip install qtpy --upgrade --target "${PYDIR}/site-packages" + # Useful Python packages "${PY_EXE}" -m pip install future six --upgrade --target "${PYDIR}/site-packages" # No psutil wheel is available on 10.6, and I don't know how to build a universal wheel @@ -1327,18 +1236,7 @@ fi echo "*** Signing frameworks" pushd "${package}/Contents/Frameworks" -if [ "${QT_VERSION_MAJOR}" = 4 ]; then - for f in "${qt_libs[@]}"; do - if [ -e "${f}.framework/Versions/${QT_VERSION_MAJOR}/${f}" ]; then - "${CODESIGN}" "${CODE_SIGN_OPTS[@]}" "${f}.framework/Versions/${QT_VERSION_MAJOR}/${f}" - fi - done - for f in *.framework; do - "${CODESIGN}" "${CODE_SIGN_OPTS[@]}" "$f" || true # fails on Qt4 frameworks - done -else - "${CODESIGN}" "${CODE_SIGN_OPTS[@]}" ./*.framework -fi +"${CODESIGN}" "${CODE_SIGN_OPTS[@]}" ./*.framework popd echo "*** Signing libraries" diff --git a/tools/jenkins/build-Windows-installer.sh b/tools/jenkins/build-Windows-installer.sh index b70c9a071c..0b364bf72b 100755 --- a/tools/jenkins/build-Windows-installer.sh +++ b/tools/jenkins/build-Windows-installer.sh @@ -385,13 +385,7 @@ for location in "${COPY_LOCATIONS[@]}"; do done #Copy Qt dlls (required for all PySide modules to work correctly) - if [ "${QT_VERSION_MAJOR}" = 4 ]; then - cp "$SDK_HOME/bin"/Qt*4.dll "$location/bin/" - # Ignore debug dlls of Qt - rm "$location/bin"/*d4.dll || true - else - cp "$SDK_HOME/bin"/Qt${QT_VERSION_MAJOR}*.dll "$location/bin/" - fi + cp "$SDK_HOME/bin"/Qt${QT_VERSION_MAJOR}*.dll "$location/bin/" rm "$location/bin/sqldrivers"/{*mysql*,*psql*} || true @@ -410,13 +404,8 @@ mkdir -p "${TMP_PORTABLE_DIR}/Plugins" cp -a "$SDK_HOME/lib/python${PYVER}" "${TMP_PORTABLE_DIR}/lib/" -if [[ ${QT_VERSION_MAJOR} -ge 5 ]]; then - PYSIDE_PLUGIN_PATH="${TMP_PORTABLE_DIR}/Plugins/PySide2" - mv "${TMP_PORTABLE_DIR}/lib/python${PYVER}/site-packages/PySide2" "${TMP_PORTABLE_DIR}/lib/python${PYVER}/site-packages/shiboken2" "${TMP_PORTABLE_DIR}/Plugins" -else - PYSIDE_PLUGIN_PATH="${TMP_PORTABLE_DIR}/Plugins/PySide" - mv "${TMP_PORTABLE_DIR}/lib/python${PYVER}/site-packages/PySide" "${TMP_PORTABLE_DIR}/Plugins" -fi +PYSIDE_PLUGIN_PATH="${TMP_PORTABLE_DIR}/Plugins/PySide2" +mv "${TMP_PORTABLE_DIR}/lib/python${PYVER}/site-packages/PySide2" "${TMP_PORTABLE_DIR}/lib/python${PYVER}/site-packages/shiboken2" "${TMP_PORTABLE_DIR}/Plugins" rm -rf "${TMP_PORTABLE_DIR}/lib/python${PYVER}"/{test,config,config-"${PYVER}"m} @@ -444,14 +433,7 @@ for dir in "${PYSIDE_PLUGIN_PATH}" "${TMP_PORTABLE_DIR}/lib/python${PYVER:-}"; d done fi -if [[ ${QT_VERSION_MAJOR} -ge 5 ]]; then - USE_QT5=1 -fi - # python zip -if [ "${USE_QT5:-}" != 1 ]; then - rm -rf "$PYDIR"/site-packages/shiboken2* "$PYDIR"/site-packages/PySide2 || true -fi export PY_BIN="$SDK_HOME/bin/python.exe" export PYDIR="$PYDIR" @@ -470,14 +452,8 @@ if [ -x "${NATRON_PYTHON}" ]; then "${NATRON_PYTHON}" get-pip.py rm get-pip.py # Install qtpy - if [ "${USE_QT5:-}" != 1 ]; then - # Qt4 support was dropped after QtPy 1.11.2 - "${NATRON_PYTHON}" -m pip install qtpy==1.11.2 - # bug fix for Qt4 - $GSED -i "s/^except ImportError:/except (ImportError, PythonQtError):/" "${TMP_PORTABLE_DIR}/lib/python${PYVER:-}/site-packages/qtpy/__init__.py" - else - "${NATRON_PYTHON}" -m pip install qtpy - fi + "${NATRON_PYTHON}" -m pip install qtpy + # Useful Python packages "${NATRON_PYTHON}" -m pip install future six #psutil # Run extra user provided pip install scripts diff --git a/tools/jenkins/build-natron.sh b/tools/jenkins/build-natron.sh index c69ed54f97..907931869a 100755 --- a/tools/jenkins/build-natron.sh +++ b/tools/jenkins/build-natron.sh @@ -50,21 +50,11 @@ if [ "$PKGOS" = "Linux" ]; then fi export C_INCLUDE_PATH="${SDK_HOME}/gcc/include:${SDK_HOME}/include:${SDK_HOME}/qt${QT_VERSION_MAJOR}/include" export CPLUS_INCLUDE_PATH="${C_INCLUDE_PATH}" -# https://github.com/msys2/MINGW-packages/issues/10761 -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129 -#elif [ "$PKGOS" = "Windows" ]; then -# export C_INCLUDE_PATH="${SDK_HOME}/gcc/include:${SDK_HOME}/include:${SDK_HOME}/qt${QT_VERSION_MAJOR}/include" -# export CPLUS_INCLUDE_PATH="${C_INCLUDE_PATH}" fi QMAKE="$QTDIR/bin/qmake" cd "$TMP_PATH" -# kill git if idle for too long -#"$KILLSCRIPT" $PID & -#KILLBOT=$! - - # OpenColorIO-Configs setup OCIO_CONFIGS_VERSION=${OCIO_CONFIGS_VERSION:-} if [ "$NATRON_BUILD_CONFIG" = "ALPHA" ] || [ "$NATRON_BUILD_CONFIG" = "BETA" ] || [ "$NATRON_BUILD_CONFIG" = "RC" ] || [ "$NATRON_BUILD_CONFIG" = "STABLE" ]; then @@ -79,7 +69,7 @@ fi if [ "$OCIO_CONFIGS_VERSION" = "" ]; then OCIO_CONFIGS_VERSION="3.0" - echo "Warnning: No OCIO config version found, setting to $OCIO_CONFIGS_VERSION" + echo "Warning: No OCIO config version found, setting to $OCIO_CONFIGS_VERSION" fi OCIO_CONFIGS_URL=https://github.com/NatronGitHub/OpenColorIO-Configs/archive/Natron-v${OCIO_CONFIGS_VERSION}.tar.gz @@ -139,14 +129,6 @@ else cat "$INC_PATH/natron/${PKGOS}.pri" > config.pri fi -if [ "$NO_BUILD" != "1" ] && ([ "${SDK_VERSION:-}" = "CY2016" ] || [ "${SDK_VERSION:-}" = "CY2017" ]); then - cat "$INC_PATH/natron/${SDK_VERSION}.pri" > config.pri - rm -f Engine/NatronEngine/* Gui/NatronGui/* - shiboken --avoid-protected-hack --enable-pyside-extensions --include-paths="../Engine:../Global:${SDK_HOME}/include:${SDK_HOME}/include/PySide2" --typesystem-paths="${SDK_HOME}/share/PySide2/typesystems" --output-directory=Engine Engine/Pyside_Engine_Python.h Engine/typesystem_engine.xml - shiboken --avoid-protected-hack --enable-pyside-extensions --include-paths="../Engine:../Gui:../Global:${SDK_HOME}/include:${SDK_HOME}/include/PySide2" --typesystem-paths="${SDK_HOME}/share/PySide2/typesystems:Engine" --output-directory=Gui Gui/Pyside_Gui_Python.h Gui/typesystem_natronGui.xml - sh tools/utils/runPostShiboken.sh -fi - echo "*** config.pri:" echo "========================================================================" cat config.pri @@ -267,11 +249,7 @@ QMAKE_FLAGS_EXTRA+=(CONFIG+=enable-osmesa OSMESA_PATH="$OSMESA_PATH" LLVM_PATH=" # mac compiler if [ "$PKGOS" = "OSX" ]; then if [ "$COMPILER" = "clang" ] || [ "$COMPILER" = "clang-omp" ]; then - if [ "${QT_VERSION_MAJOR}" = 4 ]; then - SPEC=unsupported/macx-clang - else - SPEC=macx-clang - fi + SPEC=macx-clang else SPEC=macx-g++ fi diff --git a/tools/jenkins/common.sh b/tools/jenkins/common.sh index 496c3ef9b9..8477927cdc 100644 --- a/tools/jenkins/common.sh +++ b/tools/jenkins/common.sh @@ -247,14 +247,11 @@ PY_EXE="$SDK_HOME/bin/python${PYV}" # export PYTHON_PATH PYTHON_INCLUDE -QT_VERSION_MAJOR=${QT_VERSION_MAJOR:-4} -if version_gt "${RELEASE_TAG:-0}" 2.5.99; then - QT_VERSION_MAJOR=5 +QT_VERSION_MAJOR=${QT_VERSION_MAJOR:-5} +if [[ ${QT_VERSION_MAJOR} -lt 5 ]]; then + echo "QT_VERSION_MAJOR ${QT_VERSION_MAJOR} not supported." + exit 1 fi -case "${GIT_BRANCH:-}" in -RB-2.[6789]) - QT_VERSION_MAJOR=5 -esac unset LD_LIBRARY_PATH LD_RUN_PATH DYLD_LIBRARY_PATH LIBRARY_PATH CPATH PKG_CONFIG_PATH # save the default PATH to avoid growing it each time we source this file diff --git a/tools/jenkins/genDllVersions.sh b/tools/jenkins/genDllVersions.sh index 6503dda634..a6fcde0ae3 100755 --- a/tools/jenkins/genDllVersions.sh +++ b/tools/jenkins/genDllVersions.sh @@ -89,32 +89,7 @@ function catDll() { INIT_VAR=1 DLL_VAR_PREFIX="NATRON" BIN_PATH="$SDK_HOME_BIN" -if [ "$QT_VERSION_MAJOR" = "4" ]; then - # all Qt libraries are necessary for PySide - catDll Qt3Support4 - catDll QtCLucene4 - catDll QtCore4 - catDll QtDBus4 - catDll QtDeclarative4 - catDll QtDesigner4 - catDll QtDesignerComponents4 - catDll QtGui4 - catDll QtHelp4 - catDll QtMultimedia4 - catDll QtNetwork4 - catDll QtOpenGL4 - catDll QtScript4 - catDll QtScriptTools4 - catDll QtSql4 - catDll QtSvg4 - catDll QtTest4 - catDll QtXml4 - catDll QtXmlPatterns4 - - catDll phonon4 - catDll libmng- - catDll libpcre- -elif [ "$QT_VERSION_MAJOR" = "5" ]; then +if [ "$QT_VERSION_MAJOR" = "5" ]; then catDll Qt5Concurrent catDll Qt5Core catDll Qt5DBus