summaryrefslogtreecommitdiffstats
path: root/editorlib/src/editorscene.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change editor save format from QML to JSON + QGLTF when supportedMiikka Heikkinen2016-12-161-3/+36
| | | | | Change-Id: If2bf099b5e77b3350ee5670e968cfa9a96d563b2 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Add option to GLTF export selected entity instead of whole sceneMiikka Heikkinen2016-11-101-2/+5
| | | | | Change-Id: I1526c1cc17722eb1f4745b0ffd69fecdc6c9c9dd Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* New export GLTF dialogMiikka Heikkinen2016-11-081-11/+15
| | | | | | | Allows setting export options and more intuitive scene name handling. Change-Id: Iad586760bcdb83ae24ef3118139fb20aac1a56d1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add ability to export the scene as a GLTF sceneMiikka Heikkinen2016-11-041-0/+61
| | | | | | | | | | This functionality requires GLTF exporter plugin support from Qt3D, which isn't yet available. Therefore it is ifdeffed out by default. Uncomment the relevant define in editorlib.pro to enable. Change-Id: Iad26d12cbb40c5ca366d98cd26e51786f21803fb Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Enable dragging via helper arrowsMiikka Heikkinen2016-09-151-19/+87
| | | | | | | Also added local/global helper arrow toggle. Change-Id: I48552e06388ccc14a530acb8f719efa5c4fbfa0b Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add a simple way to move and orient camera to six main axis pointsMiikka Heikkinen2016-09-141-0/+41
| | | | | | | | The selection affects the active camera, whether it is the freeview or a scene camera. Change-Id: I605696208443b5cf889e65c17d5e31fb28008ace Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix drag-translate offset from helper plane for off-center meshesMiikka Heikkinen2016-09-141-1/+1
| | | | | Change-Id: I56e59cd5f5c41c8e19d94e8b90d33d63d5e217d7 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Display world coordinates of the mouse cursor on toolbarMiikka Heikkinen2016-09-091-2/+44
| | | | | | | | | If not drag scaling/rotating/translating an entity, shows the coordinate on helper plane. When dragging, shows the drag handle coordinate. Change-Id: I50fd226bfb323d0d4ed4df24efc61aacb98c4fd2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Add local axes visualization for currently selected objectMiikka Heikkinen2016-09-071-5/+63
| | | | | Change-Id: Ib6e66c94630e662e5e2affedd17fc929643b72b9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fixed spotlight and directionallight mesh rotation after loadTomi Korpipää2016-06-211-0/+2
| | | | | | Change-Id: I25be94346fce967bea2e506d7a26d1c1bfe4aca6 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Properly update group selection box in various undo/redo situationsMiikka Heikkinen2016-06-201-2/+25
| | | | | Change-Id: I1e950465c4e0fb0e2dd79d6eed5047266fd525d2 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Don't display context menu after dragging camera aroundMiikka Heikkinen2016-06-201-3/+2
| | | | | Change-Id: I3d71fb094b5ab315add4f8d125cc69ebe6fc5b46 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Hide center line when drag handles are disabledMiikka Heikkinen2016-06-201-1/+2
| | | | | Change-Id: I09a2efc4fc0f4f2f6d58a290ee7c982be468ca92 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix crash at new sceneMiikka Heikkinen2016-06-201-6/+8
| | | | | Change-Id: Ibb3cc1444b66c56bf8142a07d0b6911ddbcbc7d8 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Fix index corruption related to entity removalMiikka Heikkinen2016-06-201-39/+95
| | | | | | | | | | | The main problem was the selection that was done when the selected entity was removed. Now we change the selection asynchronously in that case, which ensures the selection model on the qml side won't try to access invalid indexes. Change-Id: Ieaf984eed5c74a5d3b595aeb04d23e26f66a0db9 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Changed camera model to a custom mesh and enabled triangle pickingMiikka Heikkinen2016-06-161-8/+9
| | | | | | Change-Id: Ic12506a8ca2419a521dd2e88ce47d9db78c9cf2a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Added missing includeMiikka Heikkinen2016-06-161-0/+2
| | | | | Change-Id: I2bf2522704d56a5756b44ea8926c651d18c54275 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Change selection box colorMiikka Heikkinen2016-06-161-6/+9
| | | | | | Change-Id: Id95b10fb81b0c21b77d374c6f4dafd739b675496 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Changed snap to grid to snap corners to the grid.Miikka Heikkinen2016-06-161-65/+135
| | | | | | | | | Mouse modifier keys ctrl and alt can now also be stacked on translate and scale. Change-Id: I5252b9d98482e7ea9ff7244e1a51239d68dbdf31 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fixed scene saving in linuxTomi Korpipää2016-06-151-1/+7
| | | | | | Change-Id: Id20bcdee1253648cf482caa273018d8448199de1 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Multiselect refactoringMiikka Heikkinen2016-06-141-121/+152
| | | | | | | | | Now store multiselection status and list on c++ side only to reduce problems from keeping them properly synchronized. Change-Id: If3277bb1eca5ffc7a7749e300e0cc6de4ccf9df2 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Duplicate under the same parent, not always under scene rootTomi Korpipää2016-06-141-1/+1
| | | | | | Change-Id: I6d29568d6c3f4cd5966012b5853182317f4ae884 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Hide camera frustum if the last camera is deletedTomi Korpipää2016-06-141-0/+6
| | | | | Change-Id: I39ae97e2529193d1753713277968ff0a7953c474 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Update translationsTitta Heikkala2016-06-131-0/+1
| | | | | | | | Updated strings for unsaved changes dialogs. Also updated sentence case for Finnish. Change-Id: Iaae2918f6544937eea7291ecfbf109e4a0395a4d Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fix drag translating of camera that was broken by recent changesMiikka Heikkinen2016-06-131-9/+16
| | | | | Change-Id: I2b90fc69eb493c954528d9659c485db3aa7257c3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Change group box to always tightly contain group contentsMiikka Heikkinen2016-06-101-10/+76
| | | | | | | | | | Added drag handle for actual group/mesh translation point for groups/meshes that are not centered around their translation point. For additional clarity, added a line between the selection box translation handle and group/mesh translation point handle. Change-Id: I25146a68472f3f1b3703cbbcc1a60464d4c87260 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fixed selection handle updates after Qt3D signaling changeTomi Korpipää2016-06-101-7/+14
| | | | | | Change-Id: I311523afb31ca3afcdfe4516d286db1fca20bf63 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Fixed group selection context menuTomi Korpipää2016-06-091-2/+1
| | | | | | Change-Id: I159df3add5a3bf4f6e6f46df65db573d3181e553 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Group box changed to encompass all grouped entitiesMiikka Heikkinen2016-06-081-3/+22
| | | | | | | | | | Related changes also included: - When grouping items, the new group will be centered to items - Fixes to missing drag handles on group box and extra selection boxes after multiselection. Change-Id: I323324d674021a5487fed0953bea67012cb73abf Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Update translationsTitta Heikkala2016-06-071-0/+1
| | | | | | | | Translation files updated. Default language set in EditorScene. Change-Id: Icd94f739f39a1b4f2334ff12dbf6db562fb51b7f Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Support for copy, cut and paste in 3D viewTomi Korpipää2016-06-071-0/+24
| | | | | | Change-Id: Ifb8ef79820aa5d25c25354ddcf6c3056777753f3 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Fix selection box and drag scaling for off-center custom meshesMiikka Heikkinen2016-06-061-3/+6
| | | | | | Change-Id: Ic122846cdc7e82166a46e5846665f9fdf19821b5 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Fix drag handle positioning after active camera changeMiikka Heikkinen2016-06-031-1/+5
| | | | | Change-Id: I4e5c14a3e1bf415751911fb088d4e856cd2902f4 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fix various drag handle visibility issuesMiikka Heikkinen2016-06-031-9/+12
| | | | | | | | | | | | - Entity insert drag entity no longer remains visible if drag is canceled by alt-tabbing out of the editor while cursor is over the 3D viewport - Selection box drag handles no longer show through entity library - Selection box drag handles no longer show up if the box is behind the camera Change-Id: I3f4e7f4953e1526622579f743abae2336d317337 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Make drag handles partially transparent when not dragging/hovered overMiikka Heikkinen2016-06-031-0/+2
| | | | | | Change-Id: I9e830e84084fd8fc92843fac6cf25c5601da348f Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Fix rotate handle position relative to selection box cornerMiikka Heikkinen2016-06-031-18/+28
| | | | | | Change-Id: I49b3d4983414ff574b708a401ef2a71fbf40a2e3 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Anchor the opposite corner when drag-scalingMiikka Heikkinen2016-06-031-11/+27
| | | | | | Change-Id: Ifb6f3bb4882cc55104ccd6bce7ae1667e041708d Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Changes to drag handle functionalityMiikka Heikkinen2016-06-021-77/+95
| | | | | | | | | | | - Added scale handle to every corner - Added proper icon for rotate handle - Rotate handle doesn't change corners while drag-rotating - Rotate handle is always positioned to upper right corner of the selection box as seen on screen. Change-Id: Iddb3684b4824a95613e9e91eeb522d9647d2282a Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* Fixes crash when loading scenesTomi Korpipää2016-06-021-3/+5
| | | | | Change-Id: I81c08727d9c28e7512e5b5a00a10777cf0cb8666 Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
* Added highlighting multiselected entitiesTomi Korpipää2016-06-011-4/+28
| | | | | | Change-Id: Iaa6b85851afd21b6c004e82fc8ba360ef0f8fece Reviewed-by: Titta Heikkala <titta.heikkala@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Multiselection support in tree viewTomi Korpipää2016-05-311-32/+43
| | | | | Change-Id: Ic8ff4247465be9ef8418c798922bc9517ae2b296 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Multiselection support in 3D viewTomi Korpipää2016-05-301-7/+61
| | | | | Change-Id: Ib3fd173fcb0858f492b33250c6fa6dd09700397e Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
* Refactor editor to support launching it from creator pluginMiikka Heikkinen2016-05-301-0/+2286
Editor functionality is moved into a library, which is used from both a new standalone application and a creator plugin. Currently creator plugin just launches the editor in a separate window. Change-Id: Ia549d43e8b3d282ea5f96ad0cf661cf3b53aadfc Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>