Commit Graph

28 Commits (ba76d304dc8f425473f176e631312b1421b761ec)

Author SHA1 Message Date
Tom Hulton-Harrop dd0f21b460
Fix incorrect icon rendering (#6454)
* fix incorrect icon rendering

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add redundant parens

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add tests for icon display fixes

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update references to EditorVisibleEntityDataCache to EditorVisibleEntityDataCacheInterface

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates following review feedback and remaining updates for EditorVisibleEntityDataCacheInterface

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop d065eb9498
Initial improvements to fix viewport icon selection and draw order (#6284)
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add additional comment about z value

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* move manual sorting and some small tidy-up

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update comment

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates following initial round of PR feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* additional changes to support tests for entity icon intersection

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add support to enable/disable icons separately from helpers

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* final tests added and small tidy-up to display EntityId correctly

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update some manipulator test framework calls after utility functions were moved

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix for implicit cast

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* move icon scale values to AZ_CVARS

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix failing tests caught in AR and update some naming conventions for tests

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update naming convention for members of ProjectedViewportRay

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update other references to ProjectedViewportRay

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update more references to ProjectedViewportRay change

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update menus for python tests

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop 6908a3e945
Update intersect behavior for positioning entities in the viewport (#5906)
* update intersect behavior for positioning entities in the viewport and restore SurfaceManipulator

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* tests for surface manipulator from EditorTransformComponentSelection

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update comments in tests and remove #pragma optimize('', off)@

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add new file for FindClosestPickIntersection tests

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add remaining tests for surface manipulator and snap fixes

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* some small updates and polish before PR

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* small updates following PR feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop ea0afae502
Fix for how viewport icons highlight (accent) when sticky select is disabled (#5833)
* fix for how viewport icons highlight when sticky select is disabled

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* naming - update highlight to accent

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Tom Hulton-Harrop e34ea3bcaa
Fixes for viewport selection issues (#5494)
* improvements to editor selection in the viewport

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix issue with being able to select icons that are not showing for entities inside entity containers

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* update comment after review feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to viewport picking code to simplify the api

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add test to replicate near clip intersection issue

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* small tidy-up changes

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to how we perform world to screen and screen to world calculations, added test coverage and some tidy-up

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add some more tests for ViewportInteractionImpl

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* minor tweaks before PR feedback

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix typo in fix

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* fix for manipulator test framework tests

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* updates to RPI::View and RenderPipeline after review feedback from VickyAtAZ

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add constexpr to ScreenPoint, ScreenVector and ScreenSize initializing constructors

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* add PrintTo functions for Screen* types

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* downgrade error to warning temporarily

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* check incoming view is null

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>

* remove pragma optimize off

Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
4 years ago
Danilo Aimini 8d67f184c8
LYN-7008 | Focus Mode - Selection unit tests (#4357)
* Refactor existing tests and fixtures, split them up in more granular tests, and add more comments.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Refactor test fixture for FocusMode to make it more reusable

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Fixture rename, draft of selection test

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Split SetFocus and ClearFocus tests for Editor Focus Mode

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Move BoundsTestComponent to its own file so that it can be reused in Focus Mode Selection tests

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Making progress on selection test. Test compiles now, but selection doesn't seem to be working.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Removed commented out code from previous iteration.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Move BoundsTestComponent under the UnitTest namespace

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Viewport selection tests + minor fixes.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>

* Minor fixes

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
4 years ago
jonawals fa47b35580
Call sites for activating/deactivating viewport editor modes. (#4265)
* Provisional impl and testing of central state tracker.

Signed-off-by: John <jonawals@amazon.com>

* Add missing namespace comment.

Signed-off-by: John <jonawals@amazon.com>

* ViewportEditorModeState -> ViewportEditorModes

Signed-off-by: John <jonawals@amazon.com>

* ViewportEditorModesTracker -> ViewportEditorModeTracker

Signed-off-by: John <jonawals@amazon.com>

* GetEditorModeState ->GetViewportEditorModes

Signed-off-by: John <jonawals@amazon.com>

* GetNumTrackedViewports -> GetTrackedViewportCount

Signed-off-by: John <jonawals@amazon.com>

* IsViewportStateBeingTracked -> IsViewportModeTracked

Signed-off-by: John <jonawals@amazon.com>

* Fix API comments.

Signed-off-by: John <jonawals@amazon.com>

* Delete hangover file.

Signed-off-by: John <jonawals@amazon.com>

* Delete more hangover files.

Signed-off-by: John <jonawals@amazon.com>

* Minor member name refactor.

Signed-off-by: John <jonawals@amazon.com>

* Refactor nonclemanture.

Signed-off-by: John <jonawals@amazon.com>

* Rename Enter/ExitMode to Register/UnregisterMode.

Signed-off-by: John <jonawals@amazon.com>

* Error and warning msgs now return AZ::Outcomes.

Signed-off-by: John <jonawals@amazon.com>

* Change all nomenclature to Activate/Deactivate for consistency.

Signed-off-by: John <jonawals@amazon.com>

* Change tense of notification bus methods.

Signed-off-by: John <jonawals@amazon.com>

* Fix malformed string format.

Signed-off-by: John <jonawals@amazon.com>

* Fix malformed string format (again).

Signed-off-by: John <jonawals@amazon.com>

* Fix Linux warning.

Signed-off-by: John <jonawals@amazon.com>

* Call sites for editor mode activate/deactivate.

Signed-off-by: John <jonawals@amazon.com>

* Move Component editor mode logic to ComponentModeCollection.

Signed-off-by: John <jonawals@amazon.com>

* Delete non-source data.

Signed-off-by: John <jonawals@amazon.com>

* Remove line breaks and forward declare class.

Signed-off-by: John <jonawals@amazon.com>

* Remove constructors without ViewportEditorModeTrackerInterface ptr.

Signed-off-by: John <jonawals@amazon.com>

* Add integration tests for viewport editor modes.

Signed-off-by: John <jonawals@amazon.com>

* Address PR comments.

Signed-off-by: John <jonawals@amazon.com>
4 years ago
hultonha 7da866e81a
Update to how entity space is treated in the viewport (#4263)
* first pass fixes for how entity space is handled in the viewport interaction model

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* small updates to simplify space handling

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* fix for influence group with one entity selected

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some tidy-up and fix for scale manipulator snapping

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* couple of small fixes for scale manipulator

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* small comment update

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* fixes for integration test failures

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add test for rotation manipulator

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add test coverage for rotation manipulators

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add tests for translation manipulators and some other tidy-up changes

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add tests for translating a group of entities

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add some tests for scale manipulators

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some updates and formatting changes (clang-format) to ViewportScreen

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* simplify usage of lround code

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update missed name updates

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update usage of WorldToScreenNdc

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates following review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some more small tidy-up changes

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* move static variables to be marked inline

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* small formatting fixes

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha de9a27597b
Additional test support for Manipulator Ditto commands (#4191)
* additional test support for manipulator ditto

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* tidy-up to changes

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* fix for non-unity build compile error

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 7e85b1512a
Expose sticky select option to the SettingsRegistry and disable by default (#4149)
* expose sticky select option to the SettingsRegistry

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update missed callsites after API change to Manipulator Test Framework

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates following review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 52095e3e16
Ensure undo/redo operation for change entity selection is atomic (#4122) 4 years ago
hultonha 9d2352c3b7
Update the viewport interaction model to support single click select (#4094)
* add support for single click select

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove redundant profile macro

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates following review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* fix behaviour for fallthrough to match previous code

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha 7a58b72f15
Add remaining integration tests for viewport selection (box select) (#4075)
* updates to viewport box select tests

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add interface for querying keyboard modifiers

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove redundant casts

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update formatting options for trace functions in ActionDispatcher

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* remove redundant GetKeyboardModifiers call

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update how trace/log functions have been fixed to output during tests

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
hultonha d82b2a0608
Initial test coverage for viewport selection before introducing new 'single' select functionality (#3987)
* WIP changes for viewport single select and better integration tests

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update test to verify single click selection in the viewport

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* temporarily remove changes for single select

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* temporarily remove ChangeSelectedEntity call

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* initial tests to validate current viewport selection model

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* some tidy-up before publishing PR

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add reference to const type in loop

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* temporarily disable box select test

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
Esteban Papp 588d702e43 Code/Framework/AzToolsFramework
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 3522f622f3 more castings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
hultonha 659e486cd7
Add an integration test to validate pick mode crash (#2935)
* add an integration test to validate pick mode crash

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update to test after review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
hultonha 51733f3809
Fix for rotation matching and resetting also scaling the entity transform (#1856)
* fix issue with rotation matching (ditto)

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* fix for context menu appearing

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* minor tidy-up in EditorContextMenu

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* add option to disable cursor during free-look

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* small fixes after PR comments

Signed-off-by: hultonha <hultonha@amazon.co.uk>
5 years ago
Chris Galvan d7574777a8 Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Gene Walters 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
nvsickle e55580af57 Merge remote-tracking branch 'upstream/stabilization/2106' into nvsickle/MergeStabilizationJun18 5 years ago
Tom Hulton-Harrop 108b6f8e0c
Updates to ensure OnEntityTransformChanged is called correctly (LYN-2644) (#1405) 5 years ago
Tom Hulton-Harrop d9b1ccd323
Add align grid button to Viewport UI (#1311)
* first pass of adding grid snapping button

* update to request current grid size

* show/hide snapping option based on selection

* small tidy-up changes

* small updates following review feedback

* added some unit tests for snapping functionality and some small tidy-up/refactoring

* small refactor to ensure snap to grid ui only appears with snapping enabled

* add missing include to resolve build error

* fixes for build

* add & to make compiler happy
5 years ago
alexpete c2cbd430fe Integrating up through commit 90f050496 5 years ago
alexpete a10351f38d Initial commit 5 years ago