summaryrefslogtreecommitdiffstats
path: root/src/animation
Commit message (Collapse)AuthorAgeFilesLines
* Revert "AnimationClip: fix the way we compute the duration"Paul Lemire2021-11-261-7/+4
| | | | | | | | | | | | Turns out we want the global clip duration and not the relative clip duration. Therefore global clip duration is always computed from 0. If the first keyframe is offset, then this means animation does nothing until t=offset. This reverts commit 7b23cb1ca5b32fcf24f889e79cec756786f86233. Pick-to: 6.2 5.15 Change-Id: Ic045a3cdea5eac4b8e35b75737e3ae6f00b9fa20 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* AnimationClip: fix the way we compute the durationPaul Lemire2021-11-241-4/+7
| | | | | | | | | We wrongly assumed the start time of a clip was always 0. In practice this might not be the case. Therefore, we now compute duration as tEnd - tStart. Change-Id: I13ca860f3366c2aba5e978cb0c955e7bb2e7bc39 Pick-to: 6.2 5.15 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Revert "QVector<T>::const_iterator isn't always a const T*"Thiago Macieira2021-11-033-6/+3
| | | | | | | | | This reverts commit 1286bd5bf4348b52ec431be0c37197da9506df6e. Reason for revert: this change was binary-incompatible. Change-Id: Ic39284d5f8282ad4b175063220696ab60031c732 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix compilation with latest qtbaseKai Köhne2021-10-283-6/+6
| | | | | | | | | | Make the conversion from QList<Type>::const_iterator to Type* pointer explicit; since qtbase commit 0220484329029fc75, QList doesn't support the implicit conversion anymore. Fixes: QTBUG-97708 Change-Id: Ief96263871c5fd1179bf625d1c3d1c31c5def1c8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVector<T>::const_iterator isn't always a const T*Ville Voutilainen2021-10-253-3/+6
| | | | | | | | This manifests on android developer builds, where the build of qt3d failed because of this. Change-Id: Ic3bce6880b0d73f03bb2e27db278edd2981b061e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Reset ClipAnimator loop counter on cleanupMauro Persano2021-09-291-0/+1
| | | | | | | | | Otherwise, if a backend node with a loop counter larger than 1 is reused for a non-looping animation, the animation won't get played. Pick-to: 6.2 Change-Id: I5b043b9c844bba9b04edc5db383bdf0e3b92fe87 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Replace QT_BEGIN_LICENSE:LGPL3 headerKai Köhne2021-08-1096-982/+1270
| | | | | | | | | | Replace outdated LGPL3 with LGPL header in src, and GPL3-EXCEPT in tests. Task-number: QTBUG-90321 Pick-to: 6.2 Change-Id: I3f6491cb402a993a4341a983c780337e8658c256 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QChannel/QChannelComponent: Export comparison operatorsFriedemann Kleint2021-06-072-8/+8
| | | | | | Pick-to: 6.1 Change-Id: I44d1400da38949285f1c12c17bba3561b36f6dc9 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Don't export QKeyFrame which is fully implemented in the headerPaul Lemire2021-06-021-1/+1
| | | | | | | | This otherwise leads to inconsistent dll linkage warnigns on windows. Change-Id: I4f32f2fd2cc45939187535b8232172b280df7316 Pick-to: 6.1 6.0 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Replace all implicit container move and clear by an explicit functionPaul Lemire2021-02-241-1/+2
| | | | | | | | | | | | | We are likely relying on the fact that most implementations of containers clear the moved from container when calling std::move. That being said this behavior is likely implementation/platform dependent and could bite us at some later point. This patch introduces a moveAndClear function that does the move and an explicit clear and use it in all appropriate places. Change-Id: I8081d09907e17e287741fa952269af22df4dcf5f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix MSVC warning about inconsistent DLL linkage of QAnimationClipData ↵Friedemann Kleint2021-01-291-4/+4
| | | | | | | | operator==/!= Pick-to: 6.0 Change-Id: I8e63400ca2b2d6d7963b8ea6f111e6e9026f1278 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Enable compiling non-QML API against Qt 5.15Mike Krus2021-01-051-1/+1
| | | | | | | | | | | | Built with QtQuick disabled. - C++17 required - minor issues with QList vs QVector - QMutexLocker templated vs not - moc forward declaration handling Change-Id: I5540625e74e2c009e528f56203e4b88be8d54599 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Restore use of QVector in private APIMike Krus2021-01-0527-150/+148
| | | | | | | | Facilitates building against Qt 5.15. Will migrate to std::vector over time. Change-Id: I5db14c9ea95b38e4b2d596d7397fef76f6baf118 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Doc: Fix documentation warningsTopi Reinio2020-11-251-2/+2
| | | | | | | Pick-to: 6.0 6.0.0 Fixes: QTBUG-88842 Change-Id: Ie8ea1914c5e740c0c4bf25f4754a008aff6401cd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Handle fallout from QEvent loosing it's copy constructorMike Krus2020-11-231-0/+1
| | | | | | | | Task-number: QTBUG-88757 Change-Id: I5097faecd2e895d4685a4cc57a4e2a5c079f2255 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit d826238b65b0ebd8034900224b382bd85e6add27) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix deprecated API usage and compile warningsMike Krus2020-11-2010-50/+51
| | | | | | | | | - QVariant::Type deprecated, use QMetaType related APIs - QNodeId not used as reference in for loops (nop but really noisy) - some unused code Change-Id: I291219207fcd1ad0bf89533b4e2bb5fa47a353bb Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Replace old Q_DECL statements with modern C++Allan Sandfeld Jensen2020-11-028-70/+70
| | | | | | | | Since we have long depended on C++11 now, all of these can go. Change-Id: I8808af2cd5ce192864c636b521dadd7de189563b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Avoid multiple animation updatesMike Krus2020-10-161-3/+6
| | | | | | | | | Check that the handle is not already in the lists. Avoids doing the same updates several times in the Pick-to: 5.15 Change-Id: I385b150de23a2ae7f2274c7d7350a065bb0c34f5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use internal CMake APIMike Krus2020-10-071-1/+1
| | | | | | Task-number: QTBUG-86815 Change-Id: I7a8755571c8977be1f16b2287e5a8055e9016ee5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix animation not runningMike Krus2020-09-253-21/+21
| | | | | | | | Previous fix for compile issue forgot to account for the fact that the data changes after being registered with the class. Change-Id: Ice5238221f190f758ec3f25d883c56877c185e1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* evaluateClipAtLocalTime: prevent negative indices for keyframes lookupPaul Lemire2020-09-181-1/+1
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: I811c1a7334674d670f42eb46195e2e0e23b690f3 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix build with latest QtBase and QtDeclarativeMike Krus2020-09-071-1/+1
| | | | | | Task-number: QTBUG-86410 Change-Id: I26427d65de72c86f952b076259979f90eaef87f4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix compilation with newer qtbaseFabian Kosmale2020-08-251-0/+1
| | | | | Change-Id: Iaba2780c2ac28181cce15ae350fadd755a51999f Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* Fix build to change in typeof QList::size()Mike Krus2020-07-172-2/+6
| | | | | Change-Id: Ib480a8eef157102df8f89a75983cd4d8d46a9388 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use QList instead of QVector in implementation and docsJarek Kobus2020-07-0945-210/+203
| | | | | | | | | Fix some const correctness. Use list-initialization. Task-number: QTBUG-84469 Change-Id: I9c56742581f48f89a3b02e4121fae414117c7a25 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use QList instead of QVectorJarek Kobus2020-07-0718-62/+62
| | | | | | Task-number: QTBUG-84469 Change-Id: Ic726ce85e01190dbc64426388fd454c54ae3c3e3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QAspectJob: switch to using std::vectorPaul Lemire2020-07-024-5/+5
| | | | | Change-Id: I1314bd4d37ad17442ebd6287f571e41bc5d25490 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Animation Handler: assign iterator on erasePaul Lemire2020-06-301-3/+3
| | | | | | | Change-Id: Ia65be6befec3aa07080650ad82c59053b6d3670b Pick-to: 5.15 Pick-to: 5.12 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-241-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I2e126d0be8efa0aa89c4a91a681b549f38c8cec4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix handling of SSE/AVX sourceMike Krus2020-06-171-2/+5
| | | | | | | | | | | | | | | | QtBase has macro to enable SSE handling on specific source files. But Qt3D has some classes which use those specific instruction set in headers, so any file that includes those should also have the right command line options. This adds the right command line arguments to the 3DCorePrivate target so that anything that depends on that will have the right options. 3DCore is fine because it knows about the special headers files which were tagged. Change-Id: Ia061750121fb2ab5c93600c08a5464179ca2c228 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix animation cmake projectsMike Krus2020-06-051-1/+1
| | | | | Change-Id: If2a92b254ea7bb227f2fc608d93937de7088d805 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add support for building with CMakeMike Krus2020-05-221-0/+88
| | | | | Change-Id: If6c887c6356a160a5f3fb906d38a341fff0c7b29 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix build for Qt6Mike Krus2020-05-065-10/+6
| | | | | | | | | | | | | - updated dependencies, excluding qtgamepad for now - fixed issues with Q_PROPERTY not supporting forward declarations - fixed for changes in QtQuick private API - fixed for changes in QtOpenGLVersionFunctions API - fixed for removal of QT_OPENGL_ES* macros - fixed for changes in QtConcurrent API - fixed RHI based build Change-Id: I42ccd2f101b7f0a78e2860c6d551722bf6710a11 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.15' into devMike Krus2020-04-2712-37/+46
|\ | | | | | | Change-Id: Id669d5c1aab29965eac0dabd1cb497e908dac23e
| * Merge remote-tracking branch 'origin/5.14' into 5.15Antti Määttä2020-04-211-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h src/plugins/renderers/opengl/renderer/renderer.cpp src/render/backend/attachmentpack_p.h src/render/frontend/qrenderaspect.cpp src/render/picking/qabstractraycaster.cpp tests/manual/manual.pro Change-Id: I617b7e34bf7e11b2921bfc15e1b99c3e81891ec7
| | * Check we remove a valid node when removing from node propertiesPaul Lemire2020-02-101-1/+2
| | | | | | | | | | | | | | | Change-Id: Ibcc4d9bfd9d0a9d7697151915f24a6eecc149f6d Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Animations: fix race condition on running clip animators vectorPaul Lemire2020-04-201-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Was caused by incorrect dependencies on the jobs. Introduced a clearDependencies on QAspectJobPrivate to clear all dependencies as removeDepencies(emptyVector) only removes null dependencies. Change-Id: I8119a9edaf841db6c5ab2a971dc5640da2192cba Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Animation: remove unused m_drityChannelMapper vectorPaul Lemire2020-04-142-4/+0
| | | | | | | | | | | | | | | | | | | | | Avoids wasting time adding to it given it's not used. Change-Id: I7a3f30a7d56cb34bb60c79661aee0061c0dcb577 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Animations: prevent FindRunningClipAnimatorJob from running every framePaul Lemire2020-04-146-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The job it does takes a fair amount of time and only needs to run occasionally. We would reset the normalized time on the backend node every frame which then lead to a dirty set being set when synching again with the frontend. This might not have happened every frame prior to the synching refactorings. However currently, after every animation step, the dirty set would be reset and the job scheduled to run again even though nothing had really changed. This patch fixes that by setting the normalized time on the backend node prior to the synching with the frontend. That way, when we sync with the frontend the values are either identical when playing the animation unless the user really has changed the normalizedTime value. Change-Id: Iade4e7bfd47d34ef083d8e3398180a71630c0c81 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Properly stop running animations when using a negative playratePaul Lemire2020-03-304-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | When reaching a normalized time of 0 they would otherwise continue to run Change-Id: Idaea755d3a12f9c9da9c25732c2221e9b3f9f4c7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Add QBackendNode::syncFromFrontEnd to public APIMike Krus2020-02-273-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Removes need to per aspect overrides of QAbstractAspectPrivate::syncDirtyFrontEndNode which was required in Qt5 to preserve BC. Change-Id: Ib3b05af1c3ded1c985d35e4dec0fe203cdc907cb Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Geometry refactoringMike Krus2020-02-278-53/+53
| | | | | | | | | | | | | | | | | | | | | Move QBuffer, QAttribute, QGeometry to Qt3DCore. Change-Id: I59dfd091eefadcada93350b3aba955f40b304385 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 5.15 into devMike Krus2020-02-171-4/+12
|\| | | | | | | | | | | Change-Id: I2777f6a40b9029ef5569a84e04f9e18a914504e7
| * | Animations: handle colors as vec3 or vec4Paul Lemire2020-02-121-4/+12
| | | | | | | | | | | | | | | Change-Id: If450816fadce4adad4881938ecaea9c4000afe16 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Remove custom deprecation macroPaul Lemire2020-02-121-1/+0
| | | | | | | | | | | | | | | Change-Id: If9fdd63d58b2f9d41dc3a6c99d1dde2245506d15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Remove deprecated classes and functionsPaul Lemire2020-02-1147-828/+31
|/ / | | | | | | | | | | | | Mostly old messaging API Change-Id: I17eb2206b2ede56d2f7d36375d5e711d6149019f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove QtGui module path from OpenGL related pathsMike Krus2020-02-061-1/+1
| | | | | | | | | | | | | | | | Many are moving to opengl module in qt6, will make merging easier. Change-Id: I0ad08510e6999a5d887d9197fe2cb0dc21919fb9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix deprecation handlingMike Krus2020-01-141-0/+1
| | | | | | | | | | | | Change-Id: If981333f7a3d78028d4f08c59867453d4192b955 Task-number: QTBUG-81058 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix usages of text stream operatorsAlexandru Croitor2019-12-064-17/+17
| | | | | | | | | | | | Change-Id: I8f3fe9475749f10f33c8eb750befa8845ccc37d6 (cherry picked from commit 58db7d01e0d424fdf46baa70e2e41b8009429c78) Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Revert "Fix post FF API changes"Mike Krus2019-12-031-10/+10
| | | | | | | | | | | | | | 84766ed9098f10efc53e4e43a75eef38fce7fbf6 Change-Id: I12341ec1b7bc68a7586c6671aa7b8f21caed17e0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>