Commit Graph

68 Commits

Author SHA1 Message Date
Tom Hulton-Harrop 8ffd16b0be Ensure SnapToGrid only appears when GridSnapping is enabled LYN-2302 (#1362)
* updates to better support showing/hiding viewport ui when grid snapping is enabled/disabled

* connect up editor settings callbacks

* minor polish changes

* api rename

* updates following review feedback
2021-06-17 18:31:56 +01:00
Nicholas Van Sickle bfeb3e0ab9 Merge pull request #1306 from yuriy0/FullScreenGamePreview
Full screen game preview for Atom viewport
2021-06-16 08:40:29 -07:00
Yuriy Toporovskyy 7d1a12a14f Bug fix: crash after full screen preview due to dangling pointer 2021-06-15 18:33:44 -04:00
mnaumov 9ca0e731f4 Merge remote-tracking branch 'upstream/stabilization/2106' into mnaumov/StabilizationJun15
# Conflicts:
#	Code/CryEngine/CrySystem/LevelSystem/LevelSystem.cpp
2021-06-15 10:41:13 -07:00
rgba16f 0198f6121b Rebind the DebugDisplayRequestBus Instance to handle drawing in GameMode. (#1275) 2021-06-14 20:29:37 -05:00
Yuriy Toporovskyy 84492dee48 Address some PR feedback
- Use AZ::IConsole instead of deprecated Cry IConsole.
- Create fullscreen preview widget on the same screen where the main window is found, instead of on the 'primary' screen
- Remove "ed_previewGameInFullscreen", which had the effect of always doing a full screen preview. If this functionality is desired, it should be re-added as a registry key instead of a cvar
2021-06-14 16:19:37 -04:00
Yuriy Toporovskyy 37f70fb47c Address some PR feedback.
- Better variable names
- Close a parenthesis in a comment
- Check equality against nullptr instead of 0
- Add comment to document method of clearing a QLayout
- Format some things
- Const correctness
- Remove a TODO in a comment
- Attempt at removing concatenation of string literal AZ_FUNCTION_SIGNATURE, which might not be a literal on every compiler/platform
2021-06-14 12:08:55 -04:00
Yuriy Toporovskyy 73d5617af3 Full screen game preview for Atom viewport 2021-06-14 10:02:49 -04:00
Tom Hulton-Harrop 0f09a6d8bf Move new camera settings to the Settings Registry and connect them to viewport border elements (#1267)
* ensure the new camera respects changing ui values and move camera settings to the settings registry

* factor out creation of modular camera controller

* small updates before posting PR

* updates following review feedback

* updates following review feedback
2021-06-14 12:32:35 +01:00
hultonha 2d41a701af Merge branch 'stabilization/2106' into tomhh_stabilization-to-development 2021-06-11 09:43:11 +01:00
Tom Hulton-Harrop 1946561b8d Updates to Goto Position to work with the new camera system (#1212)
* add support for 'GoTo Position' to work with the new camera enabled

* small updates to move away from more legacy calls

* minor formatting change

* ensure values are converted from degrees to radians

* revert change to use Enumerate viewport call

* remove formatting changes from SandboxIntegration
2021-06-10 17:46:01 +01:00
Chris Galvan 45b2391303 [LYN-4390] Implemented EditorCameraRequestBus::GetActiveCameraState on the EditorViewportWidget so that the "Create camera entity from view" action works again. 2021-06-10 11:18:29 -05:00
Nicholas Van Sickle 30eedc1c55 Avoid more sources of camera update re-entrancy that can lead to stack overflow (#1136) 2021-06-03 20:09:15 -07:00
Tom Hulton-Harrop cf08f4dab1 Improve camera orbit behavior (#1060) 2021-06-03 15:48:44 +01:00
Nicholas Van Sickle 087677b326 Fix several viewport issues (#1045)
* Fix some FOV calculation viewport issues:
-Avoid calculating FOV if we've got an invalid viewport
-Don't override game mode FOV, let the active camera components manage it instead

* Fix viewport font positioning

This updates code in a few places to respect an API change/fix made to AtomFont - also switched the default value of m_virtual800x600ScreenSize to false as it's really behavior you want to opt into

* Don't activate CameraComponentController when in the Editor / not in game mode
2021-06-01 12:20:15 -07:00
Tom Hulton-Harrop 36ceff84c9 Support mesh intersection for camera orbit (#982)
* wip support for mesh intersection with intersector bus

* WIP camera mesh intersection orbit logic

* remove unneeded template argument

* add bus connect/disconnect

* fix intersection logic

* small updates, additional comments, some tidy-up

* update formatting options slightly

* use aznumeric_cast

* temp workaround for negative distances with RayIntersection
2021-05-28 14:37:17 +01:00
Tom Hulton-Harrop 50f5976e59 Rename and move ModernViewportCameraController (#866)
* rename ModernViewportCameraController to ModularViewportCameraController and move to AtomToolsFramework

* update names and includes after file moves
2021-05-25 17:28:51 +01:00
nvsickle 1654553e9c Merge remote-tracking branch 'upstream/main' into nvsickle/BootstrapFixes 2021-05-19 19:12:07 -07:00
nvsickle 8d4fb4d67d Fix dummy rendering pipeline being created for the Editor
-This ensures OnBootstrapSceneReady still fires even if the bootstrap system component doesn't create a default scene
-This also disables default scene creation for non-game projects by default to ease tools development

Tested with the Editor, AtomSampleViewer, the Material Editor, and the AtomTest launcher
2021-05-19 19:11:23 -07:00
hultonha bb05993355 add new orbit functionality for camrea 2021-05-17 18:25:13 +01:00
Tom Hulton-Harrop f4106fe73f Add 'Goto entity' support for the new Editor camera (#743)
* add find entity in viewport functionality to new camera

* fix AZ_CVAR usage

* updates following review feedback

- updated comment styles from /// to //!
- retrieve fov of camera (add test for fov access)

* update namespace naming, fix AZ_CVAR usage

* update missed namespace and use AZ::Transform::CreateLookAt

* add missing include

* move EditorViewportSettings to EditorLib

* update DLL import/export API and rename namespace usage
2021-05-17 18:21:38 +01:00
rgba16f d9ae94ee77 Merge remote-tracking branch 'upstream/main' into Atom/breja/FixDefaultDebugDrawId 2021-05-11 16:24:49 -05:00
rgba16f 85e4f0d65f Fix AzFramework::g_defaultSceneEntityDebugDisplayId not working for the AtomDebugDisplayViewportInstance 2021-05-11 16:24:28 -05:00
bosnichd 3defbce31b Remove legacy serialization and QPropertyTree (#684)
Remove:
- CryCommon/CryExtension/*
- CryCommon/Serialization/*
- Sandbox/Plugins/EditorCommon/QPropertyTree/*
- All related CryCommon interfaces
- All CrySystem implementations
- Various related Editor classes
2021-05-11 09:31:02 -06:00
Tom Hulton-Harrop b5e5a3bfee More camera fixes for the new CameraInput system (#667)
* use new ViewportContext interface to set camera transform on load

* WIP fixes for camera viewport handler callbacks

* disable synchonization with old camera when new camera system is enabled

* further updates to camera-input

* ensure event is signalled when camera transform is set

* updates to ModernViewportCameraController

* fix for right click menu appearing with camera

* updates following review feedback

* convert std:: usage to AZStd::
2021-05-11 13:38:09 +01:00
Tom Hulton-Harrop b2523217c3 Update snapping settings to be stored in the Settings Registry (#646)
* add overload to ActionManager to support capturing an AZStd::function

* move snapping settings to new settings registry

* remove unneeded reference in ViewportSettings

* move viewport setting function implementations to .cpp file

* add more sensible default values for snapping

* fix variable name for angle snapping

* remove const from function prototype value parameters

* add import/export api for free functions

* change from std::bind to a lambda

* remove redundant const for constexpr string_view

* add AZStd alias for std::abs
2021-05-10 18:40:32 +01:00
bosnichd 440c40e490 Remove (almost) all references to pRenderer (#651)
Remove all references to pRenderer, except from the DebugDraw and LyShine Gems that are still being updated.
2021-05-10 10:05:15 -06:00
Nicholas Van Sickle b026b6818b Merge pull request #483 from aws-lumberyard-dev/nvsickle/ViewportControllerAPI
Give MultiViewportControllerInstances a pointer to their parent
2021-05-07 13:53:50 -07:00
Tom Hulton-Harrop c5a06b8953 Restore grid and angle snapping (#640)
Restore grid and angle snapping (LYN-3367)
2021-05-07 17:21:12 +01:00
nvsickle 7c9053fffc Move ModernViewportCameraController controller list into EditorViewportWidget 2021-05-06 17:38:19 -07:00
Terry Michaels 01976a890c Removed wireframe from perspective menu and fixed crash on right click (#575) 2021-05-05 11:10:19 -05:00
bosnichd d7b796fd73 Remove I3DEngine CryCommon Interface (#567)
Delete:

- I3DEngine
- Missions
- Time of day
- GameEffectsSystem Gem
- ImageProcessing Gem
- SVOGI Gem
- Various other things that don't do anything now that the legacy renderer has been removed.
2021-05-05 09:07:28 -06:00
Tom Hulton-Harrop cec56d7b27 Merge pull request #546 from aws-lumberyard-dev/hultonha_LYN-2315_camera-phase-4
Camera Updates - Part 4
2021-05-05 09:46:56 +01:00
Olex Lozitskiy 790657f8c0 Merge pull request #526 from aws-lumberyard-dev/Atom/olexl/ATOM-15349
Deleted AzFramework::AtomActiveInterface
2021-05-04 13:44:04 -04:00
hultonha a206896074 remove QPoint from lower-level interfaces, switch to use AzFramework::ScreenPoint 2021-05-04 17:32:47 +01:00
Aristo7 4c47d7b587 Merged main in 2021-05-04 10:13:50 -05:00
hultonha 36d502b560 update controls for camera and move settings to cfg file 2021-05-04 14:06:10 +01:00
Aristo7 64d980bc03 Deleted AzFramework::AtomActiveInterface 2021-05-03 15:40:32 -05:00
hultonha c61c357541 Merge branch 'main' into hultonha_LYN-2315_camera-phase-2 2021-04-30 10:42:36 +01:00
AMZN-koppersr 5e4094b258 Revamped AzFramework::Scene (#332)
Updated AzFramework::Scene to allow it to serve as the one-stop location for localized singletons. Localized singletons in this case are instance that can only occur once in an environment but multiple times within an application. As an example, this allows settings up a single camera per viewport for instance.

Highlights of changes:

Replaced the original ebuses with interfaces and events for easy of use and performance.
Removed the Entity Context specific code and moved that to new locations within the Entity Context itself.
Allowed basic inheritance. If a subsystem isn't found in a scene the parent can optionally be searched.
Scenes can enter a zombie state and avoid immediately being deleted. This is needed for situations where subsystems can't be destroyed until async calls have been completed.
2021-04-29 08:50:48 -07:00
hultonha 1f7f771378 Merge branch 'main' into hultonha_LYN-2315_camera-phase-2 2021-04-29 14:32:57 +01:00
Chris Galvan 67e64f8a95 [LYN-3374] Removed Cry3DEngine checks in EditorViewportWidget that was preventing selection, correct camera position, and other issues in the viewport. 2021-04-28 12:53:10 -05:00
hultonha f24e3b2891 Merge branch 'main' into hultonha_LYN-2315_camera-phase-2 2021-04-28 17:29:24 +01:00
Chris Galvan 8e88d746a3 [LYN-3356] Replaced GetSelectedEntities + size() with new API. 2021-04-27 16:56:20 -05:00
hultonha 64e06c3010 more updates to camera code 2021-04-27 19:40:45 +01:00
Aaron Ruiz Mora 00fca9489c Fix editor crashing by protecting gEnv->g3DEngine 2021-04-27 14:52:10 +01:00
bosnichd e5b5067748 Change LOAD_LEGACY_RENDERER_FOR_EDITOR from true -> false (#315)
Change LOAD_LEGACY_RENDERER_FOR_EDITOR from true -> false, and added some null checks to protect against gEnv->pRenderer and gEnv->p3DEngine now being null in the editor as well as the launcher.
2021-04-26 13:15:32 -06:00
rgba16f bc40dd7e5e Merge remote-tracking branch 'upstream/main' into DisableAtomShim 2021-04-23 18:35:18 -05:00
nvsickle fb2ca8e02c Fix Editor crash in test teardown calling set_view_pane_layout
If Atom isn't initialized and able to produce a ViewportContext, the Editor would crash. This attempts to make the initialization fail a bit more gracefully and fixes the crash in the cases I've tested.
2021-04-23 00:26:09 -07:00
rgba16f 40a35b4e45 Merge remote-tracking branch 'upstream/main' into DisableAtomShim 2021-04-21 20:43:47 -05:00