summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Do not add fragOutput for custom materialsv2.4.0-beta2v2.4.0-beta1Antti Määttä2019-05-242-2/+8
| | | | | | | | | Also do not require users to leave the main function open for custom shaders. Task-number: QT3DS-3544 Change-Id: I81a8969bb39d6716746b3172402bd9150461df67 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Update example UIPs versionsMahmoud Badri2019-05-176-6/+6
| | | | | | Task-number: QT3DS-3366 Change-Id: Ifcd328051eaf594a801db77497eca2482713469d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Support alpha channel on color propertiesMahmoud Badri2019-05-023-16/+8
| | | | | | | | | | Layer backgrounds are to use the alpha channel. This is also implemented in the editor (and RT1). Also update the VignetteEffect.effect to work correctly with the vec4 vegnette color and removed 3 duplicated test checks. Change-Id: I709629855f3172d65f359525e90cd5c91000f548 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix EOS logic in the animatorChristian Strømme2019-03-201-0/+43
| | | | | | | | | | | | | The logic was broken and in some cases we would not detect that we reached the end e.g, when the local time was equal to the duration, in this case we ended up in a no-op situation and the slide state would not change and the timeChangeCallback would never be called, which meant that visibility wasn't updated as expected. Fixes: QT3DS-3080 Change-Id: Ic6dcfd08ef13a18b769cf5eea3113ec31b776d95 Reviewed-by: Janne Kangas <janne.kangas@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add revision to delayed loadingAntti Määttä2019-03-121-1/+1
| | | | | Change-Id: I37575940d36e4af6f5c22655fe051d2f2ad83fbc Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Add manual test for dynamic slide resource loadingAntti Määttä2019-03-1215-1/+491
| | | | | Change-Id: If546d18a2dc0bc2f60c5f703b108c081ef8e89b0 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Update MetaData.xmlv2.3.0-beta2Miikka Heikkinen2019-03-011-1/+1
| | | | | | | | | Materials no longer have name property, the default value is obtained from MaterialBase. Changed the property parsing logic accordingly. Change-Id: I40653eeefcbeb1c4e293b75b328ebc4a66f2b2de Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add variant filteringPasi Keränen2019-02-0614-6/+519
| | | | | | | | | | | Add variant filtering to loading of presentations. [ChangeLog][QtStudio3D][Support for variants] Qt 3D Studio runtime now supports loading presentations containing variant tags. Task-number: QT3DS-2662 Change-Id: Id5637d23f5e9d178b8c40a3bb7c8b8950297548f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add functionality to disable individual tracksChristian Strømme2019-01-281-0/+38
| | | | | | | | | This is needed to avoid evaluating tracks on the master slide that's been disabled by a property change on the child slide. Fixes: QT3DS-2331 Change-Id: I0da7f293ecf6690b56da6ab3f61235b2458cf824 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix and simplify the visibility updateChristian Strømme2019-01-281-9/+63
| | | | | | | | | Components should, once created, handle the visibility of it's own objects instead of having a hybrid solution where it's sometimes handled by the parent. Change-Id: I5f4c95dce2573da821a0498c7c40f6cdff9b245d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Enable vertex shaders in custom materialsJere Tuliniemi2019-01-156-0/+104
| | | | | | | | | | | | | | | | | | If <VertexShader> tags in custom material contain a main function, use the shaders provided as is. The shader generator adds } to the end of the fully custom fragment shaders so I left that also to the vertex shader generation. Custom attributes can be provided with a user-generated .mesh file. The test scene has a sphere with the normal attr_pos and a sphere with an attr_pos2 instead. "simple-pos.material" expects an attr_pos vertex attribute and "simple-pos2.material" an attr_pos2. Task-number: QT3DS-2026 Change-Id: I2c0cd1c079f9c741900f119aefd2e3515d42f36d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add support for dynamically adding/removing object from a slideChristian Strømme2019-01-091-1/+10
| | | | | | | | | | This change adds support for adding objects at run-time in the new animation system. Note that this is now done in-place and requires no rebuilding of the animation track for the slide, which means objects with animations will start immediately at the right place. Change-Id: I987aa1aeaa272f3506310304b5543bd6f9547d39 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Change default animation systemChristian Strømme2019-01-092-20/+8
| | | | | | | | | | The dragon wings animation system is now the one being used by default. Enabling the old animation system can be done by setting the environment variable Q3DS_NO_DRAGONWINGS or by setting the option --no-dragon-wings when starting the viewer. Change-Id: Ieb920e2bb2cea61f460ec175e7fee06821403903 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/2.2'Laszlo Agocs2018-12-131-0/+165
|\ | | | | | | Change-Id: I8977367f3742088a51b0308496de8816e407b0c2
| * Fix dynamic keyframesChristian Strømme2018-11-261-0/+165
| | | | | | | | | | | | | | | | | | | | Don't generate dynamic kf on first entry to a slide, since there are no "from" values yet. Task-number: QT3DS-2209 Change-Id: Ib4e59968d9099b77ea6d11f1b627b77cad194a23 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | DragonsWingsChristian Strømme2018-12-105-13/+13
|/ | | | | | | | | | This adds the basis for the dragon wings animation system, which is a light weight animator that works directly with the qt3ds' graph objects. To enable it pass --dragon-wings to the viewer or set the env variable DRAGONWINGS. Change-Id: I4403b1ac5f8c96a62993fa2043af9c611be64abb Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Make manylayersinquick example a manual test for nowLaszlo Agocs2018-11-167-1/+309
| | | | | | | Will not productize this in 2.2. Change-Id: I6be378671efba1e99f289955a230ac95bdc91a8d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix unlinked properties not being applied when there are no tracksChristian Strømme2018-11-071-0/+60
| | | | | | | | | | | Notifying property changes was delayed until the track starts, but if there's no tracks this will never happen, so instead we now delay the calls until the slide animator (always present) is first called, which happens even if the slide is initially paused. Task-number: QT3DS-2596 Change-Id: I3fd49977b90ac370680446ecbfc7b3301130de34 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Revert "Improve state handling"Christian Strømme2018-11-062-224/+227
| | | | | | | | | | | This commit is introducing to many regressions at this point, so the best option is to revert it now and re-apply once the remaining issue are resolved. This reverts commit 55b43d3e1c3a100f4ad41d94c132afd2a0d029b3. Change-Id: If2733c506aa64a242a4605d81d69f66e2f7aae41 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix dynamic keyframe regressionLaszlo Agocs2018-10-311-0/+56
| | | | | | | | | | | | | Adding the dummy first/last keyframes should be postponed until after the first keyframe is updated by the dynamic keyframe logic. Add also the test scene from the report: clicking the rectangle should only start moving after 2 seconds (assuming you click fast enough after opening the scene) Task-number: QT3DS-2577 Change-Id: If768179c8aafd541798af21d397e1e93164354db Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Improve state handlingChristian Strømme2018-10-292-227/+224
| | | | | | | | | | | | | | | | | | | | This is an attempt to clean up and make the state changes more sane, i.e., by trying do everything once and in the right order. There are still ugliness in this code, but it should be more easily to follow now, aided by extra inline commentary. This change should also improve some of the flickering seen in some examples when changing slides, as we try avoid re-setting stuff when we don't need to. Since time updates for the new slide is deferred until the first time callback, some of the test needed to be changed to their QTRY_* version. Also, there's now a clear distinction between stopped and paused, where paused means the slides progress is stopped at time t, as expected and stopped means the slides values and state is reset to it's initial state. Task-number: QT3DS-1866 Change-Id: I7a9b61ee3ad4a976e0e8d4de386704dcf0d526bf Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Support stereoscopic renderingKaj Grönholm2018-10-241-2/+2
| | | | | | | | | | | | | This patch provides stereoscopic rendering support for Qt Studio qt3d-runtime. Contains API to switch between stereo modes (mono, top-bottom, left-right, analyph red-cyan & green-magenta) and to control eye (camera) separation. Adds menu into Q3DSViewer for these. Task-number: QT3DS-1023 Change-Id: I3da3d34606a07178978eba83236ca6cb6360e893 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Bring View3D and Studio3DProfiler back as publicLaszlo Agocs2018-10-129-495/+2
| | | | | | | This reverts commit 0752ab7e7b7c3d2e5daa6023c4ea93c84b8e45ec. Change-Id: Ie2f71e19a8a05fd1d2554934a9dba235dca9933c Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Generate prop.changes from custom mesh updates as wellLaszlo Agocs2018-10-031-2/+2
| | | | | | | | | | | | | The scene manager must get a notification saying that something has changed in the geometry of a given model (so it can dirty appropriately). Therefore the standard notifyPropertyChange({ ...}) model has to be used for the updateCustomMeshBuffer functions as well. This avoids not updating the content in the 'standalone' test when trying to change geometry after all animations have finished. Change-Id: If9d8a8fa3c69147206803b790f0ea4ec1e59ec72 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/2.1'Christian Strømme2018-09-219-0/+241
|\ | | | | | | Change-Id: I5339cbc7f52608a7bfce10360ed20ba344b9c736
| * Fix getStartAndEndTime()Christian Strømme2018-09-172-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Take into consideration that a layer on the master slide that doesn't get a property change on a child slide, still has an implicit endTime. Note that this change also contains some textual description of how the function works and some recommendations for future optimizations. The optimizations are left out for now, as they are considered nice to have, but are not critical in any way. Change-Id: I592061f7911489a8130d0374afb10e6213332a67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix visibility updates for slides without animation tracksChristian Strømme2018-09-171-0/+38
| | | | | | | | | | | | | | | | | | | | | | If there's no animations the nodes won't be marked as dirty, as they are not expected to be changing, but there's at least one exception and that's when the start and end time are not the same as the start and end time of the slide. Task-number: QT3DS-2022 Change-Id: I4cc634c224d41028d5401f28b1b6d9fe348e2f02 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| * Fix for certain ignored set-property actionsLaszlo Agocs2018-09-131-0/+37
| | | | | | | | | | | | Task-number: QT3DS-2325 Change-Id: Ia57d5b34be87c46dcd029ce3289d3436f8e643f2 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * Add test scene for nested subpresentationsLaszlo Agocs2018-09-125-0/+127
| | | | | | | | | | Change-Id: I47eb82ac17017c969c8e34eb1f7a5d33a4a09fc9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Add some new types and an example using the QML APIsChristian Strømme2018-09-205-1/+225
|/ | | | | | | | Contains some basic types for getting the ball rolling, and isn't very usable outside that. Change-Id: Ib4c186e26d7bd142a9fe51bd74ea54a7bf5fd691 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Quick fix for animations getting out of syncChristian Strømme2018-09-071-0/+64
| | | | | | | | | | | | A clip on Qt3D's side gets its duration calculated from the first and last keyframe position, so to make sure we don't end up with animation clips that are shorter then the expected duration, we now insert extra keyframs at the start and end of each clip if needed. This should ensure that the clips are more or less in sync, as expected. Taks-number: QT3DS-2183 Change-Id: Idd2715ede6c8bb2698ed9ea9e2262703cc28866d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't use dynamic values when entering the first slideChristian Strømme2018-09-071-0/+54
| | | | | | | | | | | When entering the first slide there's no previous values available, so the initial default value was used. Instead of applying these values we should just skip updating the dynamic values when there's no previous slide. Task-number: QT3DS-2209 Change-Id: I5b8d184c3c27d37758259a0585948a7be9580aff Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Change origin for Right and Bottom calculationsLaszlo Agocs2018-09-071-0/+53
| | | | | | | | | | Right and Bottom are pixels or percentage from the right or bottom side of the output. Until now we treated them as values with the top-left as the origin. Correct this to stay compatible with 3DS1. Task-number: QT3DS-2200 Change-Id: I5ffa1444f2e5b545ff194c4b418c0536765393e9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Handle Layer.sourcepath changesLaszlo Agocs2018-09-0310-0/+224
| | | | | | | | | ...but only for layers that start out as subpresentations. Changing back and forth between "normal" and subpresentation layers is not supported. Change-Id: Id160f3efee12bd7b1a950635e738a47bc9d890b6 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Fix and test Variant type in data inputLaszlo Agocs2018-08-292-0/+77
| | | | | Change-Id: I7308dad6039fe99751793d70a32d5bc4b0cb003d Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Support Float as a data input typeLaszlo Agocs2018-08-294-1/+86
| | | | | | | Float is equivalent to RangedNumber with no min and max specified. Change-Id: I6d7feaec660034f40a41d59547580a87710bcda0 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Mark View3D and Studio3DProfiler as internal for nowLaszlo Agocs2018-08-239-0/+493
| | | | | | | | | | Also move the example to tests/manual. Hide all public references to these types for now. They are fully usable of course. To be re-enabled in a later release. Change-Id: Ib7f6a53eed131280307821e1f63ddac9856e33fe Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add Object3D tests covering object orderingLaszlo Agocs2018-08-171-0/+104
| | | | | | | | | ...and fix a small glitch that prevented objects being detached from the parent when m_layer was null (because the object was never attached to a live Layer3D). Change-Id: I2479d255aa150bae085d845dd36061b4ffbf19a9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add Object3D infraLaszlo Agocs2018-08-1710-1/+576
| | | | | | | | | | | | | Use Group (and Node) to crystalize the concepts. Fix also some issues in Studio3DEngine. Also changes the pureqml example to a manual test since Studio3DEngine and friends are marked as internal for now, so shipping examples for them along with the regular examples is not desirable yet. Change-Id: I8ab0ad50d1b846cadb6927fcb38afe9dff576c2e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Fix eyeball changes when changing slidesChristian Strømme2018-08-161-0/+52
| | | | | | | | | | | | When changing slides, always reset to eyeball value to "true" for all objects on the master slide, as the value will be set to false by the current slides property change if needed, or else the eyeball value is implicitly true. Task-number: QT3DS-2084 Change-Id: Ie7906d642edda2ff7bd1e8850cdb0ed0ce5c7eb5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Don't restart components on the master slide when changing slidesChristian Strømme2018-08-142-0/+100
| | | | | | | | Components on the master slide should not be restarted when changing slides. Task-number: QT3DS-2052 Change-Id: I986e0ad713b7f979d6899a8ef80032d93e371656 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix effect orderLaszlo Agocs2018-08-102-0/+102
| | | | | | | | | | | Object order in the scene graph is front to back (like with Layer). When building the effect chain for rendering (which is back to front by nature) the effect list must be iterated in reverse order. (just like the compositor does for layers) Task-number: QT3DS-2053 Change-Id: I0ef82fe678330f9863a08f0411638f216dbef5f4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add support for QImage in Q3DSImageLaszlo Agocs2018-08-071-0/+59
| | | | | | | Also fixes changing the filename in the sourcepath property of an Image. Change-Id: Ie805cc288ecda96cdf126ec1d611aa863cb82c48 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* standalone test: Change a const to static constLaszlo Agocs2018-08-061-1/+1
| | | | | | | | | ...to avoid lambda capture trouble: some compilers require stride to be listed in the capture list, while others show a warning saying it is unnecessary. Change-Id: I67a3b2be51b6cfb3df76494f00791c6151d34497 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add flags to Q3DSEffect and check for ReliesOnTimeLaszlo Agocs2018-08-033-0/+118
| | | | | | | Task-number: QT3DS-2025 Task-number: QT3DS-2023 Change-Id: Icd8e5190b078cd78ee13525c522097d94fe45ded Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make effects dynamically spawnable, destroyable, and changeableLaszlo Agocs2018-08-021-2/+2
| | | | | | | | | | | | | | | Also makes it possible to use filenames in effects', custom materials' and behaviors' "class" property. Previously this could only contain an id referring to an entry in the Classes section of the uip document. With programatically constructed scenes the pre-loaded list of effect/material/behavior descriptions is not used. Instead the instances refer directly to filenames (the loaded data is cached like with meshes). Custom materials and behaviors do not yet support changing their "class" at runtime, although they get many of the enablers. Change-Id: I560ab00b9dc447bd19d5ebeb749972873b89ec2c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Allow changing eyeball for effect and behavior via the Q_PROPERTYLaszlo Agocs2018-08-021-2/+2
| | | | | | | | Like Node does. Also add the missing property for effect, for consistency (not that these are used anywhere yet). Change-Id: I8e3e5a0e527cb4e4ea7feca52ec42fe104379c6a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Introduce custom geometries in Q3DSModelNodeLaszlo Agocs2018-08-011-0/+92
| | | | | | | | | | | Instead of setting a the mesh' source path, one can now also call setCustomMesh with the plain and lightweight object describing the geometry. This will lead to changing sourcepath to #Custom and the engine will generate Qt 3D buffers and geometries from the provided data instead of any file or built-in primitive. Change-Id: I685a20275f99b051190a523bb996f606af5a8182 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove a now-unneeded resolveReferences callLaszlo Agocs2018-07-302-1/+4
| | | | | | | | | | | There is now a resolveReferences call in the scenemanager whenever building a scene. Also, add a note in the autotests since there it is still important to have an explicit call. Change-Id: I26d720411c6980c65eb60bbe680cbb10ce8c9cbe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add a fully standalone C++ manual testLaszlo Agocs2018-07-303-0/+167
| | | | | | | | Complete with acting upon clicking an object and dynamically spawning new objects. Change-Id: Id2df79c011196f38cc6a3738bfb2c207c8638deb Reviewed-by: Andy Nichols <andy.nichols@qt.io>