summaryrefslogtreecommitdiffstats
path: root/src/animation/frontend
Commit message (Collapse)AuthorAgeFilesLines
...
* Doc: Fix documentation warnings related to Clang QDoc parserTopi Reinio2018-04-205-36/+10
| | | | | | | | | | | | | | | | | | | | | Since Qt 5.11, QDoc uses Clang to parse C++ documentation. Clang requires a module header, as well as proper include paths, to build a precompiled header and process the sources. To do this, add a custom module header that pulls in all Qt 3D modules - this way, we can continue using a single documentation project to covers all of Qt 3D. Fix all documentation warnings are caused by missing namespaces, QML module/type names and typos, as well as a number of linking problems and other minor issues. After this change, the remaining documentation issues consist of 'No documentation for ...' warnings. Task-number: QTBUG-67790 Change-Id: I38b91163c475a00cc1893e793240470c5409eb57 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Either fully qualify property types, or not at allVolker Krause2018-03-063-4/+4
| | | | | | | | | The semi-qualified types confuse the meta type system, QAbstractAnimation in particular, as that also exists as a top-level type. Change-Id: If20387fe76d46f88f6a89523d5d3f4aac8b1fef0 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Merge remote-tracking branch 'origin/5.10' into 5.11Sean Harmer2018-02-153-2/+28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/doc/src/qt3danimation-module.qdoc src/render/backend/abstractrenderer_p.h src/render/backend/buffervisitor_p.h src/render/backend/renderer.cpp src/render/backend/renderer_p.h src/render/backend/triangleboundingvolume_p.h src/render/backend/trianglesextractor_p.h src/render/frontend/sphere_p.h src/render/jobs/calcboundingvolumejob.cpp src/render/jobs/job_common_p.h src/render/jobs/pickboundingvolumejob.cpp src/render/jobs/pickboundingvolumejob_p.h src/render/jobs/pickboundingvolumeutils.cpp src/render/jobs/renderviewjobutils_p.h tests/auto/render/boundingsphere/tst_boundingsphere.cpp tests/auto/render/commons/testrenderer.h tests/auto/render/raycasting/tst_raycasting.cpp tests/auto/render/render.pro tests/auto/render/renderer/tst_renderer.cpp Change-Id: I76633bc5a5a065e5f9ea62cc16563377e5c693a3
| * Doc: add doc to undocumented methods and properties qt3dNico Vertriest2018-02-063-2/+28
| | | | | | | | | | | | Change-Id: Ia498dd96a6d35997a3f493f26b376fb8fa146196 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge branch '5.10' into devSean Harmer2018-01-261-7/+28
|\| | | | | | | Change-Id: I4728b29c349a16867951a781c9417054c798e04a
| * Doc: add doc to undocumented methods in qt3dNico Vertriest2018-01-241-7/+28
| | | | | | | | | | Change-Id: Icde8db3bb95f0275d820f5e0effa01ac2033134b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add normalizedTime function to blendedlclip animatorsChristian Strømme2018-01-232-6/+9
| | | | | | | | | | Change-Id: I19c1907371d9d131295558eb19c297d544ebef7d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for setting a time index in the ClipAnimatorChristian Strømme2018-01-234-0/+33
| | | | | | | | | | | | | | | | | | This makes it possible to seek the animation clip to a specific position in the time-line. The index is a real value between 0 and 1, where 0.0 is the start of the clip and 1.0 is at the end of the clip Change-Id: Ic8c57d04e4f1e0a7628713e057b5b8a41a400c5a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge branch '5.10' into devSean Harmer2018-01-174-7/+7
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I248aa369ba98659a61e563fd29cc811c76ea1e2d
| * Use strict const iteratorsMike Krus2018-01-133-6/+6
| | | | | | | | | | | | | | Found with clazy-strict-iterators Change-Id: Iaf4d70668e0374e87769ec4d9bade29d1d0eeee5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Merge branch '5.9' into 5.10Sean Harmer2018-01-121-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/animation/backend/handle_types_p.h src/extras/defaults/qtexturematerial.h src/render/backend/entity_p.h src/render/backend/handle_types_p.h src/render/backend/renderview.cpp src/render/io/scenemanager.cpp Change-Id: Ic145062cc98360e9067fd60f0992c7a6b51e41bb
| | * qanimationgroup.h: Fix include of Qt classFriedemann Kleint2017-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Amends 91d4985e7b597457d024e67c64fe136c550c23fd. Task-number: PYSIDE-487 Change-Id: I8689241bb1899f2af9c449a7c51bfc3927d68a48 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLaszlo Agocs2017-12-134-14/+15
|\| | | | | | | | | | | Change-Id: Ib51c8311ce78b2fec62dd0c09cb943a85a7d0b2b
| * | Move animation callback handling to QAbstractClipAnimatorChristian Stromme2017-12-014-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that triggers the callbacks on the GUI thread should be the used for all clip animators, and not just the QClipAnimator. This change also fixes the scene change event handler to call the parent implementation for all events not handled by the clip animator, so it doesn't silently drops all events not handled explicitly. Change-Id: I0b1f57f362f2dc2e82e05d432426cc46d4a100ae Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2017-11-209-70/+343
|\| | | | | | | | | | | Change-Id: Ia6496e1ea22f2393a28e37cdd9f6e34f7613db49
| * | Split animation callback handling into its own frontend classSean Harmer2017-11-168-69/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This keeps things consistent between the 3 mapping types: * Regular properties * Callbacks * Skeletons The ChannelMapping backend node handles all 3 frontend types. Change-Id: I824aeb25aa69d96f20d844e7d953c68567829321 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Fix warnings caused by QClipAnimator calling QNode::sceneChangeEventAndy Nichols2017-11-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling the base implementation of sceneChangeEvent unnecessarily can cause lots of warnings to be printed: "sceneChangeEvent should have been subclassed" To prevent this (and still work around the bug this line intended to fix) a conditional has been added to make sure that we do not hit the warning condition. Change-Id: Ibaa771b4b58d6f4e38ba815bde1b635ed83867d2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2017-11-132-0/+7
|\| | | | | | | | | | | Change-Id: I2d373d538df3a65ac2d41238e5c6a214a151be68
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-311-0/+6
| |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/render/backend/renderview.cpp src/render/backend/renderview_p.h Change-Id: I6c1122632f2c481da31a63e3abd42b760d1ff211
| | * Doc: Add doc for undocumented methodsNico Vertriest2017-10-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | qanimationclip.h:56: warning: No documentation for Qt3DAnimation::QAnimationClip::clipData Change-Id: Ic44c96d47d3dff095b6b299f5280f21345dba452 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * | Fix setting running property when animators finishSean Harmer2017-10-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We need to call the base class handler so that the generic code in QNode can process the call to update the running property. Change-Id: I7fa3c051f47c2a41c5620f1a72f309192d5ea907 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-10-052-0/+3
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/animation/backend/channelmapper_p.h Change-Id: I4e0f59c6648925ba45d30ccc2405524a9e901a0e
| * | Update the local poses of the skeleton in the animation aspectSean Harmer2017-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present it is still needlessly, and incorrectly, updating the transforms of joints for which we have no animation data by using a default value of 0 for each component. This causes the joints to be scaled to 0 which is not particularly useful. We should only update joints for which we have valid animation data and leave the other joints alone. For a skeleton this will be OK as we have the initial set of local poses available. For regular QNode properties, the animator/mapper will need to take a snapshot of the current property value when the animation is started so that we can fill in the missing values when generating property changes. This should also be fixed on the 5.9 branch. Change-Id: Ib8f28c55cdfbca3f335777028f72250641092fc9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Fix clock sync for the blendedclipanimatorJuan José Casafranca2017-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | The clockId was not being sent to the backend as part of the change Change-Id: Ibaa57ec1853b5ec29942f027b68565d87838761e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-2512-13/+13
|/ / | | | | | | | | Change-Id: I92c955068e233c50043ad7d06a32300dd386c24d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Extend QChannel and Channel to support jointIndex membersSean Harmer2017-09-022-0/+14
| | | | | | | | | | | | | | Needed for animartion aspect support of skeletons. Change-Id: I89027a62ffcac68318ef8c8645b4720e71ff1697 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Mirror QSkeletonMapping properties to ChannelMapping backend nodeSean Harmer2017-09-021-0/+1
| | | | | | | | | | Change-Id: Idb6aa59ae65351d8aa8bca31dd68a350bcb46973 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add QSkeletonMapping to Qt3DAnimationSean Harmer2017-09-024-1/+281
| | | | | | | | | | | | | | Allows to easily map animation channels onto a target QAbstractSkeleton. Change-Id: I53c348fe19e00f7b57653f5525b67920319f83d6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Create backend nodes for any QAbstractChannelMapping subclassSean Harmer2017-09-028-6/+270
| | | | | | | | | | | | | | | | | | | | Introduces a new creation change type to distinguish between the frontend node triggering the creation. Following commits will add the new channel mapping types and populate the backend node appropriately. Change-Id: I09b3cbcd3d716c9e9c18873066b9f282222ab783 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge dev into 5.10Frederik Gladhorn2017-09-021-1/+1
|\ \ | | | | | | | | | Change-Id: I1bef655947a7176f7931c7f1b8ed4c4176395451
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-09-011-1/+1
| |\| | | | | | | | | | Change-Id: Ic4220f9957266c374f751d3612c60b81e9cea193
| | * Doc: add doc to undocumented methods/propertiesNico Vertriest2017-08-281-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: I8967110b0237421299c2103f847a38e0526f9a6b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Alter QChannelMapping to accept QAbstractChannelMapping pointersSean Harmer2017-08-313-9/+9
| | | | | | | | | | | | | | | | | | | | | In preparation for the new mapping subclasses. Change-Id: I3d659b350da72cca9f5ad195f7aa7fea3d943810 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Introduce QAbstractChannelMappingSean Harmer2017-08-317-9/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will act as the base class for the various specific use cases: * QChannelMapping for mapping to ordinary QNode properties * QSkeletonMapping for mapping to indexed joints in a skeleton * QCallbackMapping for calling a callback in response to an animation The last two of these are yet to be added. The final one is currently part of QChannelMapping but will be separated from it. All 3 types can map to the same type ChannelMapping backend node. Change-Id: Iaeeba0919628d8da4479b8569d3b10d9b5faccf4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add Skeleton backend node to the animation aspectSean Harmer2017-08-301-0/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The animation aspect can already animate any property of a QNode subclass. However, the render aspect allows to render a skinned mesh utilising a QSkeletonLoader that does not create the corresponding frontend QJoint objects (subclasses of QNode). Some skeletons can be large (10's or 100's of joints) so this is a good memory conserving optimization. The consequence of not creating the frontend joints however, is that without the QNodes to address, we cannot animate their local poses. To combat this without giving up on the above optimization we add a backend node for QAbstractSkeleton to the animation aspect. This node contains a vector of local poses for the joints in the same order as the render aspect creates and flattens the joint hierarchy in (see the vector of JointInfo in the SkeletonData in the render aspect). The animation aspect can then use this special knowledge to efficiently animate the joints of a skeleton and each frame, inform the render aspect backend of the new set of local pose transformations, prior to the render aspect calculating the skinning matrix palette and supplying that to the armature component for rendering. This will require the animation aspect to be able to map channels in an animation onto the joint indices of the skeleton backend nodes. By default, they will be applied to matching indices in the vector of local poses. However, an optional name property will be allowed in the animation clip channels to permit re-mapping of animation clips to similar skeletons (i.e. allow animations to be reused between different skeletons where they share some joint names). This will be done in follow up commits. Change-Id: I81ad258f59bb0ddd6a49456840c860783f6fb340 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge branch '5.9' into devSean Harmer2017-08-193-8/+6
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderview.cpp src/render/graphicshelpers/graphicscontext_p.h src/render/graphicshelpers/graphicshelperes2_p.h src/render/graphicshelpers/graphicshelpergl2_p.h src/render/graphicshelpers/graphicshelpergl3_2_p.h src/render/graphicshelpers/graphicshelpergl3_3_p.h src/render/graphicshelpers/graphicshelpergl4_p.h src/render/graphicshelpers/graphicshelperinterface_p.h src/render/jobs/pickboundingvolumejob.cpp tests/auto/animation/clipanimator/tst_clipanimator.cpp tests/auto/auto.pro tests/manual/manual.pro Also disabled the QQmlMetaType codepaths following commit 49a11e882059ee1729f776722e085dd21d378c36 in qtdeclarative. The QQmlMetaType codepaths will be re-enabled once a qt5.git integration has succeeded. Change-Id: Ia654d75425e6d406c472d19864383612208cad2b
| * Doc: correct declaration qml propertiesNico Vertriest2017-08-113-8/+6
| | | | | | | | | | | | | | | | | | | | qadditiveclipblend.cpp:173: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode baseClip qadditiveclipblend.cpp:191: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode additiveClip qblendedclipanimator.cpp:276: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode blendTree qclipanimator.cpp:124: warning: Unrecognizable QML module/component qualifier for AbstractAnimationClip clip Change-Id: Ic761f75986e41dc4ec7ab9e97e6776e49498f870 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Fix Qt3DAnimation::Animation::Clock::playbackRateChip Collier2017-08-023-33/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a small bug, removes unused properties from the clock node (`startTime`) and changes the type of the `playbackRate` property from `float` to `double` to match the rest of the animation aspect. QClockPrivate is no longer responsible for emitting the playbackRateChanged signal. Tests updated to account for this. [ChangeLog][Qt3DAnimation][Bugfix] The backend node (`Qt3DAnimation::Animation::Clock`) had an incorrect return type specified (`int` instead of `float`) which was narrowing the actual value during the evaluation of associated animation clips. Change-Id: I53ec78ba289cafcd2055582bee23ff1fc3481317 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add clock property to QAbstractClipAnimatorChip Collier2017-07-245-1/+41
| | | | | | | | | | | | | | | | | | Introduces "clock" property to QAbstractClipAnimator and updates associated tests. Updated backend animator nodes and associated evaluation jobs. Change-Id: Id18cabdd710b9b7253772642f21f63043d316a42 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add QClock to Qt3DAnimationChip Collier2017-07-244-2/+271
| | | | | | | | | | | | | | | | | | | | | | Clocks are to be used the animation aspect to allow an application to vary animation clip playback rates. [ChangeLog][Qt3DAnimation][General] Introduce the QClock frontend and backend nodes. Change-Id: Ib73e76800deda07c2fd793d2e3eb3f8a6ee5becb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devAndy Nichols2017-07-114-22/+15
|\| | | | | | | Change-Id: I4ceccd338a937a2ada231f568ed02c7a87bd6e80
| * Doc: link errorsNico Vertriest2017-06-201-1/+1
| | | | | | | | | | | | | | | | | | qclipanimator.cpp:55: warning: Can't link to AbstractAnimationClip qparameter.cpp:47: warning: Can't link to 'Texture' qclipanimator.cpp:55: warning: Can't link to 'ChannelMapper' Change-Id: I84d8de99d5cfdc390b4e33fdae5882d60842b519 Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Doc: correct \property statementsNico Vertriest2017-06-202-2/+2
| | | | | | | | | | | | | | | | qblendedclipanimator.cpp:276: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode blendTree qclipanimator.cpp:124: warning: Unrecognizable QML module/component qualifier for AbstractAnimationClip clip Change-Id: Ia1b43f1089ad9d4c8079084c4b2d29e487a55b8a Reviewed-by: Martin Smith <martin.smith@qt.io>
| * Doc: correct \property and \qmlproperty statementsNico Vertriest2017-06-192-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | functionrangefinder.cpp:54: warning: Invalid syntax in '\fn' qabstractclipanimator.cpp:127: warning: Unrecognizable QML module/component qualifier for bool running qabstractclipanimator.cpp:168: warning: Unrecognizable QML module/component qualifier for int loops qadditiveclipblend.cpp:173: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode baseClip qadditiveclipblend.cpp:191: warning: Unrecognizable QML module/component qualifier for AbstractClipBlendNode additiveClip qabstractclipanimator.h:62: warning: No documentation for Qt3DAnimation::QAbstractClipAnimator::Loops Change-Id: Iab2686f55149a6998eac81ca0aab991b815b12d9 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Add support for animation callbacksLaszlo Agocs2017-06-239-2/+291
|/ | | | | | | | Let QChannelMapping optionally specify a callback, which then gets invoked either directly on a worker thread or the gui thread. Change-Id: I871776f47cc921ceb254f9dc1a7b89ae5c5618d8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: typo in definition qmltypeNico Vertriest2017-06-161-1/+1
| | | | | | | QAbsractClipAnimator --> QAbstractClipAnimator Change-Id: Iad454a48f22741e9c22e0539981a7e0b1c74c1dd Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix mix up regarding QVariant::isNull() and isValid()Laszlo Agocs2017-06-161-2/+2
| | | | | | | | | Needs isValid() to check for a default constructed QVariant with no underlying type yet. Using isNull() was a mistake since it will be true for many default constructed types (0.0f, QVector3D(0), etc.) Change-Id: I1c7ac10bbb0732a40b67e7dbf61ae5d4185ebac2 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Pick the right type for QVariant channel targetsLaszlo Agocs2017-06-141-0/+9
| | | | | | | | | | | | | | | Animating a Parameter node would be impossible otherwise since the 'value' property is a QVariant so QChannelMapping has no chance of know what really is expected there. If a value is already set, we can automatically determine the QVariant's underlying type. If not, show a warning since we have no chance then. Start handling QMetaType::Float as well since a QVariant will ofen contain this, not a Double. Change-Id: I0ba2abbb2c8d85f2aa1a152ed4b8c6cd26f1fc97 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: add basic doc to undocumented classesNico Vertriest2017-06-093-0/+17
| | | | | Change-Id: Ib67712bd961a3e0b113ddd25feaa819695e792b9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix container detachments detected by clazySergio Martins2017-05-262-2/+3
| | | | | Change-Id: I551073c386247215f1c51dce92e5f05b5d335cc0 Reviewed-by: Mike Krus <mike.krus@kdab.com>