diff --git a/Engine/AppInstance.h b/Engine/AppInstance.h index 60b5856a2d..8648a109cd 100644 --- a/Engine/AppInstance.h +++ b/Engine/AppInstance.h @@ -193,22 +193,22 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON virtual void warningDialog(const std::string & title, const std::string & message, bool* stopAsking, bool useHtml) const; virtual void informationDialog(const std::string & title, const std::string & message, bool useHtml) const; virtual void informationDialog(const std::string & title, const std::string & message, bool* stopAsking, bool useHtml) const; - virtual NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & title, + virtual StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, - NATRON_ENUM::StandardButtons buttons = - NATRON_ENUM::StandardButtons(NATRON_ENUM::eStandardButtonYes | NATRON_ENUM::eStandardButtonNo), - NATRON_ENUM::StandardButtonEnum defaultButton = NATRON_ENUM::eStandardButtonNoButton) const WARN_UNUSED_RETURN; + StandardButtons buttons = + StandardButtons(eStandardButtonYes | eStandardButtonNo), + StandardButtonEnum defaultButton = eStandardButtonNoButton) const WARN_UNUSED_RETURN; /** * @brief Asks a question to the user and returns the reply. * @param stopAsking Set to true if the user do not want Natron to ask the question again. **/ - virtual NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & /*title*/, + virtual StandardButtonEnum questionDialog(const std::string & /*title*/, const std::string & /*message*/, bool /*useHtml*/, - NATRON_ENUM::StandardButtons /*buttons*/, - NATRON_ENUM::StandardButtonEnum /*defaultButton*/, + StandardButtons /*buttons*/, + StandardButtonEnum /*defaultButton*/, bool* /*stopAsking*/) { return eStandardButtonYes; @@ -281,7 +281,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON { } - NATRON_ENUM::ViewerColorSpaceEnum getDefaultColorSpaceForBitDepth(NATRON_ENUM::ImageBitDepthEnum bitdepth) const; + ViewerColorSpaceEnum getDefaultColorSpaceForBitDepth(ImageBitDepthEnum bitdepth) const; double getProjectFrameRate() const; diff --git a/Engine/AppManager.h b/Engine/AppManager.h index f7de29dda9..6cf93b0c19 100644 --- a/Engine/AppManager.h +++ b/Engine/AppManager.h @@ -494,7 +494,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON void setOFXHostHandle(void* handle); OFX::Host::ImageEffect::Descriptor* getPluginContextAndDescribe(OFX::Host::ImageEffect::ImageEffectPlugin* plugin, - NATRON_ENUM::ContextEnum* ctx); + ContextEnum* ctx); AppTLS* getAppTLS() const; const OfxHost* getOFXHost() const; GPUContextPool* getGPUContextPool() const; @@ -567,7 +567,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON bool isTextureFloatSupported() const; - bool hasOpenGLForRequirements(NATRON_ENUM::OpenGLRequirementsTypeEnum type, QString* missingOpenGLError = 0) const; + bool hasOpenGLForRequirements(OpenGLRequirementsTypeEnum type, QString* missingOpenGLError = 0) const; virtual void updateAboutWindowLibrariesVersion() {} @@ -736,14 +736,14 @@ void warningDialog(const std::string & title, const std::string & message, bool* void informationDialog(const std::string & title, const std::string & message, bool useHtml = false); void informationDialog(const std::string & title, const std::string & message, bool* stopAsking, bool useHtml = false); -NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, - NATRON_ENUM::StandardButtons buttons = - NATRON_ENUM::StandardButtons(NATRON_ENUM::eStandardButtonYes | NATRON_ENUM::eStandardButtonNo), - NATRON_ENUM::StandardButtonEnum defaultButton = NATRON_ENUM::eStandardButtonNoButton); +StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, + StandardButtons buttons = + StandardButtons(eStandardButtonYes | eStandardButtonNo), + StandardButtonEnum defaultButton = eStandardButtonNoButton); -NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, - NATRON_ENUM::StandardButtons buttons, - NATRON_ENUM::StandardButtonEnum defaultButton, +StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, + StandardButtons buttons, + StandardButtonEnum defaultButton, bool* stopAsking); } // namespace Dialogs diff --git a/Engine/Knob.h b/Engine/Knob.h index 27d82d106a..385ba6bfa5 100644 --- a/Engine/Knob.h +++ b/Engine/Knob.h @@ -153,7 +153,7 @@ class KnobSignalSlotHandler Q_EMIT setValueWithUndoStack(v, view, dim); } - void s_appendParamEditChange(NATRON_ENUM::ValueChangedReasonEnum reason, + void s_appendParamEditChange(ValueChangedReasonEnum reason, Variant v, ViewSpec view, int dim, @@ -182,7 +182,7 @@ class KnobSignalSlotHandler Q_EMIT keyFrameMoved(view, dimension, oldTime, newTime); } - void s_redrawGuiCurve(NATRON_ENUM::CurveChangeReason reason, + void s_redrawGuiCurve(CurveChangeReason reason, ViewSpec view, int dimension) { @@ -354,7 +354,7 @@ public Q_SLOTS: struct KnobChange { KnobIPtr knob; - NATRON_ENUM::ValueChangedReasonEnum reason, originalReason; + ValueChangedReasonEnum reason, originalReason; bool originatedFromMainThread; bool refreshGui; double time; @@ -485,7 +485,7 @@ class KnobI * evaluate the new value (cause a render). * @returns true if the knobChanged handler was called once for this knob **/ - virtual bool evaluateValueChange(int dimension, double time, ViewSpec view, NATRON_ENUM::ValueChangedReasonEnum reason) = 0; + virtual bool evaluateValueChange(int dimension, double time, ViewSpec view, ValueChangedReasonEnum reason) = 0; /** * @brief Copies all the values, animations and extra data the other knob might have @@ -561,28 +561,28 @@ class KnobI /** * @brief Removes all the keyframes in the given dimension. **/ - virtual void removeAnimationWithReason(ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) = 0; + virtual void removeAnimationWithReason(ViewSpec view, int dimension, ValueChangedReasonEnum reason) = 0; public: /** * @brief Removes the keyframe at the given time and dimension if it matches any. **/ - virtual void deleteValueAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) = 0; - virtual void deleteValuesAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, const std::list& times, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) = 0; + virtual void deleteValueAtTime(CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) = 0; + virtual void deleteValuesAtTime(CurveChangeReason curveChangeReason, const std::list& times, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) = 0; /** * @brief Moves a keyframe by a given delta and emits the signal keyframeMoved **/ - virtual bool moveValueAtTime(NATRON_ENUM::CurveChangeReason reason, double time, ViewSpec view, int dimension, double dt, double dv, KeyFrame* newKey) = 0; - virtual bool moveValuesAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double dt, double dv, std::vector* keyframes) = 0; + virtual bool moveValueAtTime(CurveChangeReason reason, double time, ViewSpec view, int dimension, double dt, double dv, KeyFrame* newKey) = 0; + virtual bool moveValuesAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double dt, double dv, std::vector* keyframes) = 0; /** * @brief Transforms a keyframe by a given matrix. The matrix must not contain any skew or rotation. **/ - virtual bool transformValueAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, KeyFrame* newKey) = 0; - virtual bool transformValuesAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, std::vector* keyframes) = 0; + virtual bool transformValueAtTime(CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, KeyFrame* newKey) = 0; + virtual bool transformValuesAtTime(CurveChangeReason curveChangeReason, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, std::vector* keyframes) = 0; /** * @brief Copies all the animation of *curve* into the animation curve at the given dimension. @@ -592,25 +592,25 @@ class KnobI /** * @brief Changes the interpolation type for the given keyframe **/ - virtual bool setInterpolationAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, NATRON_ENUM::KeyframeTypeEnum interpolation, KeyFrame* newKey) = 0; + virtual bool setInterpolationAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, KeyframeTypeEnum interpolation, KeyFrame* newKey) = 0; /** * @brief Set the left/right derivatives of the control point at the given time. **/ - virtual bool moveDerivativesAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, double left, double right) = 0; - virtual bool moveDerivativeAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, double derivative, bool isLeft) = 0; + virtual bool moveDerivativesAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, double left, double right) = 0; + virtual bool moveDerivativeAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, double derivative, bool isLeft) = 0; /** * @brief Removes animation before the given time and dimension. If the reason is different than eValueChangedReasonUserEdited * a signal will be emitted **/ - virtual void deleteAnimationBeforeTime(double time, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) = 0; + virtual void deleteAnimationBeforeTime(double time, ViewSpec view, int dimension, ValueChangedReasonEnum reason) = 0; /** * @brief Removes animation before the given time and dimension. If the reason is different than eValueChangedReasonUserEdited * a signal will be emitted **/ - virtual void deleteAnimationAfterTime(double time, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) = 0; + virtual void deleteAnimationAfterTime(double time, ViewSpec view, int dimension, ValueChangedReasonEnum reason) = 0; /** * @brief Calls removeAnimation with a reason of eValueChangedReasonNatronInternalEdited. @@ -689,7 +689,7 @@ class KnobI protected: - virtual void refreshListenersAfterValueChange(ViewSpec view, NATRON_ENUM::ValueChangedReasonEnum reason, int dimension) = 0; + virtual void refreshListenersAfterValueChange(ViewSpec view, ValueChangedReasonEnum reason, int dimension) = 0; public: @@ -710,7 +710,7 @@ class KnobI **/ virtual bool onKeyFrameSet(double time, ViewSpec view, int dimension) = 0; virtual bool onKeyFrameSet(double time, ViewSpec view, const KeyFrame& key, int dimension) = 0; - virtual bool setKeyFrame(const KeyFrame& key, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) = 0; + virtual bool setKeyFrame(const KeyFrame& key, ViewSpec view, int dimension, ValueChangedReasonEnum reason) = 0; /** * @brief Called when the current time of the timeline changes. @@ -1163,14 +1163,14 @@ class KnobI * at the same dimension for the knob 'other'. * In case of success, this function returns true, otherwise false. **/ - virtual bool slaveToInternal(int dimension, const KnobIPtr & other, int otherDimension, NATRON_ENUM::ValueChangedReasonEnum reason, + virtual bool slaveToInternal(int dimension, const KnobIPtr & other, int otherDimension, ValueChangedReasonEnum reason, bool ignoreMasterPersistence) = 0; /** * @brief Unslaves a previously slaved dimension. The implementation should assert that * the dimension was really slaved. **/ - virtual void unSlaveInternal(int dimension, NATRON_ENUM::ValueChangedReasonEnum reason, bool copyState) = 0; + virtual void unSlaveInternal(int dimension, ValueChangedReasonEnum reason, bool copyState) = 0; public: @@ -1279,7 +1279,7 @@ class KnobI /** * @brief Get the current animation level. **/ - virtual NATRON_ENUM::AnimationLevelEnum getAnimationLevel(int dimension) const = 0; + virtual AnimationLevelEnum getAnimationLevel(int dimension) const = 0; /** * @brief Restores the default value @@ -1389,15 +1389,15 @@ class KnobHelper virtual void blockListenersNotification() OVERRIDE FINAL; virtual void unblockListenersNotification() OVERRIDE FINAL; virtual bool isListenersNotificationBlocked() const OVERRIDE FINAL WARN_UNUSED_RETURN; - virtual bool evaluateValueChange(int dimension, double time, ViewSpec view, NATRON_ENUM::ValueChangedReasonEnum reason) OVERRIDE FINAL; + virtual bool evaluateValueChange(int dimension, double time, ViewSpec view, ValueChangedReasonEnum reason) OVERRIDE FINAL; protected: // Returns true if the knobChanged handler was called bool evaluateValueChangeInternal(int dimension, double time, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason, - NATRON_ENUM::ValueChangedReasonEnum originalReason); + ValueChangedReasonEnum reason, + ValueChangedReasonEnum originalReason); virtual void onInternalValueChanged(int /*dimension*/, double /*time*/, @@ -1426,15 +1426,15 @@ class KnobHelper private: - virtual void removeAnimationWithReason(ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) OVERRIDE FINAL; - virtual void deleteValueAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension,bool copyCurveValueAtTimeToInternalValue) OVERRIDE FINAL; - virtual void deleteValuesAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, const std::list& times, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) OVERRIDE FINAL; + virtual void removeAnimationWithReason(ViewSpec view, int dimension, ValueChangedReasonEnum reason) OVERRIDE FINAL; + virtual void deleteValueAtTime(CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension,bool copyCurveValueAtTimeToInternalValue) OVERRIDE FINAL; + virtual void deleteValuesAtTime(CurveChangeReason curveChangeReason, const std::list& times, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) OVERRIDE FINAL; public: virtual void onKeyFrameRemoved(double time, ViewSpec view, int dimension, bool copyCurveValueAtTimeToInternalValue) OVERRIDE FINAL; - virtual bool moveValueAtTime(NATRON_ENUM::CurveChangeReason reason, double time, ViewSpec view, int dimension, double dt, double dv, KeyFrame* newKey) OVERRIDE FINAL; - virtual bool moveValuesAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double dt, double dv, std::vector* keyframes) OVERRIDE FINAL; + virtual bool moveValueAtTime(CurveChangeReason reason, double time, ViewSpec view, int dimension, double dt, double dv, KeyFrame* newKey) OVERRIDE FINAL; + virtual bool moveValuesAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double dt, double dv, std::vector* keyframes) OVERRIDE FINAL; private: bool moveValueAtTimeInternal(bool useGuiCurve, double time, ViewSpec view, int dimension, double dt, double dv, KeyFrame* newKey); @@ -1442,8 +1442,8 @@ class KnobHelper public: - virtual bool transformValueAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, KeyFrame* newKey) OVERRIDE FINAL; - virtual bool transformValuesAtTime(NATRON_ENUM::CurveChangeReason curveChangeReason, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, std::vector* keyframes) OVERRIDE FINAL; + virtual bool transformValueAtTime(CurveChangeReason curveChangeReason, double time, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, KeyFrame* newKey) OVERRIDE FINAL; + virtual bool transformValuesAtTime(CurveChangeReason curveChangeReason, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, std::vector* keyframes) OVERRIDE FINAL; private: bool transformValueAtTimeInternal(bool useGuiCurve, double time, ViewSpec view, int dimension, const Transform::Matrix3x3& matrix, KeyFrame* newKey); @@ -1451,15 +1451,15 @@ class KnobHelper public: virtual void cloneCurve(ViewSpec view, int dimension, const Curve& curve) OVERRIDE FINAL; - virtual bool setInterpolationAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, NATRON_ENUM::KeyframeTypeEnum interpolation, KeyFrame* newKey) OVERRIDE FINAL; - virtual bool moveDerivativesAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, double left, double right) OVERRIDE FINAL WARN_UNUSED_RETURN; - virtual bool moveDerivativeAtTime(NATRON_ENUM::CurveChangeReason reason, ViewSpec view, int dimension, double time, double derivative, bool isLeft) OVERRIDE FINAL WARN_UNUSED_RETURN; - virtual void deleteAnimationBeforeTime(double time, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) OVERRIDE FINAL; - virtual void deleteAnimationAfterTime(double time, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) OVERRIDE FINAL; + virtual bool setInterpolationAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, KeyframeTypeEnum interpolation, KeyFrame* newKey) OVERRIDE FINAL; + virtual bool moveDerivativesAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, double left, double right) OVERRIDE FINAL WARN_UNUSED_RETURN; + virtual bool moveDerivativeAtTime(CurveChangeReason reason, ViewSpec view, int dimension, double time, double derivative, bool isLeft) OVERRIDE FINAL WARN_UNUSED_RETURN; + virtual void deleteAnimationBeforeTime(double time, ViewSpec view, int dimension, ValueChangedReasonEnum reason) OVERRIDE FINAL; + virtual void deleteAnimationAfterTime(double time, ViewSpec view, int dimension, ValueChangedReasonEnum reason) OVERRIDE FINAL; private: - void deleteAnimationConditional(double time, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason, bool before); + void deleteAnimationConditional(double time, ViewSpec view, int dimension, ValueChangedReasonEnum reason, bool before); public: @@ -1494,7 +1494,7 @@ class KnobHelper template static T pyObjectToType(PyObject* o); - virtual void refreshListenersAfterValueChange(ViewSpec view, NATRON_ENUM::ValueChangedReasonEnum reason, int dimension) OVERRIDE FINAL; + virtual void refreshListenersAfterValueChange(ViewSpec view, ValueChangedReasonEnum reason, int dimension) OVERRIDE FINAL; public: @@ -1612,7 +1612,7 @@ class KnobHelper private: - virtual bool slaveToInternal(int dimension, const KnobIPtr & other, int otherDimension, NATRON_ENUM::ValueChangedReasonEnum reason + virtual bool slaveToInternal(int dimension, const KnobIPtr & other, int otherDimension, ValueChangedReasonEnum reason , bool ignoreMasterPersistence) OVERRIDE FINAL WARN_UNUSED_RETURN; protected: @@ -1638,7 +1638,7 @@ class KnobHelper virtual std::pair getMaster(int dimension) const OVERRIDE FINAL WARN_UNUSED_RETURN; virtual bool isSlave(int dimension) const OVERRIDE FINAL WARN_UNUSED_RETURN; - virtual NATRON_ENUM::AnimationLevelEnum getAnimationLevel(int dimension) const OVERRIDE FINAL WARN_UNUSED_RETURN; + virtual AnimationLevelEnum getAnimationLevel(int dimension) const OVERRIDE FINAL WARN_UNUSED_RETURN; virtual bool isTypeCompatible(const KnobIPtr & other) const OVERRIDE WARN_UNUSED_RETURN = 0; /** @@ -1748,19 +1748,19 @@ class KnobHelper { } - void cloneGuiCurvesIfNeeded(std::map& modifiedDimensions); + void cloneGuiCurvesIfNeeded(std::map& modifiedDimensions); - void cloneInternalCurvesIfNeeded(std::map& modifiedDimensions); + void cloneInternalCurvesIfNeeded(std::map& modifiedDimensions); void setInternalCurveHasChanged(ViewSpec view, int dimension, bool changed); - void guiCurveCloneInternalCurve(NATRON_ENUM::CurveChangeReason curveChangeReason, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason); + void guiCurveCloneInternalCurve(CurveChangeReason curveChangeReason, ViewSpec view, int dimension, ValueChangedReasonEnum reason); virtual std::shared_ptr getGuiCurve(ViewSpec view, int dimension, bool byPassMaster = false) const OVERRIDE FINAL; void setGuiCurveHasChanged(ViewSpec view, int dimension, bool changed); bool hasGuiCurveChanged(ViewSpec view, int dimension) const; - void clearExpressionsResultsIfNeeded(std::map& modifiedDimensions); + void clearExpressionsResultsIfNeeded(std::map& modifiedDimensions); std::shared_ptr _signalSlotHandler; @@ -1842,7 +1842,7 @@ class Knob virtual void unSlaveInternal(int dimension, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, bool copyState) OVERRIDE FINAL; public: @@ -1857,11 +1857,11 @@ class Knob const T & v, ViewSpec view, int dimension, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, KeyFrame* newKey, bool hasChanged = false); //!< set to true if any previous dimension of the same knob have changed - virtual bool setKeyFrame(const KeyFrame& key, ViewSpec view, int dimension, NATRON_ENUM::ValueChangedReasonEnum reason) OVERRIDE FINAL; + virtual bool setKeyFrame(const KeyFrame& key, ViewSpec view, int dimension, ValueChangedReasonEnum reason) OVERRIDE FINAL; /** * @brief Set the value of the knob in the given dimension with the given reason. @@ -1871,7 +1871,7 @@ class Knob ValueChangedReturnCodeEnum setValue(const T & v, ViewSpec view, int dimension, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, KeyFrame* newKey, bool hasChanged = false); //!< set to true if any previous dimension of the same knob have changed @@ -1889,25 +1889,25 @@ class Knob void setValues(const T& value0, const T& value1, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); void setValues(const T& value0, const T& value1, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, int dimensionOffset); void setValues(const T& value0, const T& value1, const T& value2, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); void setValues(const T& value0, const T& value1, const T& value2, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, int dimensionOffset); @@ -1916,7 +1916,7 @@ class Knob const T& value2, const T& value3, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); /** * @brief Calls setValue @@ -1928,7 +1928,7 @@ class Knob ValueChangedReturnCodeEnum onValueChanged(const T & v, ViewSpec view, int dimension, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, KeyFrame* newKey); /** @@ -1959,13 +1959,13 @@ class Knob const T& value0, const T& value1, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); void setValuesAtTime(double time, const T& value0, const T& value1, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, int dimensionOffset); void setValuesAtTime(double time, @@ -1973,14 +1973,14 @@ class Knob const T& value1, const T& value2, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); void setValuesAtTime(double time, const T& value0, const T& value1, const T& value2, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, int dimensionOffset); void setValuesAtTime(double time, @@ -1989,7 +1989,7 @@ class Knob const T& value2, const T& value3, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum reason); /** * @brief Unlike getValueAtTime this function doesn't interpolate the values. @@ -2180,7 +2180,7 @@ class Knob const T& value, const KeyFrame& key, bool useKey, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, bool valueChangesBlocked); virtual bool isSetValueAtTime() const { return false; } @@ -2196,7 +2196,7 @@ class Knob bool useKey() const; - NATRON_ENUM::ValueChangedReasonEnum reason() const; + ValueChangedReasonEnum reason() const; bool valueChangesBlocked() const; @@ -2215,7 +2215,7 @@ class Knob int dimension, const T& value, const KeyFrame& key, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, bool valueChangesBlocked) : QueuedSetValue(view, dimension, value, key, true, reason, valueChangesBlocked) , _time(time) @@ -2544,8 +2544,8 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON bool refreshGui, double time, ViewSpec view, - NATRON_ENUM::ValueChangedReasonEnum originalReason, - NATRON_ENUM::ValueChangedReasonEnum reason); + ValueChangedReasonEnum originalReason, + ValueChangedReasonEnum reason); bool isSetValueCurrentlyPossible() const; @@ -2610,14 +2610,14 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON * You should NEVER CALL THIS YOURSELF as it would break the bracketing system. * You can overload this to prepare yourself to a lot of value changes. **/ - void beginKnobsValuesChanged_public(NATRON_ENUM::ValueChangedReasonEnum reason); + void beginKnobsValuesChanged_public(ValueChangedReasonEnum reason); /** * @brief The virtual portion of notifyProjectEndKnobsValuesChanged(). This is called by the project * You should NEVER CALL THIS YOURSELF as it would break the bracketing system. * You can overload this to finish a serie of value changes, thus limiting the amount of changes to do. **/ - void endKnobsValuesChanged_public(NATRON_ENUM::ValueChangedReasonEnum reason); + void endKnobsValuesChanged_public(ValueChangedReasonEnum reason); /** @@ -2626,7 +2626,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON * You can overload this to do things when a value is changed. Bear in mind that you can compress * the change by using the begin/end[ValueChanges] to optimize the changes. **/ - virtual bool onKnobValueChanged_public(KnobI* k, NATRON_ENUM::ValueChangedReasonEnum reason, double time, ViewSpec view, + virtual bool onKnobValueChanged_public(KnobI* k, ValueChangedReasonEnum reason, double time, ViewSpec view, bool originatedFromMainThread); @@ -2708,7 +2708,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON * You should NEVER CALL THIS YOURSELF as it would break the bracketing system. * You can overload this to prepare yourself to a lot of value changes. **/ - virtual void beginKnobsValuesChanged(NATRON_ENUM::ValueChangedReasonEnum reason) + virtual void beginKnobsValuesChanged(ValueChangedReasonEnum reason) { Q_UNUSED(reason); } @@ -2718,7 +2718,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON * You should NEVER CALL THIS YOURSELF as it would break the bracketing system. * You can overload this to finish a serie of value changes, thus limiting the amount of changes to do. **/ - virtual void endKnobsValuesChanged(NATRON_ENUM::ValueChangedReasonEnum reason) + virtual void endKnobsValuesChanged(ValueChangedReasonEnum reason) { Q_UNUSED(reason); } @@ -2730,7 +2730,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON * the change by using the begin/end[ValueChanges] to optimize the changes. **/ virtual bool onKnobValueChanged(KnobI* /*k*/, - NATRON_ENUM::ValueChangedReasonEnum /*reason*/, + ValueChangedReasonEnum /*reason*/, double /*time*/, ViewSpec /*view*/, bool /*originatedFromMainThread*/) diff --git a/Engine/KnobTypes.h b/Engine/KnobTypes.h index 387f371832..9fbd60203b 100644 --- a/Engine/KnobTypes.h +++ b/Engine/KnobTypes.h @@ -248,13 +248,13 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON static const std::string & typeNameStatic(); - NATRON_ENUM::ValueIsNormalizedEnum getValueIsNormalized(int dimension) const + ValueIsNormalizedEnum getValueIsNormalized(int dimension) const { return _valueIsNormalized[dimension]; } void setValueIsNormalized(int dimension, - NATRON_ENUM::ValueIsNormalizedEnum state) + ValueIsNormalizedEnum state) { _valueIsNormalized[dimension] = state; } @@ -372,7 +372,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON /// - kOfxParamDoubleTypeNormalisedYAbsolute - normalised absolute position on the Y axis (1D only) /// - kOfxParamDoubleTypeNormalisedXY - normalised to the project's X and Y size (2D only), /// - kOfxParamDoubleTypeNormalisedXYAbsolute - normalised to the projects X and Y size, and is an absolute position on the image plane, - std::vector _valueIsNormalized; + std::vector _valueIsNormalized; ///For double params respecting the kOfxParamCoordinatesNormalised ///This tells us that only the default value is stored normalized. @@ -1009,33 +1009,33 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON std::pair getParametricRange() const WARN_UNUSED_RETURN; CurvePtr getParametricCurve(int dimension) const; CurvePtr getDefaultParametricCurve(int dimension) const; - NATRON_ENUM::StatusEnum addControlPoint(NATRON_ENUM::ValueChangedReasonEnum reason, int dimension, double key, double value, NATRON_ENUM::KeyframeTypeEnum interpolation = NATRON_ENUM::eKeyframeTypeSmooth) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum addControlPoint(NATRON_ENUM::ValueChangedReasonEnum reason, int dimension, double key, double value, double leftDerivative, double rightDerivative, NATRON_ENUM::KeyframeTypeEnum interpolation = NATRON_ENUM::eKeyframeTypeSmooth) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum getValue(int dimension, double parametricPosition, double *returnValue) const WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum getNControlPoints(int dimension, int *returnValue) const WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum getNthControlPoint(int dimension, + StatusEnum addControlPoint(ValueChangedReasonEnum reason, int dimension, double key, double value, KeyframeTypeEnum interpolation = eKeyframeTypeSmooth) WARN_UNUSED_RETURN; + StatusEnum addControlPoint(ValueChangedReasonEnum reason, int dimension, double key, double value, double leftDerivative, double rightDerivative, KeyframeTypeEnum interpolation = eKeyframeTypeSmooth) WARN_UNUSED_RETURN; + StatusEnum getValue(int dimension, double parametricPosition, double *returnValue) const WARN_UNUSED_RETURN; + StatusEnum getNControlPoints(int dimension, int *returnValue) const WARN_UNUSED_RETURN; + StatusEnum getNthControlPoint(int dimension, int nthCtl, double *key, double *value) const WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum getNthControlPoint(int dimension, + StatusEnum getNthControlPoint(int dimension, int nthCtl, double *key, double *value, double *leftDerivative, double *rightDerivative) const WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum setNthControlPointInterpolation(NATRON_ENUM::ValueChangedReasonEnum reason, + StatusEnum setNthControlPointInterpolation(ValueChangedReasonEnum reason, int dimension, int nThCtl, - NATRON_ENUM::KeyframeTypeEnum interpolation) WARN_UNUSED_RETURN; + KeyframeTypeEnum interpolation) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum setNthControlPoint(NATRON_ENUM::ValueChangedReasonEnum reason, + StatusEnum setNthControlPoint(ValueChangedReasonEnum reason, int dimension, int nthCtl, double key, double value) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum setNthControlPoint(NATRON_ENUM::ValueChangedReasonEnum reason, + StatusEnum setNthControlPoint(ValueChangedReasonEnum reason, int dimension, int nthCtl, double key, @@ -1044,8 +1044,8 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON double rightDerivative) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum deleteControlPoint(NATRON_ENUM::ValueChangedReasonEnum reason, int dimension, int nthCtl) WARN_UNUSED_RETURN; - NATRON_ENUM::StatusEnum deleteAllControlPoints(NATRON_ENUM::ValueChangedReasonEnum reason, int dimension) WARN_UNUSED_RETURN; + StatusEnum deleteControlPoint(ValueChangedReasonEnum reason, int dimension, int nthCtl) WARN_UNUSED_RETURN; + StatusEnum deleteAllControlPoints(ValueChangedReasonEnum reason, int dimension) WARN_UNUSED_RETURN; static const std::string & typeNameStatic() WARN_UNUSED_RETURN; void saveParametricCurves(std::list* curves) const; diff --git a/Engine/MergingEnum.h b/Engine/MergingEnum.h index 1084a658a7..32fee7ea44 100644 --- a/Engine/MergingEnum.h +++ b/Engine/MergingEnum.h @@ -43,7 +43,7 @@ namespace Merge { * Keep this in sync with the Merge node's operators otherwise everything will fall apart. **/ inline std::string -getOperatorString(NATRON_ENUM::MergingFunctionEnum operation) +getOperatorString(MergingFunctionEnum operation) { switch (operation) { case eMergeATop: @@ -169,7 +169,7 @@ getOperatorString(NATRON_ENUM::MergingFunctionEnum operation) } // getOperationString inline std::string -getOperatorHelpString(NATRON_ENUM::MergingFunctionEnum operation) +getOperatorHelpString(MergingFunctionEnum operation) { switch (operation) { case eMergeATop: @@ -295,8 +295,8 @@ getOperatorHelpString(NATRON_ENUM::MergingFunctionEnum operation) } // getOperationHelpString inline -NATRON_ENUM::PixmapEnum -getOperatorPixmap(NATRON_ENUM::MergingFunctionEnum operation) +PixmapEnum +getOperatorPixmap(MergingFunctionEnum operation) { switch (operation) { case eMergeATop: diff --git a/Engine/Plugin.h b/Engine/Plugin.h index 3f1b743348..d753364bb5 100644 --- a/Engine/Plugin.h +++ b/Engine/Plugin.h @@ -173,7 +173,7 @@ class Plugin int _majorVersion; int _minorVersion; - NATRON_ENUM::ContextEnum _ofxContext; + ContextEnum _ofxContext; mutable bool _hasShortcutSet; //< to speed up the keypress event of Nodegraph, this is used to find out quickly whether it has a shortcut or not. bool _isReader, _isWriter; @@ -195,7 +195,7 @@ class Plugin bool _multiThreadingEnabled; bool _openglActivated; - NATRON_ENUM::PluginOpenGLRenderSupport _openglRenderSupport; + PluginOpenGLRenderSupport _openglRenderSupport; public: @@ -357,9 +357,9 @@ class Plugin void setOfxPlugin(OFX::Host::ImageEffect::ImageEffectPlugin* p); OFX::Host::ImageEffect::ImageEffectPlugin* getOfxPlugin() const; - OFX::Host::ImageEffect::Descriptor* getOfxDesc(NATRON_ENUM::ContextEnum* ctx) const; + OFX::Host::ImageEffect::Descriptor* getOfxDesc(ContextEnum* ctx) const; - void setOfxDesc(OFX::Host::ImageEffect::Descriptor* desc, NATRON_ENUM::ContextEnum ctx); + void setOfxDesc(OFX::Host::ImageEffect::Descriptor* desc, ContextEnum ctx); bool isRenderScaleEnabled() const; void setRenderScaleEnabled(bool b); @@ -373,8 +373,8 @@ class Plugin bool isOpenGLEnabled() const; void setOpenGLEnabled(bool b); - void setOpenGLRenderSupport(NATRON_ENUM::PluginOpenGLRenderSupport support); - NATRON_ENUM::PluginOpenGLRenderSupport getPluginOpenGLRenderSupport() const; + void setOpenGLRenderSupport(PluginOpenGLRenderSupport support); + PluginOpenGLRenderSupport getPluginOpenGLRenderSupport() const; }; struct Plugin_compare_version diff --git a/Engine/PyNode.h b/Engine/PyNode.h index 805587b2be..4271f54c41 100644 --- a/Engine/PyNode.h +++ b/Engine/PyNode.h @@ -200,7 +200,7 @@ class UserParamHolder void refreshUserParamsGUI(); virtual bool onKnobValueChanged(KnobI* k, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, double time, ViewSpec view, bool originatedFromMainThread) @@ -383,8 +383,8 @@ class Effect double getPixelAspectRatio() const; - NATRON_ENUM::ImageBitDepthEnum getBitDepth() const; - NATRON_ENUM::ImagePremultiplicationEnum getPremult() const; + ImageBitDepthEnum getBitDepth() const; + ImagePremultiplicationEnum getPremult() const; void setPagesOrder(const QStringList& pages); }; diff --git a/Engine/PyParameter.h b/Engine/PyParameter.h index ca1e240c1f..f47ecce585 100644 --- a/Engine/PyParameter.h +++ b/Engine/PyParameter.h @@ -264,7 +264,7 @@ class AnimatedParam bool setExpression(const QString& expr, bool hasRetVariable, int dimension = 0); QString getExpression(int dimension, bool* hasRetVariable) const; - bool setInterpolationAtTime(double time, NATRON_ENUM::KeyframeTypeEnum interpolation, int dimension = 0); + bool setInterpolationAtTime(double time, KeyframeTypeEnum interpolation, int dimension = 0); }; /** @@ -1169,31 +1169,31 @@ class ParametricParam void getCurveColor(int dimension, ColorTuple& ret) const; - NATRON_ENUM::StatusEnum addControlPoint(int dimension, double key, double value, NATRON_ENUM::KeyframeTypeEnum interpolation = NATRON_ENUM::eKeyframeTypeSmooth); - NATRON_ENUM::StatusEnum addControlPoint(int dimension, double key, double value, double leftDerivative, double rightDerivative, NATRON_ENUM::KeyframeTypeEnum interpolation = NATRON_ENUM::eKeyframeTypeSmooth); + StatusEnum addControlPoint(int dimension, double key, double value, KeyframeTypeEnum interpolation = eKeyframeTypeSmooth); + StatusEnum addControlPoint(int dimension, double key, double value, double leftDerivative, double rightDerivative, KeyframeTypeEnum interpolation = eKeyframeTypeSmooth); double getValue(int dimension, double parametricPosition) const; int getNControlPoints(int dimension) const; - // NATRON_ENUM:: is necessary for shiboken - NATRON_ENUM::StatusEnum getNthControlPoint(int dimension, + // is necessary for shiboken + StatusEnum getNthControlPoint(int dimension, int nthCtl, double *key, double *value, double *leftDerivative, double *rightDerivative) const; - NATRON_ENUM::StatusEnum setNthControlPoint(int dimension, + StatusEnum setNthControlPoint(int dimension, int nthCtl, double key, double value, double leftDerivative, double rightDerivative); - NATRON_ENUM::StatusEnum setNthControlPointInterpolation(int dimension, + StatusEnum setNthControlPointInterpolation(int dimension, int nThCtl, - NATRON_ENUM::KeyframeTypeEnum interpolation); - NATRON_ENUM::StatusEnum deleteControlPoint(int dimension, int nthCtl); - NATRON_ENUM::StatusEnum deleteAllControlPoints(int dimension); + KeyframeTypeEnum interpolation); + StatusEnum deleteControlPoint(int dimension, int nthCtl); + StatusEnum deleteAllControlPoints(int dimension); void setDefaultCurvesFromCurrentCurves(); }; diff --git a/Engine/PyRoto.h b/Engine/PyRoto.h index 7725846fde..16996b11e4 100644 --- a/Engine/PyRoto.h +++ b/Engine/PyRoto.h @@ -153,8 +153,8 @@ class BezierCurve ColorTuple getColor(double time); void setColor(double time, double r, double g, double b); - void setCompositingOperator(NATRON_ENUM::MergingFunctionEnum op); - NATRON_ENUM::MergingFunctionEnum getCompositingOperator() const; + void setCompositingOperator(MergingFunctionEnum op); + MergingFunctionEnum getCompositingOperator() const; BooleanParam* getActivatedParam() const; DoubleParam* getOpacityParam() const; DoubleParam* getFeatherDistanceParam() const; diff --git a/Engine/typesystem_engine.xml b/Engine/typesystem_engine.xml index e01264e84c..2c1666f4b5 100644 --- a/Engine/typesystem_engine.xml +++ b/Engine/typesystem_engine.xml @@ -210,7 +210,7 @@ - + @@ -225,8 +225,7 @@ - - + @@ -1502,7 +1501,7 @@ double key,value,left,right; %RETURN_TYPE %0 = %CPPSELF.%FUNCTION_NAME(%1, %2,&key,&value, &left, &right); %PYARG_0 = PyTuple_New(5); - PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[NATRON_ENUM::StatusEnum](%0)); + PyTuple_SET_ITEM(%PYARG_0, 0, %CONVERTTOPYTHON[StatusEnum](%0)); PyTuple_SET_ITEM(%PYARG_0, 1, %CONVERTTOPYTHON[double](key)); PyTuple_SET_ITEM(%PYARG_0, 2, %CONVERTTOPYTHON[double](value)); PyTuple_SET_ITEM(%PYARG_0, 3, %CONVERTTOPYTHON[double](left)); diff --git a/Global/Enums.h b/Global/Enums.h index fbcb456ffa..e366225263 100644 --- a/Global/Enums.h +++ b/Global/Enums.h @@ -28,11 +28,6 @@ CLANG_DIAG_OFF(deprecated) CLANG_DIAG_ON(deprecated) NATRON_NAMESPACE_ENTER -#ifdef SBK_RUN -// shiboken doesn't generate SbkNatronEngine_StandardButtonEnum_as_number unless it is put in a class or namespace -NATRON_NAMESPACE_EXIT -namespace NATRON_ENUM { -#endif enum ScaleTypeEnum { @@ -685,15 +680,8 @@ enum MergingFunctionEnum //typedef QFlags StandardButtons; Q_DECLARE_FLAGS(StandardButtons, StandardButtonEnum) -#ifdef SBK_RUN -} -NATRON_NAMESPACE_ENTER -#endif - NATRON_NAMESPACE_EXIT -Q_DECLARE_METATYPE(NATRON_ENUM::StandardButtons) - #endif // NATRON_GLOBAL_ENUMS_H diff --git a/Global/Macros.h b/Global/Macros.h index 4462278f53..ef86526083 100644 --- a/Global/Macros.h +++ b/Global/Macros.h @@ -52,7 +52,6 @@ namespace Python { } // run shiboken without the Natron namespace, and add NATRON_NAMESPACE_USING to each cpp afterwards #define NATRON_NAMESPACE -#undef NATRON_ENUM #define NATRON_NAMESPACE_ENTER #define NATRON_NAMESPACE_EXIT #define NATRON_PYTHON_NAMESPACE @@ -62,7 +61,6 @@ namespace Python { } #else // !SBK_RUN #define NATRON_NAMESPACE Natron -#define NATRON_ENUM NATRON_NAMESPACE // Macros to use in each file to enter and exit the right name spaces. #define NATRON_NAMESPACE_ENTER namespace NATRON_NAMESPACE { #define NATRON_NAMESPACE_EXIT } diff --git a/Gui/GuiAppInstance.h b/Gui/GuiAppInstance.h index bbb125b829..5b53c4bc1f 100644 --- a/Gui/GuiAppInstance.h +++ b/Gui/GuiAppInstance.h @@ -120,16 +120,16 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON virtual void warningDialog(const std::string & title, const std::string & message, bool* stopAsking, bool useHtml) const OVERRIDE FINAL; virtual void informationDialog(const std::string & title, const std::string & message, bool useHtml) const OVERRIDE FINAL; virtual void informationDialog(const std::string & title, const std::string & message, bool* stopAsking, bool useHtml) const OVERRIDE FINAL; - virtual NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & title, + virtual StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, - NATRON_ENUM::StandardButtons buttons = NATRON_ENUM::StandardButtons(NATRON_ENUM::eStandardButtonYes | NATRON_ENUM::eStandardButtonNo), - NATRON_ENUM::StandardButtonEnum defaultButton = NATRON_ENUM::eStandardButtonNoButton) const OVERRIDE FINAL WARN_UNUSED_RETURN; - virtual NATRON_ENUM::StandardButtonEnum questionDialog(const std::string & title, + StandardButtons buttons = StandardButtons(eStandardButtonYes | eStandardButtonNo), + StandardButtonEnum defaultButton = eStandardButtonNoButton) const OVERRIDE FINAL WARN_UNUSED_RETURN; + virtual StandardButtonEnum questionDialog(const std::string & title, const std::string & message, bool useHtml, - NATRON_ENUM::StandardButtons buttons, - NATRON_ENUM::StandardButtonEnum defaultButton, + StandardButtons buttons, + StandardButtonEnum defaultButton, bool* stopAsking) OVERRIDE FINAL WARN_UNUSED_RETURN; virtual void loadProjectGui(bool isAutosave, boost::archive::xml_iarchive & archive) const OVERRIDE FINAL; virtual void saveProjectGui(boost::archive::xml_oarchive & archive) OVERRIDE FINAL; diff --git a/Gui/GuiApplicationManager.h b/Gui/GuiApplicationManager.h index 2ceb5ccb6b..7e858b3310 100644 --- a/Gui/GuiApplicationManager.h +++ b/Gui/GuiApplicationManager.h @@ -100,15 +100,15 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON return false; } - void getIcon(NATRON_ENUM::PixmapEnum e, QPixmap* pix) const; - void getIcon(NATRON_ENUM::PixmapEnum e, int size, QPixmap* pix) const; + void getIcon(PixmapEnum e, QPixmap* pix) const; + void getIcon(PixmapEnum e, int size, QPixmap* pix) const; - void setKnobClipBoard(NATRON_ENUM::KnobClipBoardType type, + void setKnobClipBoard(KnobClipBoardType type, const KnobIPtr& serialization, int dimension); - void getKnobClipBoard(NATRON_ENUM::KnobClipBoardType *type, + void getKnobClipBoard(KnobClipBoardType *type, KnobIPtr* serialization, int *dimension) const; diff --git a/Gui/PyGlobalGui.h b/Gui/PyGlobalGui.h index f14836dac5..1a7a63f56d 100644 --- a/Gui/PyGlobalGui.h +++ b/Gui/PyGlobalGui.h @@ -59,7 +59,7 @@ class PyGuiApplication { } - QPixmap getIcon(NATRON_ENUM::PixmapEnum val) const + QPixmap getIcon(PixmapEnum val) const { QPixmap ret; @@ -101,7 +101,7 @@ class PyGuiApplication Dialogs::errorDialog( title.toStdString(), message.toStdString() ); } - NATRON_ENUM::StandardButtonEnum questionDialog(const QString& title, + StandardButtonEnum questionDialog(const QString& title, const QString& message) { return Dialogs::questionDialog(title.toStdString(), message.toStdString(), false); diff --git a/Gui/PyGuiApp.h b/Gui/PyGuiApp.h index b045e1bbf3..5e4aa25d44 100644 --- a/Gui/PyGuiApp.h +++ b/Gui/PyGuiApp.h @@ -74,13 +74,13 @@ class PyViewer void getFrameRange(int* firstFrame, int* lastFrame) const; - void setPlaybackMode(NATRON_ENUM::PlaybackModeEnum mode); + void setPlaybackMode(PlaybackModeEnum mode); - NATRON_ENUM::PlaybackModeEnum getPlaybackMode() const; + PlaybackModeEnum getPlaybackMode() const; - NATRON_ENUM::ViewerCompositingOperatorEnum getCompositingOperator() const; + ViewerCompositingOperatorEnum getCompositingOperator() const; - void setCompositingOperator(NATRON_ENUM::ViewerCompositingOperatorEnum op); + void setCompositingOperator(ViewerCompositingOperatorEnum op); int getAInput() const; @@ -90,9 +90,9 @@ class PyViewer void setBInput(int index); - void setChannels(NATRON_ENUM::DisplayChannelsEnum channels); + void setChannels(DisplayChannelsEnum channels); - NATRON_ENUM::DisplayChannelsEnum getChannels() const; + DisplayChannelsEnum getChannels() const; void setProxyModeEnabled(bool enabled); diff --git a/Gui/PythonPanels.h b/Gui/PythonPanels.h index c5f83ed529..95e56ce28d 100644 --- a/Gui/PythonPanels.h +++ b/Gui/PythonPanels.h @@ -74,7 +74,7 @@ GCC_DIAG_SUGGEST_OVERRIDE_ON virtual void initializeKnobs() OVERRIDE FINAL {} virtual bool onKnobValueChanged(KnobI* k, - NATRON_ENUM::ValueChangedReasonEnum reason, + ValueChangedReasonEnum reason, double time, ViewSpec view, bool originatedFromMainThread) OVERRIDE FINAL; @@ -91,7 +91,7 @@ class PyModalDialog public: PyModalDialog( Gui* gui, - NATRON_ENUM::StandardButtons defaultButtons = NATRON_ENUM::StandardButtons(NATRON_ENUM::eStandardButtonOk | NATRON_ENUM::eStandardButtonCancel) ); + StandardButtons defaultButtons = StandardButtons(eStandardButtonOk | eStandardButtonCancel) ); virtual ~PyModalDialog(); diff --git a/tools/utils/runPostShiboken.sh b/tools/utils/runPostShiboken.sh deleted file mode 100755 index e27d7d50f7..0000000000 --- a/tools/utils/runPostShiboken.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash -# ***** BEGIN LICENSE BLOCK ***** -# This file is part of Natron , -# Copyright (C) 2016 INRIA and Alexandre Gauthier -# -# 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 ***** - -# exit if a command returns an error status -set -e - -if [ "$#" -ne 2 ]; then - echo "usage: " 2>&1 - exit 1 -fi - -wrapper_dir="$1" -wrapper_name=$2 -wrapper_source=${wrapper_name}_module_wrapper.cpp -wrapper_header=${wrapper_name}_python.h - -# To be run after shiboken to fix errors - -sed -e '//d' -i'.bak' "$wrapper_dir"/*.cpp -sed -e '//d' -i'.bak' "$wrapper_dir"/*.cpp -sed -e '/Py_BEGIN_ALLOW_THREADS/d' -i'.bak' "$wrapper_dir"/*.cpp -sed -e '/Py_BEGIN_ALLOW_THREADS/d' -i'.bak' "$wrapper_dir"/*.cpp -sed -e '/Py_END_ALLOW_THREADS/d' -i'.bak' "$wrapper_dir"/*.cpp -sed -e '/Py_END_ALLOW_THREADS/d' -i'.bak' "$wrapper_dir"/*.cpp -if [ "$wrapper_name" = "natrongui" ]; then - $SED -e "/SbkPySide_QtCoreTypes;/d" -i'.bak' "$wrapper_dir/$wrapper_source" - $SED -e "/SbkPySide_QtCoreTypeConverters;/d" -i'.bak' "$wrapper_dir/$wrapper_source" - $SED -e '/SbkNatronEngineTypes;/d' -i'.bak' "$wrapper_dir/$wrapper_source" - $SED -e '/SbkNatronEngineTypeConverters;/d' -i'.bak' "$wrapper_dir/$wrapper_source" - $SED -e 's/cleanTypesAttributes/cleanGuiTypesAttributes/g' -i'.bak' "$wrapper_dir/$wrapper_source" -fi - -# fix warnings -sed -e 's@^#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@' -i'.bak' "$wrapper_dir"/*.cpp - -sed -e 's@// Extra includes@// Extra includes\ -NATRON_NAMESPACE_USING NATRON_PYTHON_NAMESPACE_USING@' -i'.bak' "$wrapper_dir"/*.cpp - -# replace NATRON_NAMESPACE with Natron for enums with flags (e.g. StandardButtonEnum) -sed -e 's@"NatronEngine\.NATRON_NAMESPACE@"NatronEngine.Natron@g' -e 's@, NatronEngine\.NATRON_NAMESPACE@, NatronEngine.Natron@g' -e 's@"NatronGui\.NATRON_NAMESPACE@"NatronGui.Natron@g' -e 's@"NATRON_NAMESPACE@"Natron@g' -i'.bak' "$wrapper_dir"/*_wrapper.cpp - -# re-add the Natron namespace -#sed -e 's@" ::\([^s][^t][^d]\)@ NATRON_NAMESPACE::\1@g' -i'.bak' Engine/NatronEngine/*.cpp Engine/NatronEngine/*.h Gui/NatronGui/*.cpp Gui/NatronGui/*.h - -sed -e 's@SbkType< ::@SbkType$@CLANG_DIAG_OFF(header-guard)\ -#include // has wrong header guards in pyside 1.2.2@' -i'.bak' "$wrapper_dir"/*.cpp - -sed -e 's@^#include $@// 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@' -i'.bak' "$wrapper_dir"/*.cpp "$wrapper_dir"/*.h - -sed -e 's@^#include $@// 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@' -i'.bak' "$wrapper_dir"/*.cpp "$wrapper_dir"/*.h - -# clean up -rm "$wrapper_dir"/*.bak diff --git a/tools/utils/runPostShiboken2.sh b/tools/utils/runPostShiboken2.sh index 349970b45e..eed2f71319 100755 --- a/tools/utils/runPostShiboken2.sh +++ b/tools/utils/runPostShiboken2.sh @@ -84,8 +84,6 @@ NATRON_PYTHON_NAMESPACE_EXIT NATRON_NAMESPACE_EXIT@g' -i'.bak' "$wrapper_dir"/*. # replace NATRON_NAMESPACE::NATRON_NAMESPACE with NATRON_NAMESPACE in the enums wrappers $SED -e 's@NATRON_NAMESPACE::NATRON_PYTHON_NAMESPACE::NATRON_NAMESPACE@NATRON_NAMESPACE@g' -i'.bak' "$wrapper_dir/$wrapper_header" -$SED -e 's@NATRON_NAMESPACE::NATRON_PYTHON_NAMESPACE::NATRON_ENUM@NATRON_ENUM@g' -i'.bak' "$wrapper_dir/$wrapper_header" -$SED -e 's@"NATRON_ENUM@"Natron@g' -e 's@\.NATRON_ENUM@.Natron@g' -e 's@NATRON_ENUM\.@Natron.@g' -i'.bak' "$wrapper_dir"/*_wrapper.cpp $SED -e 's@^#include $@CLANG_DIAG_OFF(header-guard)\