Merge branch 'main' into jckand/FoundationAuto

This commit is contained in:
jckand-amzn
2021-05-10 10:08:28 -05:00
75 changed files with 3300 additions and 573 deletions
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Icons / Toolbar / Non Uniform Scaling</title>
<defs>
<rect id="path-1" x="3" y="3" width="18" height="18"></rect>
<mask id="mask-2" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="0" y="0" width="18" height="18" fill="white">
<use xlink:href="#path-1"></use>
</mask>
</defs>
<g id="Icons-/-Toolbar-/-Non-Uniform-Scaling" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Group">
<rect id="Icon-Background" x="0" y="0" width="24" height="24"></rect>
<g id="Group-3" transform="translate(4.644661, 5.000000)" fill="#65C98C">
<rect id="Rectangle" x="3.16582489" y="1.21320344" width="1.95262146" height="5"></rect>
<polygon id="Rectangle" points="4.14213562 -1.71418435e-13 8.28427125 4.14213562 -1.11910481e-13 4.14213562"></polygon>
</g>
<g id="Group-4" transform="translate(13.073593, 10.857864)" fill="#65C98C">
<g id="Group-2" transform="translate(0.000000, 0.000000)">
<rect id="Rectangle" x="0" y="3.16582489" width="4" height="1.95262146"></rect>
<polygon id="Rectangle" points="5.71320344 4.14213562 1.57106781 8.28427125 1.57106781 1.14575016e-13"></polygon>
</g>
</g>
<rect id="Rectangle" stroke="#65C98C" fill="#65C98C" x="3.5" y="12.5" width="8" height="8"></rect>
<use id="Rectangle" stroke="#65C98C" mask="url(#mask-2)" stroke-width="2" stroke-dasharray="1" xlink:href="#path-1"></use>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -27,6 +27,155 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsMain(object):
# It requires at least one test
def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
pass
@pytest.mark.test_case_id(
"C32078130", # Display Mapper
"C32078129", # Light
"C32078131", # Radius Weight Modifier
"C32078127", # PostFX Layer
"C32078125", # Physical Sky
"C32078115", # Global Skylight (IBL)
"C32078121", # Exposure Control
"C32078120", # Directional Light
"C32078119", # DepthOfField
"C32078118") # Decal (Atom)
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
cfg_args = [level]
expected_lines = [
# Decal (Atom) Component
"Decal (Atom) Entity successfully created",
"Decal (Atom)_test: Component added to the entity: True",
"Decal (Atom)_test: Component removed after UNDO: True",
"Decal (Atom)_test: Component added after REDO: True",
"Decal (Atom)_test: Entered game mode: True",
"Decal (Atom)_test: Exit game mode: True",
"Decal (Atom) Controller|Configuration|Material: SUCCESS",
"Decal (Atom)_test: Entity is hidden: True",
"Decal (Atom)_test: Entity is shown: True",
"Decal (Atom)_test: Entity deleted: True",
"Decal (Atom)_test: UNDO entity deletion works: True",
"Decal (Atom)_test: REDO entity deletion works: True",
# DepthOfField Component
"DepthOfField Entity successfully created",
"DepthOfField_test: Component added to the entity: True",
"DepthOfField_test: Component removed after UNDO: True",
"DepthOfField_test: Component added after REDO: True",
"DepthOfField_test: Entered game mode: True",
"DepthOfField_test: Exit game mode: True",
"DepthOfField_test: Entity disabled initially: True",
"DepthOfField_test: Entity enabled after adding required components: True",
"DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
"DepthOfField_test: Entity is hidden: True",
"DepthOfField_test: Entity is shown: True",
"DepthOfField_test: Entity deleted: True",
"DepthOfField_test: UNDO entity deletion works: True",
"DepthOfField_test: REDO entity deletion works: True",
# Exposure Control Component
"Exposure Control Entity successfully created",
"Exposure Control_test: Component added to the entity: True",
"Exposure Control_test: Component removed after UNDO: True",
"Exposure Control_test: Component added after REDO: True",
"Exposure Control_test: Entered game mode: True",
"Exposure Control_test: Exit game mode: True",
"Exposure Control_test: Entity disabled initially: True",
"Exposure Control_test: Entity enabled after adding required components: True",
"Exposure Control_test: Entity is hidden: True",
"Exposure Control_test: Entity is shown: True",
"Exposure Control_test: Entity deleted: True",
"Exposure Control_test: UNDO entity deletion works: True",
"Exposure Control_test: REDO entity deletion works: True",
# Global Skylight (IBL) Component
"Global Skylight (IBL) Entity successfully created",
"Global Skylight (IBL)_test: Component added to the entity: True",
"Global Skylight (IBL)_test: Component removed after UNDO: True",
"Global Skylight (IBL)_test: Component added after REDO: True",
"Global Skylight (IBL)_test: Entered game mode: True",
"Global Skylight (IBL)_test: Exit game mode: True",
"Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
"Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
"Global Skylight (IBL)_test: Entity is hidden: True",
"Global Skylight (IBL)_test: Entity is shown: True",
"Global Skylight (IBL)_test: Entity deleted: True",
"Global Skylight (IBL)_test: UNDO entity deletion works: True",
"Global Skylight (IBL)_test: REDO entity deletion works: True",
# Physical Sky Component
"Physical Sky Entity successfully created",
"Physical Sky component was added to entity",
"Entity has a Physical Sky component",
"Physical Sky_test: Component added to the entity: True",
"Physical Sky_test: Component removed after UNDO: True",
"Physical Sky_test: Component added after REDO: True",
"Physical Sky_test: Entered game mode: True",
"Physical Sky_test: Exit game mode: True",
"Physical Sky_test: Entity is hidden: True",
"Physical Sky_test: Entity is shown: True",
"Physical Sky_test: Entity deleted: True",
"Physical Sky_test: UNDO entity deletion works: True",
"Physical Sky_test: REDO entity deletion works: True",
# PostFX Layer Component
"PostFX Layer Entity successfully created",
"PostFX Layer_test: Component added to the entity: True",
"PostFX Layer_test: Component removed after UNDO: True",
"PostFX Layer_test: Component added after REDO: True",
"PostFX Layer_test: Entered game mode: True",
"PostFX Layer_test: Exit game mode: True",
"PostFX Layer_test: Entity is hidden: True",
"PostFX Layer_test: Entity is shown: True",
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
# Radius Weight Modifier Component
"Radius Weight Modifier Entity successfully created",
"Radius Weight Modifier_test: Component added to the entity: True",
"Radius Weight Modifier_test: Component removed after UNDO: True",
"Radius Weight Modifier_test: Component added after REDO: True",
"Radius Weight Modifier_test: Entered game mode: True",
"Radius Weight Modifier_test: Exit game mode: True",
"Radius Weight Modifier_test: Entity is hidden: True",
"Radius Weight Modifier_test: Entity is shown: True",
"Radius Weight Modifier_test: Entity deleted: True",
"Radius Weight Modifier_test: UNDO entity deletion works: True",
"Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
"Light_test: Component removed after UNDO: True",
"Light_test: Component added after REDO: True",
"Light_test: Entered game mode: True",
"Light_test: Exit game mode: True",
"Light_test: Entity is hidden: True",
"Light_test: Entity is shown: True",
"Light_test: Entity deleted: True",
"Light_test: UNDO entity deletion works: True",
"Light_test: REDO entity deletion works: True",
# Display Mapper Component
"Display Mapper Entity successfully created",
"Display Mapper_test: Component added to the entity: True",
"Display Mapper_test: Component removed after UNDO: True",
"Display Mapper_test: Component added after REDO: True",
"Display Mapper_test: Entered game mode: True",
"Display Mapper_test: Exit game mode: True",
"Display Mapper_test: Entity is hidden: True",
"Display Mapper_test: Entity is shown: True",
"Display Mapper_test: Entity deleted: True",
"Display Mapper_test: UNDO entity deletion works: True",
"Display Mapper_test: REDO entity deletion works: True",
]
unexpected_lines = [
"failed to open",
"Traceback (most recent call last):",
]
hydra.launch_and_validate_results(
request,
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
null_renderer=True,
cfg_args=cfg_args,
)
@@ -19,170 +19,6 @@ import pytest
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsSandbox(object):
@pytest.mark.test_case_id(
"C32078117", # Area Light
"C32078130", # Display Mapper
"C32078129", # Light
"C32078131", # Radius Weight Modifier
"C32078127", # PostFX Layer
"C32078126", # Point Light
"C32078125", # Physical Sky
"C32078115", # Global Skylight (IBL)
"C32078121", # Exposure Control
"C32078120", # Directional Light
"C32078119", # DepthOfField
"C32078118") # Decal
def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
cfg_args = [level]
expected_lines = [
# Decal Component
"Decal (Atom) Entity successfully created",
"Decal (Atom)_test: Component added to the entity: True",
"Decal (Atom)_test: Component removed after UNDO: True",
"Decal (Atom)_test: Component added after REDO: True",
"Decal (Atom)_test: Entered game mode: True",
"Decal (Atom)_test: Exit game mode: True",
"Decal (Atom) Controller|Configuration|Material: SUCCESS",
"Decal (Atom)_test: Entity is hidden: True",
"Decal (Atom)_test: Entity is shown: True",
"Decal (Atom)_test: Entity deleted: True",
"Decal (Atom)_test: UNDO entity deletion works: True",
"Decal (Atom)_test: REDO entity deletion works: True",
# DepthOfField Component
"DepthOfField Entity successfully created",
"DepthOfField_test: Component added to the entity: True",
"DepthOfField_test: Component removed after UNDO: True",
"DepthOfField_test: Component added after REDO: True",
"DepthOfField_test: Entered game mode: True",
"DepthOfField_test: Exit game mode: True",
"DepthOfField_test: Entity disabled initially: True",
"DepthOfField_test: Entity enabled after adding required components: True",
"DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
"DepthOfField_test: Entity is hidden: True",
"DepthOfField_test: Entity is shown: True",
"DepthOfField_test: Entity deleted: True",
"DepthOfField_test: UNDO entity deletion works: True",
"DepthOfField_test: REDO entity deletion works: True",
# Directional Light Component
"Directional Light Entity successfully created",
"Directional Light_test: Component added to the entity: True",
"Directional Light_test: Component removed after UNDO: True",
"Directional Light_test: Component added after REDO: True",
"Directional Light_test: Entered game mode: True",
"Directional Light_test: Exit game mode: True",
"Directional Light Controller|Configuration|Shadow|Camera: SUCCESS",
"Directional Light_test: Entity is hidden: True",
"Directional Light_test: Entity is shown: True",
"Directional Light_test: Entity deleted: True",
"Directional Light_test: UNDO entity deletion works: True",
"Directional Light_test: REDO entity deletion works: True",
# Exposure Control Component
"Exposure Control Entity successfully created",
"Exposure Control_test: Component added to the entity: True",
"Exposure Control_test: Component removed after UNDO: True",
"Exposure Control_test: Component added after REDO: True",
"Exposure Control_test: Entered game mode: True",
"Exposure Control_test: Exit game mode: True",
"Exposure Control_test: Entity disabled initially: True",
"Exposure Control_test: Entity enabled after adding required components: True",
"Exposure Control_test: Entity is hidden: True",
"Exposure Control_test: Entity is shown: True",
"Exposure Control_test: Entity deleted: True",
"Exposure Control_test: UNDO entity deletion works: True",
"Exposure Control_test: REDO entity deletion works: True",
# Global Skylight (IBL) Component
"Global Skylight (IBL) Entity successfully created",
"Global Skylight (IBL)_test: Component added to the entity: True",
"Global Skylight (IBL)_test: Component removed after UNDO: True",
"Global Skylight (IBL)_test: Component added after REDO: True",
"Global Skylight (IBL)_test: Entered game mode: True",
"Global Skylight (IBL)_test: Exit game mode: True",
"Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
"Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
"Global Skylight (IBL)_test: Entity is hidden: True",
"Global Skylight (IBL)_test: Entity is shown: True",
"Global Skylight (IBL)_test: Entity deleted: True",
"Global Skylight (IBL)_test: UNDO entity deletion works: True",
"Global Skylight (IBL)_test: REDO entity deletion works: True",
# Physical Sky Component
"Physical Sky Entity successfully created",
"Physical Sky component was added to entity",
"Entity has a Physical Sky component",
"Physical Sky_test: Component added to the entity: True",
"Physical Sky_test: Component removed after UNDO: True",
"Physical Sky_test: Component added after REDO: True",
"Physical Sky_test: Entered game mode: True",
"Physical Sky_test: Exit game mode: True",
"Physical Sky_test: Entity is hidden: True",
"Physical Sky_test: Entity is shown: True",
"Physical Sky_test: Entity deleted: True",
"Physical Sky_test: UNDO entity deletion works: True",
"Physical Sky_test: REDO entity deletion works: True",
# PostFX Layer Component
"PostFX Layer Entity successfully created",
"PostFX Layer_test: Component added to the entity: True",
"PostFX Layer_test: Component removed after UNDO: True",
"PostFX Layer_test: Component added after REDO: True",
"PostFX Layer_test: Entered game mode: True",
"PostFX Layer_test: Exit game mode: True",
"PostFX Layer_test: Entity is hidden: True",
"PostFX Layer_test: Entity is shown: True",
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
# Radius Weight Modifier Component
"Radius Weight Modifier Entity successfully created",
"Radius Weight Modifier_test: Component added to the entity: True",
"Radius Weight Modifier_test: Component removed after UNDO: True",
"Radius Weight Modifier_test: Component added after REDO: True",
"Radius Weight Modifier_test: Entered game mode: True",
"Radius Weight Modifier_test: Exit game mode: True",
"Radius Weight Modifier_test: Entity is hidden: True",
"Radius Weight Modifier_test: Entity is shown: True",
"Radius Weight Modifier_test: Entity deleted: True",
"Radius Weight Modifier_test: UNDO entity deletion works: True",
"Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
"Light_test: Component removed after UNDO: True",
"Light_test: Component added after REDO: True",
"Light_test: Entered game mode: True",
"Light_test: Exit game mode: True",
"Light_test: Entity is hidden: True",
"Light_test: Entity is shown: True",
"Light_test: Entity deleted: True",
"Light_test: UNDO entity deletion works: True",
"Light_test: REDO entity deletion works: True",
# Display Mapper Component
"Display Mapper Entity successfully created",
"Display Mapper_test: Component added to the entity: True",
"Display Mapper_test: Component removed after UNDO: True",
"Display Mapper_test: Component added after REDO: True",
"Display Mapper_test: Entered game mode: True",
"Display Mapper_test: Exit game mode: True",
"Display Mapper_test: Entity is hidden: True",
"Display Mapper_test: Entity is shown: True",
"Display Mapper_test: Entity deleted: True",
"Display Mapper_test: UNDO entity deletion works: True",
"Display Mapper_test: REDO entity deletion works: True",
]
unexpected_lines = [
"failed to open",
"Traceback (most recent call last):",
]
hydra.launch_and_validate_results(
request,
TEST_DIRECTORY,
editor,
"hydra_AtomEditorComponents_AddedToEntity.py",
timeout=EDITOR_TIMEOUT,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
null_renderer=True,
cfg_args=cfg_args,
)
# It requires at least one test
def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
pass
@@ -0,0 +1,112 @@
"""
All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
its licensors.
For complete copyright and license terms please see the LICENSE at the root of this
distribution (the "License"). All use of this software is governed by the License,
or, if provided, by the license below or the license accompanying this file. Do not
remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test Case Title: Event can return a value of set type successfully
"""
# fmt: off
class Tests():
level_created = ("Successfully created temporary level", "Failed to create temporary level")
entity_created = ("Successfully created test entity", "Failed to create test entity")
enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
lines_found = ("Successfully found expected message", "Failed to find expected message")
exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
# fmt: on
def ScriptEvents_ReturnSetType_Successfully():
"""
Summary: A temporary level is created with an Entity having ScriptCanvas component.
ScriptEvent(T92569006_ScriptEvent.scriptevents) is created with one Method that has a return value.
ScriptCanvas(T92569006_ScriptCanvas.scriptcanvas) is attached to Entity. Graph has Send node that sends the Method
of the ScriptEvent and prints the returned result ( On Entity Activated -> Send node -> Print) and Receive node is
set to return custom value ( Receive node -> Print).
Verify that the entity containing T92569006_ScriptCanvas.scriptcanvas should print the custom value set in both
Send and Receive nodes.
Expected Behavior:
After entering game mode, the graph on the entity should print an expected message to the console
Test Steps:
1) Create test level
2) Create test entity
3) Start Tracer
4) Enter Game Mode
5) Read for line
6) Exit Game Mode
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import os
from editor_entity_utils import EditorEntity as Entity
from utils import Report
from utils import TestHelper as helper
from utils import Tracer
import azlmbr.legacy.general as general
import azlmbr.asset as asset
import azlmbr.math as math
import azlmbr.bus as bus
LEVEL_NAME = "tmp_level"
WAIT_TIME = 3.0 # SECONDS
EXPECTED_LINES = ["T92569006_ScriptEvent_Sent", "T92569006_ScriptEvent_Received"]
SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92569006_ScriptCanvas.scriptcanvas")
def create_editor_entity(name, sc_asset):
entity = Entity.create_editor_entity(name)
sc_comp = entity.add_component("Script Canvas")
asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
Report.critical_result(Tests.entity_created, entity.id.isValid())
def locate_expected_lines(line_list: list):
found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
return all(line in found_lines for line in line_list)
# 1) Create temp level
general.idle_enable(True)
result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
Report.critical_result(Tests.level_created, result == 0)
helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
general.close_pane("Error Report")
# 2) Create test entity
create_editor_entity("TestEntity", SC_ASSET_PATH)
# 3) Start Tracer
with Tracer() as section_tracer:
# 4) Enter Game Mode
helper.enter_game_mode(Tests.enter_game_mode)
# 5) Read for line
lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
Report.result(Tests.lines_found, lines_located)
# 6) Exit Game Mode
helper.exit_game_mode(Tests.exit_game_mode)
if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
from utils import Report
Report.start_test(ScriptEvents_ReturnSetType_Successfully)
@@ -183,6 +183,16 @@ class TestAutomation(TestAutomationBase):
from . import ScriptEvents_SendReceiveSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)
@pytest.mark.parametrize("level", ["tmp_level"])
def test_ScriptEvents_ReturnSetType_Successfully(self, request, workspace, editor, launcher_platform, project, level):
def teardown():
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
request.addfinalizer(teardown)
file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
from . import ScriptEvents_ReturnSetType_Successfully as test_module
self._run_test(request, workspace, editor, test_module)
# NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method
# fails because of pyside_utils import
@pytest.mark.SUITE_periodic
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,126 @@
<ObjectStream version="3">
<Class name="ScriptEventsAsset" version="1" type="{CB4D603E-8CB0-4D80-8165-4244F28AF187}">
<Class name="ScriptEvent" field="m_definition" version="1" type="{10A08CD3-32C9-4E18-8039-4B8A8157918E}">
<Class name="unsigned int" field="m_version" value="4" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="VersionedProperty" field="m_name" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{1E4A668C-8300-4047-AEA2-F5FEBF11EBA0}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Name" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="1" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}">
<Class name="VersionedProperty" field="element" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{1E4A668C-8300-4047-AEA2-F5FEBF11EBA0}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Name" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="EventName" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
</Class>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="T92569006_ScriptEvent" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_category" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{73D97530-40F2-48FD-91BA-C20ABB0C6620}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Category" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="Script Events" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_tooltip" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{9D4BB4C1-8A94-43B9-BED7-C104D7758916}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Tooltip" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_addressType" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{8D528B1F-1FEE-43BA-BD5D-C7EB3707B781}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Address Type" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZ::Uuid" field="m_data" value="{C0F1AFAD-5CB3-450E-B0F5-ADB5D46B0E22}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="m_methods" type="{D9866B79-D11A-58E6-B974-0B45783F53A4}">
<Class name="Method" field="element" type="{E034EA83-C798-413D-ACE8-4923C51CF4F7}">
<Class name="VersionedProperty" field="m_name" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{0DEB2C25-6B32-44B7-9750-56CAA789C016}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Name" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="MethodName" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_tooltip" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{664A28E6-AD74-4EA7-BDE8-49CA02D1C5C7}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Tooltip" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_returnType" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{D2C6D979-A036-4523-B79E-98D3A1D4F623}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="String" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="1" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}">
<Class name="VersionedProperty" field="element" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{A2629A45-21A2-4101-BF0D-1F843B3398D7}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Return Type" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZ::Uuid" field="m_data" value="{C0F1AFAD-5CB3-450E-B0F5-ADB5D46B0E22}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZ::Uuid" field="m_data" value="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="m_parameters" type="{6ED13EA7-791B-57A8-A4F1-560B5F35B472}">
<Class name="Parameter" field="element" type="{0DA4809B-08A6-49DC-9024-F81645D97FAC}">
<Class name="VersionedProperty" field="m_name" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{CD536CCB-29E7-4155-8C20-E37FA3B3A3D2}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Name" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="ParameterName" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_tooltip" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{62907B85-6C12-49E3-8A92-82E41AF029D5}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Tooltip" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZStd::string" field="m_data" value="" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
</Class>
</Class>
<Class name="VersionedProperty" field="m_type" version="4" type="{828CA9C0-32F1-40B3-8018-EE7C3C38192A}">
<Class name="AZ::Uuid" field="m_id" value="{E3509DD4-13B0-4096-8AC4-115D9A8BCD6B}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="String" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
<Class name="unsigned int" field="m_version" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
<Class name="AZStd::vector" field="m_versions" type="{326CAAFE-9101-56E2-B869-D770629A6B19}"/>
<Class name="any" field="m_data" type="{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}">
<Class name="AZ::Uuid" field="m_data" value="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
</Class>
</Class>
</Class>
</Class>
</Class>
</Class>
</ObjectStream>
@@ -108,10 +108,11 @@ bool CLevelInfo::ReadInfo()
AzFramework::ApplicationRequests::Bus::BroadcastResult(
usePrefabSystemForLevels, &AzFramework::ApplicationRequests::IsPrefabSystemForLevelsEnabled);
// Set up a default game type for legacy code.
m_defaultGameTypeName = "Mission0";
if (usePrefabSystemForLevels)
{
// Set up a default game type for legacy code.
m_defaultGameTypeName = "Mission0";
return true;
}
@@ -53,6 +53,10 @@ namespace AZ
//! RemoveableByUser : A bool which determines if the component can be removed by the user.
//! Setting this to false prevents the user from removing this component. Default behavior is removeable by user.
const static AZ::Crc32 RemoveableByUser = AZ_CRC("RemoveableByUser", 0x32c7fd50);
//! An int which, if specified, causes a component to be forced to a particular position in the sorted list of
//! components on an entity, and prevents dragging or moving operations which would affect that position.
const static AZ::Crc32 FixedComponentListIndex = AZ_CRC_CE("FixedComponentListIndex");
const static AZ::Crc32 AppearsInAddComponentMenu = AZ_CRC("AppearsInAddComponentMenu", 0x53790e31);
const static AZ::Crc32 ForceAutoExpand = AZ_CRC("ForceAutoExpand", 0x1a5c79d2); // Ignores expansion state set by user, enforces expansion.
const static AZ::Crc32 AutoExpand = AZ_CRC("AutoExpand", 0x306ff5c0); // Expands automatically unless user changes expansion state.
@@ -36,6 +36,8 @@ namespace AzFramework
void NonUniformScaleComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("NonUniformScaleService"));
incompatible.push_back(AZ_CRC_CE("DebugDrawObbService"));
incompatible.push_back(AZ_CRC_CE("DebugDrawService"));
incompatible.push_back(AZ_CRC_CE("EMotionFXActorService"));
@@ -48,15 +48,21 @@ namespace AzFramework
};
//! The interface used by MultiViewportController to manage individual instances.
template <class TController>
class MultiViewportControllerInstanceInterface
{
public:
explicit MultiViewportControllerInstanceInterface(ViewportId viewport)
using ControllerType = TController;
MultiViewportControllerInstanceInterface(ViewportId viewport, ControllerType* controller)
: m_viewportId(viewport)
, m_controller(controller)
{
}
ViewportId GetViewportId() const { return m_viewportId; }
ControllerType* GetController() { return m_controller; }
const ControllerType* GetController() const { return m_controller; }
virtual bool HandleInputChannelEvent([[maybe_unused]]const ViewportControllerInputEvent& event) { return false; }
virtual void ResetInputChannels() {}
@@ -64,6 +70,7 @@ namespace AzFramework
private:
ViewportId m_viewportId;
ControllerType* m_controller;
};
} //namespace AzFramework
@@ -17,8 +17,8 @@ namespace AzFramework
MultiViewportController<TViewportControllerInstance, Priority>::~MultiViewportController()
{
static_assert(
AZStd::is_constructible<TViewportControllerInstance, ViewportId>::value,
"TViewportControllerInstance must implement a TViewportControllerInstance(ViewportId) constructor"
AZStd::is_same<TViewportControllerInstance, decltype(TViewportControllerInstance(0, nullptr))>::value,
"TViewportControllerInstance must implement a TViewportControllerInstance(ViewportId, ViewportController) constructor"
);
}
@@ -50,7 +50,7 @@ namespace AzFramework
template <class TViewportControllerInstance, ViewportControllerPriority Priority>
void MultiViewportController<TViewportControllerInstance, Priority>::RegisterViewportContext(ViewportId viewport)
{
m_instances[viewport] = AZStd::make_unique<TViewportControllerInstance>(viewport);
m_instances[viewport] = AZStd::make_unique<TViewportControllerInstance>(viewport, static_cast<typename TViewportControllerInstance::ControllerType*>(this));
}
template <class TViewportControllerInstance, ViewportControllerPriority Priority>
@@ -31,6 +31,10 @@ namespace AzToolsFramework
//! Allows a component to get the list of selected entities
//! \param selectedEntityIds the return vector holding the entities required
virtual void GetSelectedEntities(EntityIdList& selectedEntityIds) = 0;
//! Explicitly sets a component as having been the most recently added.
//! This means that the next time the UI refreshes, that component will be ensured to be visible.
virtual void SetNewComponentId(AZ::ComponentId componentId) = 0;
};
using EntityPropertyEditorRequestBus = AZ::EBus<EntityPropertyEditorRequests>;
@@ -182,6 +182,22 @@ namespace AzToolsFramework
instanceToParentUnder = prefabEditorEntityOwnershipInterface->GetRootPrefabInstance();
parent = instanceToParentUnder->get().GetContainerEntityId();
}
//Detect whether this instantiation would produce a cyclical dependency
auto relativePath = m_prefabLoaderInterface->GetRelativePathToProject(filePath);
Prefab::TemplateId templateId = m_prefabSystemComponentInterface->GetTemplateIdFromFilePath(relativePath);
// If the template isn't currently loaded, there's no way for it to be in the hierarchy so we just skip the check.
if (templateId != Prefab::InvalidTemplateId && IsPrefabInInstanceAncestorHierarchy(templateId, instanceToParentUnder->get()))
{
return AZ::Failure(
AZStd::string::format(
"Instantiate Prefab operation aborted - Cyclical dependency detected\n(%s depends on %s).",
relativePath.Native().c_str(),
instanceToParentUnder->get().GetTemplateSourcePath().Native().c_str()
)
);
}
{
// Initialize Undo Batch object
@@ -192,7 +208,7 @@ namespace AzToolsFramework
instanceToParentUnderDomBeforeCreate, instanceToParentUnder->get());
// Instantiate the Prefab
auto instanceToCreate = prefabEditorEntityOwnershipInterface->InstantiatePrefab(filePath, instanceToParentUnder);
auto instanceToCreate = prefabEditorEntityOwnershipInterface->InstantiatePrefab(relativePath, instanceToParentUnder);
if (!instanceToCreate)
{
@@ -242,6 +258,23 @@ namespace AzToolsFramework
return AZ::Success();
}
bool PrefabPublicHandler::IsPrefabInInstanceAncestorHierarchy(TemplateId prefabTemplateId, InstanceOptionalConstReference instance)
{
InstanceOptionalConstReference currentInstance = instance;
while (currentInstance.has_value())
{
if (currentInstance->get().GetTemplateId() == prefabTemplateId)
{
return true;
}
currentInstance = currentInstance->get().GetParentInstance();
}
return false;
}
void PrefabPublicHandler::CreateLink(
const EntityList& topLevelEntities, Instance& sourceInstance, TemplateId targetTemplateId,
UndoSystem::URSequencePoint* undoBatch, AZ::EntityId commonRootEntityId)
@@ -106,6 +106,14 @@ namespace AzToolsFramework
const AZStd::vector<AZ::EntityId>& entityIds, EntityList& inputEntityList, EntityList& topLevelEntities,
AZ::EntityId& commonRootEntityId, InstanceOptionalReference& commonRootEntityOwningInstance);
/* Detects whether an instance of prefabTemplateId is present in the hierarchy of ancestors of instance.
*
* \param prefabTemplateId The template id to test for
* \param instance The instance whose ancestor hierarchy prefabTemplateId will be tested against.
* \return true if an instance of the template of id prefabTemplateId could be found in the ancestor hierarchy of instance, false otherwise.
*/
bool IsPrefabInInstanceAncestorHierarchy(TemplateId prefabTemplateId, InstanceOptionalConstReference instance);
static Instance* GetParentInstance(Instance* instance);
static Instance* GetAncestorOfInstanceThatIsChildOfRoot(const Instance* ancestor, Instance* descendant);
static void GenerateContainerEntityTransform(const EntityList& topLevelEntities, AZ::Vector3& translation, AZ::Quaternion& rotation);
@@ -721,6 +721,8 @@ namespace AzToolsFramework
TemplateId PrefabSystemComponent::GetTemplateIdFromFilePath(AZ::IO::PathView filePath) const
{
AZ_Assert(!filePath.IsAbsolute(), "Prefab - GetTemplateIdFromFilePath was passed an absolute path. Prefabs use paths relative to the project folder.");
auto found = m_templateFilePathToIdMap.find(filePath);
if (found != m_templateFilePathToIdMap.end())
{
@@ -39,9 +39,10 @@ namespace AzToolsFramework
editContext->Class<EditorNonUniformScaleComponent>("Non-uniform Scale",
"Non-uniform scale for this entity only (does not propagate through hierarchy)")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Category, "Non-uniform Scale")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game"))
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
->Attribute(AZ::Edit::Attributes::FixedComponentListIndex, 1)
->Attribute(AZ::Edit::Attributes::RemoveableByUser, true)
->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NonUniformScale.svg")
->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/NonUniformScale.svg")
->DataElement(
AZ::Edit::UIHandlers::Default, &EditorNonUniformScaleComponent::m_scale, "Non-uniform Scale",
"Non-uniform scale for this entity only (does not propagate through hierarchy)")
@@ -61,6 +62,8 @@ namespace AzToolsFramework
void EditorNonUniformScaleComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
{
incompatible.push_back(AZ_CRC_CE("NonUniformScaleService"));
incompatible.push_back(AZ_CRC_CE("DebugDrawObbService"));
incompatible.push_back(AZ_CRC_CE("DebugDrawService"));
incompatible.push_back(AZ_CRC_CE("EMotionFXActorService"));
@@ -25,11 +25,15 @@
#include <AzCore/Serialization/SerializeContext.h>
#include <AzFramework/API/ApplicationAPI.h>
#include <AzFramework/Components/TransformComponent.h>
#include <AzToolsFramework/API/EntityCompositionRequestBus.h>
#include <AzToolsFramework/API/EntityPropertyEditorRequestsBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
#include <AzToolsFramework/ToolsComponents/TransformComponentBus.h>
#include <AzToolsFramework/ToolsComponents/TransformScalePropertyHandler.h>
#include <AzToolsFramework/ToolsComponents/EditorInspectorComponentBus.h>
#include <AzToolsFramework/ToolsComponents/EditorPendingCompositionBus.h>
#include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h>
#include <AzToolsFramework/Viewport/ViewportMessages.h>
@@ -1196,6 +1200,66 @@ namespace AzToolsFramework
destinationComponent->SetWorldTM(const_cast<TransformComponent*>(sourceComponent)->GetWorldTM());
}
AZ::Component* TransformComponent::FindPresentOrPendingComponent(AZ::Uuid componentUuid)
{
// first check if the component is present and valid
if (AZ::Component* foundComponent = GetEntity()->FindComponent(componentUuid))
{
return foundComponent;
}
// then check to see if there's a component pending because it's in an invalid state
AZStd::vector<AZ::Component*> pendingComponents;
AzToolsFramework::EditorPendingCompositionRequestBus::Event(GetEntityId(),
&AzToolsFramework::EditorPendingCompositionRequests::GetPendingComponents, pendingComponents);
for (const auto pendingComponent : pendingComponents)
{
if (pendingComponent->RTTI_IsTypeOf(componentUuid))
{
return pendingComponent;
}
}
return nullptr;
}
bool TransformComponent::IsAddNonUniformScaleButtonReadOnly()
{
return FindPresentOrPendingComponent(EditorNonUniformScaleComponent::TYPEINFO_Uuid()) != nullptr;
}
AZ::Crc32 TransformComponent::OnAddNonUniformScaleButtonPressed()
{
// if there is already a non-uniform scale component, do nothing
if (FindPresentOrPendingComponent(EditorNonUniformScaleComponent::TYPEINFO_Uuid()))
{
return AZ::Edit::PropertyRefreshLevels::None;
}
const AZStd::vector<AZ::EntityId> entityList = { GetEntityId() };
const AZ::ComponentTypeList componentsToAdd = { EditorNonUniformScaleComponent::TYPEINFO_Uuid() };
AzToolsFramework::EntityCompositionRequests::AddComponentsOutcome addComponentsOutcome;
AzToolsFramework::EntityCompositionRequestBus::BroadcastResult(addComponentsOutcome,
&AzToolsFramework::EntityCompositionRequests::AddComponentsToEntities, entityList, componentsToAdd);
const auto nonUniformScaleComponent = FindPresentOrPendingComponent(EditorNonUniformScaleComponent::RTTI_Type());
AZ::ComponentId nonUniformScaleComponentId =
nonUniformScaleComponent ? nonUniformScaleComponent->GetId() : AZ::InvalidComponentId;
if (!addComponentsOutcome.IsSuccess() || !nonUniformScaleComponent)
{
AZ_Warning("Transform component", false, "Failed to add non-uniform scale component.");
return AZ::Edit::PropertyRefreshLevels::None;
}
AzToolsFramework::EntityPropertyEditorRequestBus::Broadcast(
&AzToolsFramework::EntityPropertyEditorRequests::SetNewComponentId, nonUniformScaleComponentId);
return AZ::Edit::PropertyRefreshLevels::EntireTree;
}
void TransformComponent::Reflect(AZ::ReflectContext* context)
{
// reflect data for script, serialization, editing..
@@ -1211,6 +1275,7 @@ namespace AzToolsFramework
serializeContext->Class<Components::TransformComponent, EditorComponentBase>()->
Field("Parent Entity", &TransformComponent::m_parentEntityId)->
Field("Transform Data", &TransformComponent::m_editorTransform)->
Field("AddNonUniformScaleButton", &TransformComponent::m_addNonUniformScaleButton)->
Field("Cached World Transform", &TransformComponent::m_cachedWorldTransform)->
Field("Cached World Transform Parent", &TransformComponent::m_cachedWorldTransformParent)->
Field("Parent Activation Transform Mode", &TransformComponent::m_parentActivationTransformMode)->
@@ -1224,6 +1289,7 @@ namespace AzToolsFramework
{
ptrEdit->Class<TransformComponent>("Transform", "Controls the placement of the entity in the world in 3d")->
ClassElement(AZ::Edit::ClassElements::EditorData, "")->
Attribute(AZ::Edit::Attributes::FixedComponentListIndex, 0)->
Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Transform.svg")->
Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Transform.png")->
Attribute(AZ::Edit::Attributes::AutoExpand, true)->
@@ -1234,6 +1300,10 @@ namespace AzToolsFramework
DataElement(AZ::Edit::UIHandlers::Default, &TransformComponent::m_editorTransform, "Values", "")->
Attribute(AZ::Edit::Attributes::ChangeNotify, &TransformComponent::TransformChanged)->
Attribute(AZ::Edit::Attributes::AutoExpand, true)->
DataElement(AZ::Edit::UIHandlers::Button, &TransformComponent::m_addNonUniformScaleButton, "", "")->
Attribute(AZ::Edit::Attributes::ButtonText, "Add non-uniform scale")->
Attribute(AZ::Edit::Attributes::ReadOnly, &TransformComponent::IsAddNonUniformScaleButtonReadOnly)->
Attribute(AZ::Edit::Attributes::ChangeNotify, &TransformComponent::OnAddNonUniformScaleButtonPressed)->
DataElement(AZ::Edit::UIHandlers::ComboBox, &TransformComponent::m_parentActivationTransformMode,
"Parent activation", "Configures relative transform behavior when parent activates.")->
EnumAttribute(AZ::TransformConfig::ParentActivationTransformMode::MaintainOriginalRelativeTransform, "Original relative transform")->
@@ -23,6 +23,7 @@
#include <AzToolsFramework/API/ComponentEntitySelectionBus.h>
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
#include <AzToolsFramework/Commands/SelectionCommand.h>
#include <AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h>
#include "EditorComponentBase.h"
#include "TransformComponentBus.h"
@@ -228,6 +229,10 @@ namespace AzToolsFramework
void CheckApplyCachedWorldTransform(const AZ::Transform& parentWorld);
AZ::Component* FindPresentOrPendingComponent(AZ::Uuid componentUuid);
bool IsAddNonUniformScaleButtonReadOnly();
AZ::Crc32 OnAddNonUniformScaleButtonPressed();
// Drives transform behavior when parent activates. See AZ::TransformConfig::ParentActivationTransformMode for details.
AZ::TransformConfig::ParentActivationTransformMode m_parentActivationTransformMode;
@@ -260,6 +265,10 @@ namespace AzToolsFramework
bool m_worldTransformDirty = true;
bool m_isStatic = false;
// This is a workaround for a bug which causes the button to appear with incorrect placement if a UI
// element is used rather than a data element.
bool m_addNonUniformScaleButton = false;
// Deprecated
AZ::InterpolationMode m_interpolatePosition;
AZ::InterpolationMode m_interpolateRotation;
@@ -63,6 +63,7 @@ AZ_POP_DISABLE_WARNING
#include <AzToolsFramework/ToolsComponents/EditorOnlyEntityComponentBus.h>
#include <AzToolsFramework/ToolsComponents/EditorOnlyEntityComponent.h>
#include <AzToolsFramework/ToolsComponents/EditorLayerComponent.h>
#include <AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.h>
#include <AzToolsFramework/ToolsMessaging/EntityHighlightBus.h>
#include <AzToolsFramework/UI/ComponentPalette/ComponentPaletteUtil.hxx>
#include <AzToolsFramework/UI/ComponentPalette/ComponentPaletteWidget.hxx>
@@ -494,6 +495,11 @@ namespace AzToolsFramework
}
}
void EntityPropertyEditor::SetNewComponentId(AZ::ComponentId componentId)
{
m_newComponentId = componentId;
}
void EntityPropertyEditor::SetOverrideEntityIds(const AzToolsFramework::EntityIdSet& entities)
{
m_overrideSelectedEntityIds = entities;
@@ -1039,15 +1045,23 @@ namespace AzToolsFramework
sortedComponents.end(),
[=](const OrderedSortComponentEntry& component1, const OrderedSortComponentEntry& component2)
{
// Transform component must be first, always
// If component 1 is a transform component, it is sorted earlier
if (component1.m_component->RTTI_IsTypeOf(AZ::EditorTransformComponentTypeId))
AZStd::optional<int> fixedComponentListIndex1 = GetFixedComponentListIndex(component1.m_component);
AZStd::optional<int> fixedComponentListIndex2 = GetFixedComponentListIndex(component2.m_component);
// If both components have fixed list indices, sort based on those indices
if (fixedComponentListIndex1.has_value() && fixedComponentListIndex2.has_value())
{
return fixedComponentListIndex1.value() < fixedComponentListIndex2.value();
}
// If component 1 has a fixed list index, sort it first
if (fixedComponentListIndex1.has_value())
{
return true;
}
// If component 2 is a transform component, component 1 is never sorted earlier
if (component2.m_component->RTTI_IsTypeOf(AZ::EditorTransformComponentTypeId))
// If component 2 has a fixed list index, component 1 should not be sorted before it
if (fixedComponentListIndex2.has_value())
{
return false;
}
@@ -1128,10 +1142,7 @@ namespace AzToolsFramework
{
if (auto attributeData = azdynamic_cast<AZ::Edit::AttributeData<bool>*>(attribute))
{
if (!attributeData->Get(nullptr))
{
return false;
}
return attributeData->Get(nullptr);
}
}
}
@@ -1166,6 +1177,36 @@ namespace AzToolsFramework
return true;
}
AZStd::optional<int> EntityPropertyEditor::GetFixedComponentListIndex(const AZ::Component* component)
{
auto componentClassData = component ? GetComponentClassData(component) : nullptr;
if (componentClassData && componentClassData->m_editData)
{
if (auto editorDataElement = componentClassData->m_editData->FindElementData(AZ::Edit::ClassElements::EditorData))
{
if (auto attribute = editorDataElement->FindAttribute(AZ::Edit::Attributes::FixedComponentListIndex))
{
if (auto attributeData = azdynamic_cast<AZ::Edit::AttributeData<int>*>(attribute))
{
return { attributeData->Get(nullptr) };
}
}
}
}
return {};
}
bool EntityPropertyEditor::IsComponentDraggable(const AZ::Component* component)
{
return !GetFixedComponentListIndex(component).has_value();
}
bool EntityPropertyEditor::AreComponentsDraggable(const AZ::Entity::ComponentArrayType& components) const
{
return AZStd::all_of(
components.begin(), components.end(), [](AZ::Component* component) { return IsComponentDraggable(component); });
}
bool EntityPropertyEditor::AreComponentsCopyable(const AZ::Entity::ComponentArrayType& components) const
{
return AreComponentsCopyable(components, m_componentFilter);
@@ -3367,7 +3408,9 @@ namespace AzToolsFramework
sourceComponents.size() == m_selectedEntityIds.size() &&
targetComponents.size() == m_selectedEntityIds.size() &&
AreComponentsRemovable(sourceComponents) &&
AreComponentsRemovable(targetComponents);
AreComponentsRemovable(targetComponents) &&
AreComponentsDraggable(sourceComponents) &&
AreComponentsDraggable(targetComponents);
}
bool EntityPropertyEditor::IsMoveComponentsUpAllowed() const
@@ -3681,14 +3724,38 @@ namespace AzToolsFramework
void EntityPropertyEditor::ScrollToNewComponent()
{
//force new components to be visible, assuming they are added to the end of the list and layout
auto componentEditor = GetComponentEditorsFromIndex(m_componentEditorsUsed - 1);
// force new components to be visible
// if no component has been explicitly set at the most recently added,
// assume new components are added to the end of the list and layout
AZ::s32 newComponentIndex = m_componentEditorsUsed - 1;
// if there is a component id explicitly set as the most recently added, try to find it and make sure it is visible
if (m_newComponentId.has_value() && m_newComponentId.value() != AZ::InvalidComponentId)
{
AZ::ComponentId newComponentId = m_newComponentId.value();
for (AZ::s32 componentIndex = 0; componentIndex < m_componentEditorsUsed; ++componentIndex)
{
if (m_componentEditors[componentIndex])
{
for (const auto component : m_componentEditors[componentIndex]->GetComponents())
{
if (component->GetId() == newComponentId)
{
newComponentIndex = componentIndex;
}
}
}
}
}
auto componentEditor = GetComponentEditorsFromIndex(newComponentIndex);
if (componentEditor)
{
m_gui->m_componentList->ensureWidgetVisible(componentEditor);
}
m_shouldScrollToNewComponents = false;
m_shouldScrollToNewComponentsQueued = false;
m_newComponentId.reset();
}
void EntityPropertyEditor::QueueScrollToNewComponent()
@@ -4073,7 +4140,8 @@ namespace AzToolsFramework
{
if (!componentEditor ||
!componentEditor->isVisible() ||
!AreComponentsRemovable(componentEditor->GetComponents()))
!AreComponentsRemovable(componentEditor->GetComponents()) ||
!AreComponentsDraggable(componentEditor->GetComponents()))
{
return false;
}
@@ -4223,6 +4291,7 @@ namespace AzToolsFramework
while (targetComponentEditor
&& (targetComponentEditor->IsDragged()
|| !AreComponentsRemovable(targetComponentEditor->GetComponents())
|| !AreComponentsDraggable(targetComponentEditor->GetComponents())
|| (globalRect.center().y() > GetWidgetGlobalRect(targetComponentEditor).center().y())))
{
if (targetItr == m_componentEditors.end() || targetComponentEditor == m_componentEditors.back() || !targetComponentEditor->isVisible())
@@ -211,6 +211,7 @@ namespace AzToolsFramework
// EntityPropertEditorRequestBus
void GetSelectedAndPinnedEntities(EntityIdList& selectedEntityIds) override;
void GetSelectedEntities(EntityIdList& selectedEntityIds) override;
void SetNewComponentId(AZ::ComponentId componentId) override;
bool IsEntitySelected(const AZ::EntityId& id) const;
bool IsSingleEntitySelected(const AZ::EntityId& id) const;
@@ -237,6 +238,9 @@ namespace AzToolsFramework
static bool DoesComponentPassFilter(const AZ::Component* component, const ComponentFilter& filter);
static bool IsComponentRemovable(const AZ::Component* component);
bool AreComponentsRemovable(const AZ::Entity::ComponentArrayType& components) const;
static AZStd::optional<int> GetFixedComponentListIndex(const AZ::Component* component);
static bool IsComponentDraggable(const AZ::Component* component);
bool AreComponentsDraggable(const AZ::Entity::ComponentArrayType& components) const;
bool AreComponentsCopyable(const AZ::Entity::ComponentArrayType& components) const;
void AddMenuOptionsForComponents(QMenu& menu, const QPoint& position);
@@ -568,6 +572,9 @@ namespace AzToolsFramework
void ConnectToEntityBuses(const AZ::EntityId& entityId);
void DisconnectFromEntityBuses(const AZ::EntityId& entityId);
//! Stores a component id to be focused on next time the UI updates.
AZStd::optional<AZ::ComponentId> m_newComponentId;
private slots:
void OnPropertyRefreshRequired(); // refresh is needed for a property.
void UpdateContents();
@@ -178,6 +178,24 @@ namespace AzToolsFramework
~ViewportInteractionRequests() = default;
};
/// Interface to return only viewport specific settings (e.g. snapping).
class ViewportSettings
{
public:
virtual ~ViewportSettings() = default;
/// Return if grid snapping is enabled.
virtual bool GridSnappingEnabled() const = 0;
/// Return the grid snapping size.
virtual float GridSize() const = 0;
/// Does the grid currently want to be displayed.
virtual bool ShowGrid() const = 0;
/// Return if angle snapping is enabled.
virtual bool AngleSnappingEnabled() const = 0;
/// Return the angle snapping/step size.
virtual float AngleStep() const = 0;
};
/// Type to inherit to implement ViewportInteractionRequests.
using ViewportInteractionRequestBus = AZ::EBus<ViewportInteractionRequests, ViewportEBusTraits>;
@@ -17,13 +17,13 @@
#include <AzToolsFramework/Application/ToolsApplication.h>
#include <AzToolsFramework/ViewportSelection/EditorInteractionSystemViewportSelectionRequestBus.h>
#include <AzToolsFramework/ToolsComponents/TransformComponent.h>
#include <AzToolsFramework/ToolsComponents/ScriptEditorComponent.h>
#include <AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.hxx>
#include <AzToolsFramework/API/EntityPropertyEditorRequestsBus.h>
#include <AzToolsFramework/ToolsComponents/EditorLockComponent.h>
#include <AzToolsFramework/ToolsComponents/EditorVisibilityComponent.h>
#include <AzToolsFramework/ViewportSelection/EditorDefaultSelection.h>
#include <AzCore/IO/Streamer/StreamerComponent.h>
#include <AzCore/Asset/AssetManagerComponent.h>
#include <AzCore/std/sort.h>
@@ -55,7 +55,7 @@ namespace UnitTest
TEST(EntityPropertyEditorTests, PrioritySort_NonTransformAsFirstItem_TransformMovesToTopRemainderUnchanged)
{
ComponentApplication app;
ToolsApplication app;
AZ::Entity::ComponentArrayType unorderedComponents;
AZ::Entity::ComponentArrayType orderedComponents;
@@ -68,12 +68,18 @@ namespace UnitTest
Entity* systemEntity = app.Create(desc, startupParams);
// Need to reflect the components so that edit attribute used for sorting, such as FixedComponentListIndex, get set.
app.RegisterComponentDescriptor(AzToolsFramework::Components::TransformComponent::CreateDescriptor());
app.RegisterComponentDescriptor(AzToolsFramework::Components::ScriptEditorComponent::CreateDescriptor());
app.RegisterComponentDescriptor(AZ::AssetManagerComponent::CreateDescriptor());
// Add more than 31 components, as we are testing the case where the sort fails when there are 32 or more items.
const int numFillerItems = 32;
for (int commentIndex = 0; commentIndex < numFillerItems; commentIndex++)
{
unorderedComponents.insert(unorderedComponents.begin(), systemEntity->CreateComponent(AZ::StreamerComponent::RTTI_Type()));
unorderedComponents.insert(unorderedComponents.begin(), systemEntity->CreateComponent(
AzToolsFramework::Components::ScriptEditorComponent::RTTI_Type()));
}
// Add a TransformComponent at the end which should be sorted to the beginning by the priority sort.
+76 -27
View File
@@ -106,6 +106,15 @@ AZ_CVAR(
EditorViewportWidget* EditorViewportWidget::m_pPrimaryViewport = nullptr;
namespace AzFramework
{
extern InputChannelId CameraFreeLookButton;
extern InputChannelId CameraFreePanButton;
extern InputChannelId CameraOrbitLookButton;
extern InputChannelId CameraOrbitDollyButton;
extern InputChannelId CameraOrbitPanButton;
}
#if AZ_TRAIT_OS_PLATFORM_APPLE
void StopFixedCursorMode();
void StartFixedCursorMode(QObject *viewport);
@@ -161,6 +170,7 @@ EditorViewportWidget::EditorViewportWidget(const QString& name, QWidget* parent)
, m_camFOV(gSettings.viewports.fDefaultFov)
, m_defaultViewName(name)
, m_renderViewport(nullptr) //m_renderViewport is initialized later, in SetViewportId
, m_editorViewportSettings(this)
{
// need this to be set in order to allow for language switching on Windows
setAttribute(Qt::WA_InputMethodEnabled);
@@ -1098,32 +1108,6 @@ AzFramework::CameraState EditorViewportWidget::GetCameraState()
return m_renderViewport->GetCameraState();
}
bool EditorViewportWidget::GridSnappingEnabled()
{
return GetViewManager()->GetGrid()->IsEnabled();
}
float EditorViewportWidget::GridSize()
{
const CGrid* grid = GetViewManager()->GetGrid();
return grid->scale * grid->size;
}
bool EditorViewportWidget::ShowGrid()
{
return gSettings.viewports.bShowGridGuide;
}
bool EditorViewportWidget::AngleSnappingEnabled()
{
return GetViewManager()->GetGrid()->IsAngleSnapEnabled();
}
float EditorViewportWidget::AngleStep()
{
return GetViewManager()->GetGrid()->GetAngleSnap();
}
AZ::Vector3 EditorViewportWidget::PickTerrain(const AzFramework::ScreenPoint& point)
{
FUNCTION_PROFILER(GetIEditor()->GetSystem(), PROFILE_EDITOR);
@@ -1227,13 +1211,47 @@ void EditorViewportWidget::SetViewportId(int id)
if (ed_useNewCameraSystem)
{
AzFramework::ReloadCameraKeyBindings();
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ModernViewportCameraController>());
auto controller = AZStd::make_shared<SandboxEditor::ModernViewportCameraController>();
controller->SetCameraListBuilderCallback([](AzFramework::Cameras& cameras)
{
auto firstPersonRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::CameraFreeLookButton);
auto firstPersonPanCamera =
AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::CameraFreePanButton, AzFramework::LookPan);
auto firstPersonTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::LookTranslation);
auto firstPersonWheelCamera = AZStd::make_shared<AzFramework::ScrollTranslationCameraInput>();
auto orbitCamera = AZStd::make_shared<AzFramework::OrbitCameraInput>();
auto orbitRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::CameraOrbitLookButton);
auto orbitTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::OrbitTranslation);
auto orbitDollyWheelCamera = AZStd::make_shared<AzFramework::OrbitDollyScrollCameraInput>();
auto orbitDollyMoveCamera =
AZStd::make_shared<AzFramework::OrbitDollyCursorMoveCameraInput>(AzFramework::CameraOrbitDollyButton);
auto orbitPanCamera =
AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::CameraOrbitPanButton, AzFramework::OrbitPan);
orbitCamera->m_orbitCameras.AddCamera(orbitRotateCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitTranslateCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitDollyWheelCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitDollyMoveCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitPanCamera);
cameras.AddCamera(firstPersonRotateCamera);
cameras.AddCamera(firstPersonPanCamera);
cameras.AddCamera(firstPersonTranslateCamera);
cameras.AddCamera(firstPersonWheelCamera);
cameras.AddCamera(orbitCamera);
});
m_renderViewport->GetControllerList()->Add(controller);
}
else
{
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
}
m_renderViewport->SetViewportSettings(&m_editorViewportSettings);
UpdateScene();
if (m_pPrimaryViewport == this)
@@ -2853,4 +2871,35 @@ void EditorViewportWidget::SetAsActiveViewport()
}
}
EditorViewportSettings::EditorViewportSettings(const EditorViewportWidget* editorViewportWidget)
: m_editorViewportWidget(editorViewportWidget)
{
}
bool EditorViewportSettings::GridSnappingEnabled() const
{
return m_editorViewportWidget->GetViewManager()->GetGrid()->IsEnabled();
}
float EditorViewportSettings::GridSize() const
{
const CGrid* grid = m_editorViewportWidget->GetViewManager()->GetGrid();
return grid->scale * grid->size;
}
bool EditorViewportSettings::ShowGrid() const
{
return gSettings.viewports.bShowGridGuide;
}
bool EditorViewportSettings::AngleSnappingEnabled() const
{
return m_editorViewportWidget->GetViewManager()->GetGrid()->IsAngleSnapEnabled();
}
float EditorViewportSettings::AngleStep() const
{
return m_editorViewportWidget->GetViewManager()->GetGrid()->GetAngleSnap();
}
#include <moc_EditorViewportWidget.cpp>
+19 -6
View File
@@ -65,6 +65,23 @@ namespace AzToolsFramework
class ManipulatorManager;
}
class EditorViewportWidget;
//! Viewport settings for the EditorViewportWidget
struct EditorViewportSettings : public AzToolsFramework::ViewportInteraction::ViewportSettings
{
explicit EditorViewportSettings(const EditorViewportWidget* editorViewportWidget);
bool GridSnappingEnabled() const override;
float GridSize() const override;
bool ShowGrid() const override;
bool AngleSnappingEnabled() const override;
float AngleStep() const override;
private:
const EditorViewportWidget* m_editorViewportWidget = nullptr;
};
// EditorViewportWidget window
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
@@ -189,13 +206,7 @@ public:
virtual void OnStartPlayInEditor();
virtual void OnStopPlayInEditor();
// AzToolsFramework::ViewportInteractionRequestBus
AzFramework::CameraState GetCameraState();
bool GridSnappingEnabled();
float GridSize();
bool ShowGrid();
bool AngleSnappingEnabled();
float AngleStep();
AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition);
// AzToolsFramework::ViewportFreezeRequestBus
@@ -596,5 +607,7 @@ private:
AZ::Name m_defaultViewportContextName;
EditorViewportSettings m_editorViewportSettings;
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
};
+11
View File
@@ -295,6 +295,17 @@ void CGameExporter::ExportLevelData(const QString& path, bool /*bExportMission*/
CCryMemFile fileAction;
fileAction.Write(xmlDataAction.c_str(), xmlDataAction.length());
m_levelPak.m_pakFile.UpdateFile(levelDataActionFile.toUtf8().data(), fileAction);
AZStd::vector<char> entitySaveBuffer;
AZ::IO::ByteContainerStream<AZStd::vector<char> > entitySaveStream(&entitySaveBuffer);
bool savedEntities = false;
EBUS_EVENT_RESULT(savedEntities, AzToolsFramework::EditorEntityContextRequestBus, SaveToStreamForGame, entitySaveStream, AZ::DataStream::ST_BINARY);
if (savedEntities)
{
QString entitiesFile;
entitiesFile = QStringLiteral("%1%2.entities_xml").arg(path, "Mission0");
m_levelPak.m_pakFile.UpdateFile(entitiesFile.toUtf8().data(), entitySaveBuffer.begin(), entitySaveBuffer.size());
}
}
//////////////////////////////////////////////////////////////////////////
@@ -28,8 +28,8 @@
namespace SandboxEditor
{
LegacyViewportCameraControllerInstance::LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewportId)
: AzFramework::MultiViewportControllerInstanceInterface(viewportId)
LegacyViewportCameraControllerInstance::LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewportId, LegacyViewportCameraController* controller)
: AzFramework::MultiViewportControllerInstanceInterface<LegacyViewportCameraController>(viewportId, controller)
{
}
@@ -28,11 +28,14 @@ namespace AzFramework
namespace SandboxEditor
{
class LegacyViewportCameraControllerInstance;
using LegacyViewportCameraController = AzFramework::MultiViewportController<LegacyViewportCameraControllerInstance>;
class LegacyViewportCameraControllerInstance final
: public AzFramework::MultiViewportControllerInstanceInterface
: public AzFramework::MultiViewportControllerInstanceInterface<LegacyViewportCameraController>
{
public:
explicit LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewport);
LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewport, LegacyViewportCameraController* controller);
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
void ResetInputChannels() override;
@@ -69,5 +72,4 @@ namespace SandboxEditor
bool m_capturingCursor = false;
};
using LegacyViewportCameraController = AzFramework::MultiViewportController<LegacyViewportCameraControllerInstance>;
} //namespace SandboxEditor
@@ -22,15 +22,6 @@
#include <AzFramework/Windowing/WindowBus.h>
#include <AzToolsFramework/Viewport/ViewportMessages.h>
namespace AzFramework
{
extern InputChannelId CameraFreeLookButton;
extern InputChannelId CameraFreePanButton;
extern InputChannelId CameraOrbitLookButton;
extern InputChannelId CameraOrbitDollyButton;
extern InputChannelId CameraOrbitPanButton;
}
namespace SandboxEditor
{
static void DrawPreviewAxis(AzFramework::DebugDisplayRequests& display, const AZ::Transform& transform, const float axisLength)
@@ -60,36 +51,23 @@ namespace SandboxEditor
return viewportContext;
}
ModernViewportCameraControllerInstance::ModernViewportCameraControllerInstance(const AzFramework::ViewportId viewportId)
: MultiViewportControllerInstanceInterface(viewportId)
void ModernViewportCameraController::SetCameraListBuilderCallback(const CameraListBuilder& builder)
{
// LYN-2315 TODO - move setup out of constructor, pass cameras in
auto firstPersonRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::CameraFreeLookButton);
auto firstPersonPanCamera =
AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::CameraFreePanButton, AzFramework::LookPan);
auto firstPersonTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::LookTranslation);
auto firstPersonWheelCamera = AZStd::make_shared<AzFramework::ScrollTranslationCameraInput>();
m_cameraListBuilder = builder;
}
auto orbitCamera = AZStd::make_shared<AzFramework::OrbitCameraInput>();
auto orbitRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::CameraOrbitLookButton);
auto orbitTranslateCamera = AZStd::make_shared<AzFramework::TranslateCameraInput>(AzFramework::OrbitTranslation);
auto orbitDollyWheelCamera = AZStd::make_shared<AzFramework::OrbitDollyScrollCameraInput>();
auto orbitDollyMoveCamera =
AZStd::make_shared<AzFramework::OrbitDollyCursorMoveCameraInput>(AzFramework::CameraOrbitDollyButton);
auto orbitPanCamera =
AZStd::make_shared<AzFramework::PanCameraInput>(AzFramework::CameraOrbitPanButton, AzFramework::OrbitPan);
void ModernViewportCameraController::SetupCameras(AzFramework::Cameras& cameras)
{
if (m_cameraListBuilder)
{
m_cameraListBuilder(cameras);
}
}
orbitCamera->m_orbitCameras.AddCamera(orbitRotateCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitTranslateCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitDollyWheelCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitDollyMoveCamera);
orbitCamera->m_orbitCameras.AddCamera(orbitPanCamera);
m_cameraSystem.m_cameras.AddCamera(firstPersonRotateCamera);
m_cameraSystem.m_cameras.AddCamera(firstPersonPanCamera);
m_cameraSystem.m_cameras.AddCamera(firstPersonTranslateCamera);
m_cameraSystem.m_cameras.AddCamera(firstPersonWheelCamera);
m_cameraSystem.m_cameras.AddCamera(orbitCamera);
ModernViewportCameraControllerInstance::ModernViewportCameraControllerInstance(const AzFramework::ViewportId viewportId, ModernViewportCameraController* controller)
: MultiViewportControllerInstanceInterface<ModernViewportCameraController>(viewportId, controller)
{
controller->SetupCameras(m_cameraSystem.m_cameras);
if (auto viewportContext = RetrieveViewportContext(GetViewportId()))
{
@@ -19,12 +19,29 @@
namespace SandboxEditor
{
class ModernViewportCameraControllerInstance final : public AzFramework::MultiViewportControllerInstanceInterface,
private AzFramework::ViewportDebugDisplayEventBus::Handler
class ModernViewportCameraControllerInstance;
class ModernViewportCameraController
: public AzFramework::MultiViewportController<ModernViewportCameraControllerInstance>
{
public:
explicit ModernViewportCameraControllerInstance(AzFramework::ViewportId viewportId);
~ModernViewportCameraControllerInstance();
using CameraListBuilder = AZStd::function<void(AzFramework::Cameras&)>;
//! Sets the camera list builder callback used to populate new ModernViewportCameraControllerInstances
void SetCameraListBuilderCallback(const CameraListBuilder& builder);
//! Sets up a camera list based on this controller's CameraListBuilderCallback
void SetupCameras(AzFramework::Cameras& cameras);
private:
CameraListBuilder m_cameraListBuilder;
};
class ModernViewportCameraControllerInstance final
: public AzFramework::MultiViewportControllerInstanceInterface<ModernViewportCameraController>
, private AzFramework::ViewportDebugDisplayEventBus::Handler
{
public:
explicit ModernViewportCameraControllerInstance(AzFramework::ViewportId viewportId, ModernViewportCameraController* controller);
~ModernViewportCameraControllerInstance() override;
// MultiViewportControllerInstanceInterface overrides ...
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
@@ -51,6 +68,4 @@ namespace SandboxEditor
AZ::RPI::ViewportContext::MatrixChangedEvent::Handler m_cameraViewMatrixChangeHandler;
};
using ModernViewportCameraController = AzFramework::MultiViewportController<ModernViewportCameraControllerInstance>;
} // namespace SandboxEditor
@@ -27,8 +27,8 @@ static const auto InteractionPriority = AzFramework::ViewportControllerPriority:
namespace SandboxEditor
{
ViewportManipulatorControllerInstance::ViewportManipulatorControllerInstance(AzFramework::ViewportId viewport)
: AzFramework::MultiViewportControllerInstanceInterface(viewport)
ViewportManipulatorControllerInstance::ViewportManipulatorControllerInstance(AzFramework::ViewportId viewport, ViewportManipulatorController* controller)
: AzFramework::MultiViewportControllerInstanceInterface<ViewportManipulatorController>(viewport, controller)
{
}
@@ -19,11 +19,14 @@
namespace SandboxEditor
{
class ViewportManipulatorControllerInstance;
using ViewportManipulatorController = AzFramework::MultiViewportController<ViewportManipulatorControllerInstance, AzFramework::ViewportControllerPriority::DispatchToAllPriorities>;
class ViewportManipulatorControllerInstance final
: public AzFramework::MultiViewportControllerInstanceInterface
: public AzFramework::MultiViewportControllerInstanceInterface<ViewportManipulatorController>
{
public:
explicit ViewportManipulatorControllerInstance(AzFramework::ViewportId viewport);
explicit ViewportManipulatorControllerInstance(AzFramework::ViewportId viewport, ViewportManipulatorController* controller);
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
void ResetInputChannels() override;
@@ -40,6 +43,4 @@ namespace SandboxEditor
AZStd::unordered_map<AzToolsFramework::ViewportInteraction::MouseButton, AZ::ScriptTimePoint> m_pendingDoubleClicks;
AZ::ScriptTimePoint m_curTime;
};
using ViewportManipulatorController = AzFramework::MultiViewportController<ViewportManipulatorControllerInstance, AzFramework::ViewportControllerPriority::DispatchToAllPriorities>;
} //namespace SandboxEditor
@@ -124,131 +124,29 @@ namespace AssetProcessor
NativeLegacyRCCompiler::NativeLegacyRCCompiler()
: m_resourceCompilerInitialized(false)
, m_systemRoot()
, m_rcExecutableFullPath()
, m_requestedQuit(false)
{
}
bool NativeLegacyRCCompiler::Initialize(const QString& systemRoot, const QString& rcExecutableFullPath)
bool NativeLegacyRCCompiler::Initialize()
{
// QFile::exists(normalizedPath)
if (!QDir(systemRoot).exists())
{
AZ_TracePrintf(AssetProcessor::DebugChannel, QString("Cannot locate system root dir %1").arg(systemRoot).toUtf8().data());
return false;
}
if (!AZ::IO::SystemFile::Exists(rcExecutableFullPath.toUtf8().data()))
{
AZ_TracePrintf(AssetProcessor::DebugChannel, QString("Invalid executable path '%1'").arg(rcExecutableFullPath).toUtf8().data());
return false;
}
this->m_systemRoot.setPath(systemRoot);
this->m_rcExecutableFullPath = rcExecutableFullPath;
this->m_resourceCompilerInitialized = true;
return true;
}
bool NativeLegacyRCCompiler::Execute(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier,
const QString& params, const QString& dest, const AssetBuilderSDK::JobCancelListener* jobCancelListener, Result& result) const
bool NativeLegacyRCCompiler::Execute(
[[maybe_unused]] const QString& inputFile,
[[maybe_unused]] const QString& watchFolder,
[[maybe_unused]] const QString& platformIdentifier,
[[maybe_unused]] const QString& params,
[[maybe_unused]] const QString& dest,
[[maybe_unused]] const AssetBuilderSDK::JobCancelListener* jobCancelListener,
[[maybe_unused]] Result& result) const
{
if (!this->m_resourceCompilerInitialized)
{
result.m_exitCode = JobExitCode_RCCouldNotBeLaunched;
result.m_crashed = false;
AZ_Warning("RC Builder", false, "RC Compiler has not been initialized before use.");
return false;
}
// running RC.EXE is deprecated.
AZ_Error("RC Builder", false, "running RC.EXE is deprecated");
// build the command line:
QString commandString = NativeLegacyRCCompiler::BuildCommand(inputFile, watchFolder, platformIdentifier, params, dest);
AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo;
// while it might be tempting to set the executable in processLaunchInfo.m_processExecutableString, it turns out that RC.EXE
// won't work if you do that because it assumes the first command line param is the exe name, which is not the case if you do it that way...
QString formatter("\"%1\" %2");
processLaunchInfo.m_commandlineParameters = QString(formatter).arg(m_rcExecutableFullPath).arg(commandString).toUtf8().data();
processLaunchInfo.m_showWindow = false;
processLaunchInfo.m_workingDirectory = m_systemRoot.absolutePath().toUtf8().data();
processLaunchInfo.m_processPriority = AzFramework::ProcessPriority::PROCESSPRIORITY_IDLE;
AZ_TracePrintf("RC Builder", "Executing RC.EXE: '%s' ...\n", processLaunchInfo.m_commandlineParameters.c_str());
AZ_TracePrintf("Rc Builder", "Executing RC.EXE with working directory: '%s' ...\n", processLaunchInfo.m_workingDirectory.c_str());
AzFramework::ProcessWatcher* watcher = AzFramework::ProcessWatcher::LaunchProcess(processLaunchInfo, AzFramework::ProcessCommunicationType::COMMUNICATOR_TYPE_STDINOUT);
if (!watcher)
{
result.m_exitCode = JobExitCode_RCCouldNotBeLaunched;
result.m_crashed = false;
AZ_Error("RC Builder", false, "RC failed to execute\n");
return false;
}
QElapsedTimer ticker;
ticker.start();
// it created the process, wait for it to exit:
bool finishedOK = false;
{
CommunicatorTracePrinter tracer(watcher->GetCommunicator(), "RC Builder"); // allow this to go out of scope...
while ((!m_requestedQuit) && (!finishedOK))
{
AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(NativeLegacyRCCompiler::s_maxSleepTime));
tracer.Pump();
if (ticker.elapsed() > s_jobMaximumWaitTime || (jobCancelListener && jobCancelListener->IsCancelled()))
{
break;
}
AZ::u32 exitCode = 0;
if (!watcher->IsProcessRunning(&exitCode))
{
finishedOK = true; // we either cant wait for it, or it finished.
result.m_exitCode = exitCode;
result.m_crashed = (exitCode == 100) || (exitCode == 101); // these indicate fatal errors.
break;
}
}
tracer.Pump(); // empty whats left if possible.
}
if (!finishedOK)
{
if (watcher->IsProcessRunning())
{
watcher->TerminateProcess(0xFFFFFFFF);
}
if (!this->m_requestedQuit)
{
if (jobCancelListener == nullptr || !jobCancelListener->IsCancelled())
{
AZ_Error("RC Builder", false, "RC failed to complete within the maximum allowed time and was terminated. please see %s/rc_log.log for details", result.m_outputDir.toUtf8().data());
}
else
{
AZ_TracePrintf("RC Builder", "RC was terminated. There was a request to cancel the job.\n");
result.m_exitCode = JobExitCode_JobCancelled;
}
}
else
{
AZ_Warning("RC Builder", false, "RC terminated because the application is shutting down.\n");
result.m_exitCode = JobExitCode_JobCancelled;
}
result.m_crashed = false;
}
AZ_TracePrintf("RC Builder", "RC.EXE execution has ended\n");
delete watcher;
return finishedOK;
return false;
}
QString NativeLegacyRCCompiler::BuildCommand(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier, const QString& params, const QString& dest)
@@ -438,22 +336,7 @@ namespace AssetProcessor
bool InternalRecognizerBasedBuilder::Initialize(const RecognizerConfiguration& recognizerConfig)
{
InitializeAssetRecognizers(recognizerConfig.GetAssetRecognizerContainer());
// Get the engine root since rc.exe will exist there and not in any external project folder
QString systemRoot;
QString rcFullPath;
// Validate that the engine root contains the necessary rc.exe
if (!FindRC(rcFullPath))
{
return false;
}
if (!m_rcCompiler->Initialize(systemRoot, rcFullPath))
{
AssetBuilderSDK::BuilderLog(m_internalRecognizerBuilderUuid, "Unable to find rc.exe from the engine root (%1).", rcFullPath.toUtf8().data());
return false;
}
return true;
return m_rcCompiler->Initialize();
}
@@ -31,7 +31,7 @@ namespace AssetProcessor
};
virtual ~RCCompiler() = default;
virtual bool Initialize(const QString& systemRoot, const QString& rcExecutableFullPath) = 0;
virtual bool Initialize() = 0;
virtual bool Execute(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier, const QString& params,
const QString& dest, const AssetBuilderSDK::JobCancelListener* jobCancelListener, Result& result) const = 0;
virtual void RequestQuit() = 0;
@@ -44,7 +44,7 @@ namespace AssetProcessor
public:
NativeLegacyRCCompiler();
bool Initialize(const QString& systemRoot, const QString& rcExecutableFullPath) override;
bool Initialize() override;
bool Execute(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier, const QString& params, const QString& dest,
const AssetBuilderSDK::JobCancelListener* jobCancelListener, Result& result) const override;
static QString BuildCommand(const QString& inputFile, const QString& watchFolder, const QString& platformIdentifier, const QString& params, const QString& dest);
@@ -53,8 +53,6 @@ namespace AssetProcessor
static const int s_maxSleepTime;
static const unsigned int s_jobMaximumWaitTime;
bool m_resourceCompilerInitialized;
QDir m_systemRoot;
QString m_rcExecutableFullPath;
volatile bool m_requestedQuit;
};
@@ -43,19 +43,6 @@ TEST_F(RCBuilderTest, Shutdown_NormalShutdown_Requested)
}
TEST_F(RCBuilderTest, Initialize_StandardInitialization_Fail)
{
MockRCCompiler* mockRC = new MockRCCompiler();
TestInternalRecognizerBasedBuilder test(mockRC);
MockRecognizerConfiguration configuration;
mockRC->SetResultInitialize(false);
bool initialization_result = test.Initialize(configuration);
ASSERT_FALSE(initialization_result);
}
TEST_F(RCBuilderTest, Initialize_StandardInitializationWithDuplicateAndInvalidRecognizers_Valid)
{
MockRCCompiler* mockRC = new MockRCCompiler();
@@ -34,7 +34,7 @@ public:
{
}
bool Initialize([[maybe_unused]] const QString& systemRoot, [[maybe_unused]] const QString& rcExecutableFullPath) override
bool Initialize() override
{
m_initialize++;
return m_initializeResult;
@@ -47,7 +47,7 @@ namespace AssetProcessor
{
}
bool Initialize([[maybe_unused]] const QString& systemRoot, [[maybe_unused]] const QString& rcExecutableFullPath) override
bool Initialize() override
{
m_initialize++;
return m_initializeResult;
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Icons / Platform / Android</title>
<g id="Icons-/-Platform-/-Android" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M1.74272,3.887 C1.53596,3.887 1.36053,3.9591 1.21633,4.1033 C1.07212,4.24751 1,4.42055 1,4.62251 L1,7.72344 C1,7.93046 1.0721,8.10574 1.21633,8.24996 C1.36053,8.39417 1.53596,8.46629 1.74272,8.46629 C1.94933,8.46629 2.12369,8.39419 2.26566,8.24996 C2.40735,8.10576 2.47839,7.93046 2.47839,7.72344 L2.47839,4.62251 C2.47839,4.42052 2.40629,4.24751 2.26206,4.1033 C2.11783,3.9591 1.94468,3.887 1.74272,3.887 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M7.71395,1.10327 L8.22598,0.158715 C8.25959,0.096182 8.24763,0.0482297 8.19,0.0145111 C8.12745,-0.0145641 8.07938,0.000168761 8.0458,0.0576682 L7.52661,1.00977 C7.06976,0.807787 6.58657,0.70661 6.07704,0.70661 C5.5674,0.70661 5.08416,0.807809 4.62749,1.00977 L4.10828,0.0576682 C4.07454,0.000168761 4.02647,-0.0144339 3.96407,0.0145111 C3.90631,0.0483815 3.89436,0.096182 3.9281,0.158715 L4.44015,1.10327 C3.92094,1.36805 3.50742,1.73681 3.19974,2.21034 C2.89206,2.68414 2.73816,3.20189 2.73816,3.76452 L9.40866,3.76452 C9.40866,3.20202 9.25474,2.68424 8.94708,2.21034 C8.63939,1.73681 8.22825,1.36805 7.71395,1.10327 Z M4.75364,2.47714 C4.69826,2.53264 4.63213,2.56026 4.55525,2.56026 C4.47822,2.56026 4.41343,2.53264 4.36058,2.47714 C4.30772,2.4219 4.28129,2.35602 4.28129,2.27888 C4.28129,2.20201 4.30772,2.136 4.36058,2.08063 C4.41343,2.02539 4.47838,1.99777 4.55525,1.99777 C4.63213,1.99777 4.69826,2.02539 4.75364,2.08063 C4.80888,2.13613 4.83663,2.20201 4.83663,2.27888 C4.83648,2.35589 4.80875,2.4219 4.75364,2.47714 Z M7.79321,2.47714 C7.74025,2.53264 7.6753,2.56026 7.59856,2.56026 C7.52151,2.56026 7.4554,2.53264 7.40013,2.47714 C7.34478,2.4219 7.31716,2.35602 7.31716,2.27888 C7.31716,2.20201 7.34478,2.136 7.40013,2.08063 C7.4554,2.02539 7.52151,1.99777 7.59856,1.99777 C7.67543,1.99777 7.74022,2.02539 7.79321,2.08063 C7.84611,2.13613 7.87249,2.20201 7.87249,2.27888 C7.87249,2.35589 7.84609,2.4219 7.79321,2.47714 Z" id="Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M2.76681,8.82679 C2.76681,9.04815 2.84369,9.23553 2.99746,9.38931 C3.15137,9.54308 3.33875,9.61996 3.55996,9.61996 L4.09364,9.61996 L4.10095,11.2572 C4.10095,11.4639 4.17306,11.6394 4.31726,11.7837 C4.46147,11.9279 4.63464,12 4.83647,12 C5.0431,12 5.21864,11.9279 5.36286,11.7837 C5.50709,11.6394 5.57919,11.4639 5.57919,11.2572 L5.57919,9.62011 L6.57434,9.62011 L6.57434,11.2572 C6.57434,11.4639 6.64642,11.6394 6.79065,11.7837 C6.93488,11.9279 7.11026,12 7.31704,12 C7.52367,12 7.69921,11.9279 7.84343,11.7837 C7.98766,11.6394 8.05974,11.4639 8.05974,11.2572 L8.05974,9.62011 L8.60063,9.62011 C8.81693,9.62011 9.00191,9.54321 9.15596,9.38944 C9.30971,9.23566 9.38663,9.04828 9.38663,8.82694 L9.38663,4.02387 L2.76681,4.02387 L2.76681,8.82679 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
<path d="M10.411,3.887 C10.2091,3.887 10.036,3.95803 9.89182,4.09972 C9.74761,4.24167 9.67551,4.41603 9.67551,4.62251 L9.67551,7.72344 C9.67551,7.93046 9.74759,8.10574 9.89182,8.24996 C10.036,8.39419 10.2092,8.46629 10.411,8.46629 C10.6177,8.46629 10.7932,8.39419 10.9374,8.24996 C11.0817,8.10574 11.1537,7.93046 11.1537,7.72344 L11.1537,4.62251 C11.1537,4.41601 11.0817,4.24167 10.9374,4.09972 C10.7932,3.95803 10.6177,3.887 10.411,3.887 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Icons / Platform / Windows</title>
<g id="Icons-/-Platform-/-Windows" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<path d="M-1.42108547e-14,1.69898 L4.88896,1.03321 L4.89106,5.74899 L0.00443941,5.77679 L-1.42108547e-14,1.69903 L-1.42108547e-14,1.69898 Z M4.88662,6.29228 L4.89036,11.0122 L0.00378518,10.3403 L0.0035048,6.26064 L4.88657,6.29228 L4.88662,6.29228 Z M5.47926,0.946061 L11.9615,0 L11.9615,5.68898 L5.47926,5.74039 L5.47926,0.946108 L5.47926,0.946061 Z M11.963,6.33667 L11.9615,12 L5.47921,11.0851 L5.47015,6.32606 L11.963,6.33667 Z" id="Shape" fill="#FFFFFF" fill-rule="nonzero"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 841 B

@@ -0,0 +1,3 @@
<svg width="18" height="12" viewBox="0 0 18 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.07438 9.87142H2.3975V4.19547H1.07438V9.87142ZM1.73329 3.45112C2.14776 3.45112 2.47189 3.12983 2.47189 2.72824C2.47189 2.32128 2.14776 2 1.73329 2C1.32413 2 1 2.32129 1 2.72824C1 3.12984 1.32413 3.45112 1.73329 3.45112ZM6.80274 2.01602C4.56572 2.01602 3.16283 3.55283 3.16283 6.01068C3.16283 8.46854 4.56558 10 6.80274 10C9.03446 10 10.4373 8.46854 10.4373 6.01068C10.4373 3.55283 9.03459 2.01602 6.80274 2.01602ZM6.80274 3.19407C8.16835 3.19407 9.03976 4.28643 9.03976 6.01066C9.03976 7.72951 8.16832 8.8219 6.80274 8.8219C5.43182 8.8219 4.56572 7.72954 4.56572 6.01066C4.56572 4.28646 5.43185 3.19407 6.80274 3.19407ZM10.9955 7.69743C11.0539 9.12184 12.2123 9.99997 13.9764 9.99997C15.831 9.99997 17 9.07896 17 7.61176C17 6.4605 16.3411 5.81258 14.7842 5.45384L13.9021 5.25035C12.9616 5.02546 12.5737 4.7256 12.5737 4.21155C12.5737 3.56898 13.1582 3.1406 14.0243 3.1406C14.9011 3.1406 15.5015 3.57434 15.5653 4.29722H16.8725C16.8406 2.93712 15.7247 2.01607 14.035 2.01607C12.3664 2.01607 11.1815 2.94243 11.1815 4.31326C11.1815 5.41633 11.851 6.10175 13.2644 6.42841L14.258 6.66402C15.2251 6.89428 15.6184 7.21555 15.6184 7.77244C15.6184 8.41501 14.9754 8.87552 14.0509 8.87552C13.1157 8.87552 12.409 8.40966 12.324 7.69747H10.9955L10.9955 7.69743Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,3 @@
<svg width="37" height="12" viewBox="0 0 37 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.00003 9.87115H2.3489V6.38891C2.3489 5.70213 2.80394 5.20315 3.45401 5.20315C4.08239 5.20315 4.47244 5.59483 4.47244 6.22794V9.87102H5.78339V6.35664C5.78339 5.67524 6.22759 5.20308 6.87765 5.20308C7.53854 5.20308 7.90692 5.60012 7.90692 6.29764V9.87108H9.25579V5.97045C9.25579 4.83299 8.51364 4.07646 7.3814 4.07646C6.55257 4.07646 5.87008 4.51642 5.59369 5.2193H5.56119C5.34992 4.4896 4.77029 4.07646 3.95778 4.07646C3.17771 4.07646 2.57099 4.51107 2.32178 5.17102H2.2947V4.18377H1V9.87112L1.00003 9.87115ZM12.2084 8.95365C11.6233 8.95365 11.2333 8.65856 11.2333 8.19176C11.2333 7.74106 11.6071 7.45133 12.2571 7.4084L13.5843 7.32792V7.76253C13.5843 8.44931 12.9722 8.95366 12.2084 8.95366V8.95365ZM11.8021 9.96237C12.5388 9.96237 13.2593 9.58142 13.5898 8.96439H13.6169V9.87116H14.917V5.95433C14.917 4.81149 13.9906 4.06569 12.566 4.06569C11.1033 4.06569 10.1879 4.82759 10.1283 5.88991H11.3796C11.4663 5.41775 11.8726 5.11191 12.5118 5.11191C13.1781 5.11191 13.5844 5.4553 13.5844 6.05086V6.45864L12.0675 6.54449C10.6699 6.63034 9.88444 7.23664 9.88444 8.24537C9.88444 9.27016 10.6916 9.96231 11.8021 9.96231L11.8021 9.96237ZM20.8381 6.21187C20.746 5.01538 19.8089 4.06569 18.2921 4.06569C16.6237 4.06569 15.5402 5.20853 15.5402 7.02735C15.5402 8.87314 16.6236 9.98365 18.3029 9.98365C19.7439 9.98365 20.7352 9.14664 20.8435 7.87497H19.5705C19.4459 8.51883 19.0017 8.90514 18.3191 8.90514C17.4632 8.90514 16.9107 8.21836 16.9107 7.02721C16.9107 5.85755 17.4578 5.14929 18.3083 5.14929C19.0288 5.14929 19.4568 5.60535 19.5651 6.21165H20.8381L20.8381 6.21187ZM25.0042 2C22.7236 2 21.2934 3.53989 21.2934 6.00268C21.2934 8.46546 22.7235 10 25.0042 10C27.2794 10 28.7096 8.46546 28.7096 6.00268C28.7096 3.53989 27.2795 2 25.0042 2ZM25.0042 3.18041C26.3964 3.18041 27.2848 4.27497 27.2848 6.00265C27.2848 7.72495 26.3964 8.81954 25.0042 8.81954C23.6066 8.81954 22.7236 7.72498 22.7236 6.00265C22.7236 4.27499 23.6066 3.18041 25.0042 3.18041ZM29.2786 7.69281C29.3381 9.12007 30.5191 9.99997 32.3176 9.99997C34.2082 9.99997 35.4 9.07711 35.4 7.60696C35.4 6.4534 34.7283 5.80417 33.1411 5.44471L32.2418 5.24082C31.283 5.01548 30.8875 4.71501 30.8875 4.19993C30.8875 3.55607 31.4834 3.12684 32.3664 3.12684C33.2602 3.12684 33.8723 3.56144 33.9373 4.28577H35.27C35.2375 2.92295 34.0999 2.00004 32.3773 2.00004C30.6762 2.00004 29.4682 2.92826 29.4682 4.30185C29.4682 5.40713 30.1508 6.09392 31.5916 6.42124L32.6047 6.65733C33.5906 6.88805 33.9914 7.20997 33.9914 7.76797C33.9914 8.41183 33.336 8.87326 32.3934 8.87326C31.44 8.87326 30.7196 8.40647 30.6329 7.69285H29.2786L29.2786 7.69281Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -21,8 +21,6 @@ namespace O3DE::ProjectManager
GemCatalog::GemCatalog(ProjectManagerWindow* window)
: ScreenWidget(window)
{
ConnectSlotsAndSignals();
m_gemModel = new GemModel(this);
QVBoxLayout* vLayout = new QVBoxLayout();
@@ -56,36 +54,36 @@ namespace O3DE::ProjectManager
m_gemModel->AddGem(GemInfo("EMotion FX",
"O3DE Foundation",
"EMFX is a real-time character animation system. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
(GemInfo::Android | GemInfo::iOS | GemInfo::Windows | GemInfo::Linux),
(GemInfo::Android | GemInfo::iOS | GemInfo::macOS | GemInfo::Windows | GemInfo::Linux),
true));
m_gemModel->AddGem(O3DE::ProjectManager::GemInfo("Atom",
"O3DE Foundation",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
GemInfo::Android | GemInfo::Windows | GemInfo::Linux,
GemInfo::Android | GemInfo::Windows | GemInfo::Linux | GemInfo::macOS,
true));
m_gemModel->AddGem(O3DE::ProjectManager::GemInfo("PhysX",
"O3DE Foundation",
"O3DE London",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
GemInfo::Android | GemInfo::Linux,
GemInfo::Android | GemInfo::Linux | GemInfo::macOS,
false));
m_gemModel->AddGem(O3DE::ProjectManager::GemInfo("Certificate Manager",
"O3DE Foundation",
"O3DE Irvine",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
GemInfo::Windows,
false));
m_gemModel->AddGem(O3DE::ProjectManager::GemInfo("Cloud Gem Framework",
"O3DE Foundation",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"O3DE Seattle",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
GemInfo::iOS | GemInfo::Linux,
false));
m_gemModel->AddGem(O3DE::ProjectManager::GemInfo("Achievements",
"O3DE Foundation",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
GemInfo::Android | GemInfo::Windows | GemInfo::Linux,
false));
}
@@ -26,11 +26,12 @@ namespace O3DE::ProjectManager
public:
enum Platform
{
Android = 0x0,
iOS = 0x1,
Linux = 0x2,
macOS = 0x3,
Windows = 0x4
Android = 1 << 0,
iOS = 1 << 1,
Linux = 1 << 2,
macOS = 1 << 3,
Windows = 1 << 4,
NumPlatforms = 5
};
Q_DECLARE_FLAGS(Platforms, Platform)
@@ -22,6 +22,18 @@ namespace O3DE::ProjectManager
: QStyledItemDelegate(parent)
, m_gemModel(gemModel)
{
AddPlatformIcon(GemInfo::Android, ":/Resources/Android.svg");
AddPlatformIcon(GemInfo::iOS, ":/Resources/iOS.svg");
AddPlatformIcon(GemInfo::Linux, ":/Resources/Linux.svg");
AddPlatformIcon(GemInfo::macOS, ":/Resources/macOS.svg");
AddPlatformIcon(GemInfo::Windows, ":/Resources/Windows.svg");
}
void GemItemDelegate::AddPlatformIcon(GemInfo::Platform platform, const QString& iconPath)
{
QPixmap pixmap(iconPath);
qreal aspectRatio = static_cast<qreal>(pixmap.width()) / pixmap.height();
m_platformIcons.insert(platform, QIcon(iconPath).pixmap(s_platformIconSize * aspectRatio, s_platformIconSize));
}
void GemItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& modelIndex) const
@@ -87,7 +99,7 @@ namespace O3DE::ProjectManager
painter->drawText(gemCreatorRect, Qt::TextSingleLine, gemCreator);
// Gem summary
const QSize summarySize = QSize(contentRect.width() - s_summaryStartX - s_itemMargins.right() * 4, contentRect.height());
const QSize summarySize = QSize(contentRect.width() - s_summaryStartX - s_buttonWidth - s_itemMargins.right() * 4, contentRect.height());
const QRect summaryRect = QRect(/*topLeft=*/QPoint(contentRect.left() + s_summaryStartX, contentRect.top()), summarySize);
painter->setFont(standardFont);
@@ -96,6 +108,10 @@ namespace O3DE::ProjectManager
const QString summary = m_gemModel->GetSummary(modelIndex);
painter->drawText(summaryRect, Qt::AlignLeft | Qt::TextWordWrap, summary);
DrawButton(painter, contentRect, modelIndex);
DrawPlatformIcons(painter, contentRect, modelIndex);
painter->restore();
}
@@ -105,7 +121,7 @@ namespace O3DE::ProjectManager
initStyleOption(&options, modelIndex);
int marginsHorizontal = s_itemMargins.left() + s_itemMargins.right() + s_contentMargins.left() + s_contentMargins.right();
return QSize(marginsHorizontal + s_summaryStartX, s_height);
return QSize(marginsHorizontal + s_buttonWidth + s_summaryStartX, s_height);
}
bool GemItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& modelIndex)
@@ -132,4 +148,85 @@ namespace O3DE::ProjectManager
font.setPixelSize(fontSize);
return QFontMetrics(font).boundingRect(text);
}
QRect GemItemDelegate::CalcButtonRect(const QRect& contentRect) const
{
const QPoint topLeft = QPoint(contentRect.right() - s_buttonWidth - s_itemMargins.right(), contentRect.top() + contentRect.height() / 2 - s_buttonHeight / 2);
const QSize size = QSize(s_buttonWidth, s_buttonHeight);
return QRect(topLeft, size);
}
void GemItemDelegate::DrawPlatformIcons(QPainter* painter, const QRect& contentRect, const QModelIndex& modelIndex) const
{
const GemInfo::Platforms platforms = m_gemModel->GetPlatforms(modelIndex);
int startX = 0;
// Iterate and draw the platforms in the order they are defined in the enum.
for (int i = 0; i < GemInfo::NumPlatforms; ++i)
{
// Check if the platform is supported by the given gem.
const GemInfo::Platform platform = static_cast<GemInfo::Platform>(1 << i);
if (platforms & platform)
{
// Get the icon for the platform and draw it.
const auto iterator = m_platformIcons.find(platform);
if (iterator != m_platformIcons.end())
{
const QPixmap& pixmap = iterator.value();
painter->drawPixmap(contentRect.left() + startX, contentRect.bottom() - s_platformIconSize, pixmap);
qreal aspectRatio = static_cast<qreal>(pixmap.width()) / pixmap.height();
startX += s_platformIconSize * aspectRatio + s_platformIconSize / 2.5;
}
}
}
}
void GemItemDelegate::DrawButton(QPainter* painter, const QRect& contentRect, const QModelIndex& modelIndex) const
{
painter->save();
const QRect buttonRect = CalcButtonRect(contentRect);
QPoint circleCenter;
QString buttonText;
const bool isAdded = m_gemModel->IsAdded(modelIndex);
if (isAdded)
{
painter->setBrush(m_buttonEnabledColor);
painter->setPen(m_buttonEnabledColor);
circleCenter = buttonRect.center() + QPoint(buttonRect.width() / 2 - s_buttonBorderRadius, 1);
buttonText = "Added";
}
else
{
circleCenter = buttonRect.center() + QPoint(-buttonRect.width() / 2 + s_buttonBorderRadius + 1, 1);
buttonText = "Get";
}
// Rounded rect
painter->drawRoundedRect(buttonRect, s_buttonBorderRadius, s_buttonBorderRadius);
// Text
QFont font;
QRect textRect = GetTextRect(font, buttonText, s_buttonFontSize);
if (isAdded)
{
textRect = QRect(buttonRect.left(), buttonRect.top(), buttonRect.width() - s_buttonCircleRadius * 2.0, buttonRect.height());
}
else
{
textRect = QRect(buttonRect.left() + s_buttonCircleRadius * 2.0, buttonRect.top(), buttonRect.width() - s_buttonCircleRadius * 2.0, buttonRect.height());
}
font.setPixelSize(s_buttonFontSize);
painter->setFont(font);
painter->setPen(m_textColor);
painter->drawText(textRect, Qt::AlignCenter, buttonText);
// Circle
painter->setBrush(m_textColor);
painter->drawEllipse(circleCenter, s_buttonCircleRadius, s_buttonCircleRadius);
painter->restore();
}
} // namespace O3DE::ProjectManager
@@ -16,6 +16,7 @@
#include <QStyledItemDelegate>
#include "GemInfo.h"
#include "GemModel.h"
#include <QHash>
#endif
QT_FORWARD_DECLARE_CLASS(QEvent)
@@ -38,6 +39,9 @@ namespace O3DE::ProjectManager
private:
void CalcRects(const QStyleOptionViewItem& option, const QModelIndex& modelIndex, QRect& outFullRect, QRect& outItemRect, QRect& outContentRect) const;
QRect GetTextRect(QFont& font, const QString& text, qreal fontSize) const;
QRect CalcButtonRect(const QRect& contentRect) const;
void DrawPlatformIcons(QPainter* painter, const QRect& contentRect, const QModelIndex& modelIndex) const;
void DrawButton(QPainter* painter, const QRect& contentRect, const QModelIndex& modelIndex) const;
GemModel* m_gemModel = nullptr;
@@ -47,9 +51,10 @@ namespace O3DE::ProjectManager
const QColor m_backgroundColor = QColor("#333333"); // Outside of the actual gem item
const QColor m_itemBackgroundColor = QColor("#404040"); // Background color of the gem item
const QColor m_borderColor = QColor("#1E70EB");
const QColor m_buttonEnabledColor = QColor("#00B931");
// Item
inline constexpr static int s_height = 140; // Gem item total height
inline constexpr static int s_height = 135; // Gem item total height
inline constexpr static qreal s_gemNameFontSize = 16.0;
inline constexpr static qreal s_fontSize = 15.0;
inline constexpr static int s_summaryStartX = 200;
@@ -58,5 +63,17 @@ namespace O3DE::ProjectManager
inline constexpr static QMargins s_itemMargins = QMargins(/*left=*/20, /*top=*/10, /*right=*/20, /*bottom=*/10); // Item border distances
inline constexpr static QMargins s_contentMargins = QMargins(/*left=*/15, /*top=*/12, /*right=*/12, /*bottom=*/12); // Distances of the elements within an item to the item borders
inline constexpr static int s_borderWidth = 4;
// Button
inline constexpr static int s_buttonWidth = 70;
inline constexpr static int s_buttonHeight = 24;
inline constexpr static int s_buttonBorderRadius = 12;
inline constexpr static int s_buttonCircleRadius = s_buttonBorderRadius - 3;
inline constexpr static qreal s_buttonFontSize = 12.0;
// Platform icons
void AddPlatformIcon(GemInfo::Platform platform, const QString& iconPath);
inline constexpr static int s_platformIconSize = 16;
QHash<GemInfo::Platform, QPixmap> m_platformIcons;
};
} // namespace O3DE::ProjectManager
@@ -55,7 +55,7 @@ namespace O3DE::ProjectManager
return modelIndex.data(RoleCreator).toString();
}
int GemModel::GetPlatforms(const QModelIndex& modelIndex) const
GemInfo::Platforms GemModel::GetPlatforms(const QModelIndex& modelIndex) const
{
return static_cast<GemInfo::Platforms>(modelIndex.data(RolePlatforms).toInt());
}
@@ -34,7 +34,7 @@ namespace O3DE::ProjectManager
QString GetName(const QModelIndex& modelIndex) const;
QString GetCreator(const QModelIndex& modelIndex) const;
int GetPlatforms(const QModelIndex& modelIndex) const;
GemInfo::Platforms GetPlatforms(const QModelIndex& modelIndex) const;
QString GetSummary(const QModelIndex& modelIndex) const;
bool IsAdded(const QModelIndex& modelIndex) const;
@@ -1,8 +1,13 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<RCC>
<qresource prefix="/">
<file>Resources/ProjectManager.qss</file>
<file>Resources/Add.svg</file>
<file>Resources/Select_Folder.svg</file>
<file>Resources/o3de_editor.ico</file>
<file>Resources/Windows.svg</file>
<file>Resources/Android.svg</file>
<file>Resources/iOS.svg</file>
<file>Resources/Linux.svg</file>
<file>Resources/macOS.svg</file>
</qresource>
</RCC>
</RCC>
@@ -151,7 +151,7 @@ namespace AZ
SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
if (serializeContext)
{
serializeContext->Class<AssImpAnimationImporter, SceneCore::LoadingComponent>()->Version(2); // [LYN-2281] Skinned mesh loading fixes
serializeContext->Class<AssImpAnimationImporter, SceneCore::LoadingComponent>()->Version(3); // [LYN-3349] Rolling back rotation change
}
}
@@ -306,7 +306,7 @@ namespace AZ
for (const RPI::ViewPtr& view : packet.m_views)
{
if (m_renderPipelineIdsForPersistentView.find(view.get()) != m_renderPipelineIdsForPersistentView.end() &&
(view->GetUsageFlags() & RPI::View::UsageCamera))
(RHI::CheckBitsAny(view->GetUsageFlags(), RPI::View::UsageCamera | RPI::View::UsageReflectiveCubeMap)))
{
RPI::ShaderResourceGroup* viewSrg = view->GetShaderResourceGroup().get();
@@ -69,9 +69,8 @@ namespace AZ
if (m_shouldUpdatePassParameters)
{
auto* passSystem = AZ::RPI::PassSystemInterface::Get();
UpdateEyeAdaptationPass(passSystem);
UpdateLuminanceHeatmap(passSystem);
UpdateEyeAdaptationPass();
UpdateLuminanceHeatmap();
m_shouldUpdatePassParameters = false;
}
@@ -140,7 +139,8 @@ namespace AZ
if (m_heatmapEnabled != value)
{
m_heatmapEnabled = value;
m_shouldUpdatePassParameters = true;
// Update immediately so that the ExposureControlSettings can just be turned off and killed without having to wait for another Simulate() call
UpdateLuminanceHeatmap();
}
}
@@ -198,8 +198,10 @@ namespace AZ
}
}
void ExposureControlSettings::UpdateEyeAdaptationPass(RPI::PassSystemInterface* passSystem)
void ExposureControlSettings::UpdateEyeAdaptationPass()
{
auto* passSystem = AZ::RPI::PassSystemInterface::Get();
// [GFX-TODO][ATOM-13224] Remove UpdateLuminanceHeatmap and UpdateEyeAdaptationPass
auto passTemplateName = m_eyeAdaptationPassTemplateNameId;
@@ -220,8 +222,10 @@ namespace AZ
}
}
void ExposureControlSettings::UpdateLuminanceHeatmap(RPI::PassSystemInterface* passSystem)
void ExposureControlSettings::UpdateLuminanceHeatmap()
{
auto* passSystem = AZ::RPI::PassSystemInterface::Get();
// [GFX-TODO][ATOM-13194] Support multiple views for the luminance heatmap
// [GFX-TODO][ATOM-13224] Remove UpdateLuminanceHeatmap and UpdateEyeAdaptationPass
const RPI::Ptr<RPI::Pass> luminanceHeatmap = passSystem->GetRootPass()->FindPassByNameRecursive(m_luminanceHeatmapNameId);
@@ -84,8 +84,8 @@ namespace AZ
void UpdateExposureControlRelatedPassParameters();
void UpdateLuminanceHeatmap(RPI::PassSystemInterface* passSystem);
void UpdateEyeAdaptationPass(RPI::PassSystemInterface* passSystem);
void UpdateLuminanceHeatmap();
void UpdateEyeAdaptationPass();
PostProcessSettings* m_parentSettings = nullptr;
bool m_shouldUpdatePassParameters = true;
@@ -99,6 +99,9 @@ namespace AtomToolsFramework
AZStd::optional<AzToolsFramework::ViewportInteraction::ProjectedViewportRay> ViewportScreenToWorldRay(
const AzFramework::ScreenPoint& screenPosition) override;
//! Set interface for providing viewport specific settings (e.g. snapping properties).
void SetViewportSettings(AzToolsFramework::ViewportInteraction::ViewportSettings* viewportSettings);
// AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler ...
void BeginCursorCapture() override;
void EndCursorCapture() override;
@@ -156,5 +159,7 @@ namespace AtomToolsFramework
bool m_capturingCursor = false;
// The last known position of the mouse cursor, if one is available.
AZStd::optional<QPoint> m_lastCursorPosition;
// The viewport settings (e.g. grid snapping, grid size) for this viewport.
const AzToolsFramework::ViewportInteraction::ViewportSettings* m_viewportSettings = nullptr;
};
} //namespace AtomToolsFramework
@@ -384,27 +384,32 @@ namespace AtomToolsFramework
bool RenderViewportWidget::GridSnappingEnabled()
{
return false;
return m_viewportSettings ? m_viewportSettings->GridSnappingEnabled() : false;
}
float RenderViewportWidget::GridSize()
{
return 0.0f;
return m_viewportSettings ? m_viewportSettings->GridSize() : 0.0f;
}
bool RenderViewportWidget::ShowGrid()
{
return false;
return m_viewportSettings ? m_viewportSettings->ShowGrid() : false;
}
bool RenderViewportWidget::AngleSnappingEnabled()
{
return false;
return m_viewportSettings ? m_viewportSettings->AngleSnappingEnabled() : false;
}
float RenderViewportWidget::AngleStep()
{
return 0.0f;
return m_viewportSettings ? m_viewportSettings->AngleStep() : 0.0f;
}
void RenderViewportWidget::SetViewportSettings(AzToolsFramework::ViewportInteraction::ViewportSettings* viewportSettings)
{
m_viewportSettings = viewportSettings;
}
AzFramework::ScreenPoint RenderViewportWidget::ViewportWorldToScreen(const AZ::Vector3& worldPosition)
@@ -31,6 +31,7 @@
#include <Atom/Document/MaterialDocumentSystemRequestBus.h>
#include <WIndow/MaterialEditorBrowserInteractions.h>
#include <Window/CreateMaterialDialog/CreateMaterialDialog.h>
#include <Atom/RPI.Reflect/Material/MaterialAsset.h>
#include <Atom/RPI.Edit/Material/MaterialSourceData.h>
@@ -248,6 +249,24 @@ namespace MaterialEditor
}
}
});
menu->addSeparator();
QAction* createMaterialAction = menu->addAction(QObject::tr("Create Material..."));
QObject::connect(createMaterialAction, &QAction::triggered, caller, [caller, entry]()
{
CreateMaterialDialog createDialog(entry->GetFullPath().c_str(), caller);
createDialog.adjustSize();
if (createDialog.exec() == QDialog::Accepted &&
!createDialog.m_materialFileInfo.absoluteFilePath().isEmpty() &&
!createDialog.m_materialTypeFileInfo.absoluteFilePath().isEmpty())
{
MaterialDocumentSystemRequestBus::Broadcast(&MaterialDocumentSystemRequestBus::Events::CreateDocumentFromFile,
createDialog.m_materialTypeFileInfo.absoluteFilePath().toUtf8().constData(),
createDialog.m_materialFileInfo.absoluteFilePath().toUtf8().constData());
}
});
}
void MaterialEditorBrowserInteractions::AddPerforceMenuActions([[maybe_unused]] QWidget* caller, QMenu* menu, const AzToolsFramework::AssetBrowser::AssetBrowserEntry* entry)
@@ -88,6 +88,9 @@ namespace AZ
{
ExposureControlRequestBus::Handler::BusDisconnect(m_entityId);
m_configuration.SetHeatmapEnabled(false);
OnConfigChanged();
if (m_postProcessInterface)
{
m_postProcessInterface->RemoveExposureControlSettingsInterface();
@@ -543,7 +543,7 @@ namespace EditorPythonBindings
{
if (!oldPathSet.contains(thisStr))
{
pathAppend.append(AZStd::string::format("sys.path.append('%s')\n", thisStr.c_str()));
pathAppend.append(AZStd::string::format("sys.path.append(r'%s')\n", thisStr.c_str()));
appended = true;
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ ly_associate_package(PACKAGE_NAME zlib-1.2.8-rev2-multiplatform TARG
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME hdf5-1.0.11-rev2-multiplatform TARGETS hdf5 PACKAGE_HASH 11d5e04df8a93f8c52a5684a4cacbf0d9003056360983ce34f8d7b601082c6bd)
ly_associate_package(PACKAGE_NAME alembic-1.7.11-rev3-multiplatform TARGETS alembic PACKAGE_HASH ba7a7d4943dd752f5a662374f6c48b93493df1d8e2c5f6a8d101f3b50700dd25)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev8-multiplatform TARGETS assimplib PACKAGE_HASH 21dce424eccf5a2626ff0841e72092fa4ff9407a64b851e5eed9895926ce309d)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev7-multiplatform TARGETS assimplib PACKAGE_HASH def855c89d8210db3040f1cb6ec837141ab9b8e74c158eae7c03d50160fcf30b)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
+1 -1
View File
@@ -14,7 +14,7 @@ ly_associate_package(PACKAGE_NAME zlib-1.2.8-rev2-multiplatform
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME hdf5-1.0.11-rev2-multiplatform TARGETS hdf5 PACKAGE_HASH 11d5e04df8a93f8c52a5684a4cacbf0d9003056360983ce34f8d7b601082c6bd)
ly_associate_package(PACKAGE_NAME alembic-1.7.11-rev3-multiplatform TARGETS alembic PACKAGE_HASH ba7a7d4943dd752f5a662374f6c48b93493df1d8e2c5f6a8d101f3b50700dd25)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev8-multiplatform TARGETS assimplib PACKAGE_HASH 21dce424eccf5a2626ff0841e72092fa4ff9407a64b851e5eed9895926ce309d)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev7-multiplatform TARGETS assimplib PACKAGE_HASH def855c89d8210db3040f1cb6ec837141ab9b8e74c158eae7c03d50160fcf30b)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
@@ -14,7 +14,7 @@ ly_associate_package(PACKAGE_NAME zlib-1.2.8-rev2-multiplatform
ly_associate_package(PACKAGE_NAME ilmbase-2.3.0-rev4-multiplatform TARGETS ilmbase PACKAGE_HASH 97547fdf1fbc4d81b8ccf382261f8c25514ed3b3c4f8fd493f0a4fa873bba348)
ly_associate_package(PACKAGE_NAME hdf5-1.0.11-rev2-multiplatform TARGETS hdf5 PACKAGE_HASH 11d5e04df8a93f8c52a5684a4cacbf0d9003056360983ce34f8d7b601082c6bd)
ly_associate_package(PACKAGE_NAME alembic-1.7.11-rev3-multiplatform TARGETS alembic PACKAGE_HASH ba7a7d4943dd752f5a662374f6c48b93493df1d8e2c5f6a8d101f3b50700dd25)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev8-multiplatform TARGETS assimplib PACKAGE_HASH 21dce424eccf5a2626ff0841e72092fa4ff9407a64b851e5eed9895926ce309d)
ly_associate_package(PACKAGE_NAME assimp-5.0.1-rev7-multiplatform TARGETS assimplib PACKAGE_HASH def855c89d8210db3040f1cb6ec837141ab9b8e74c158eae7c03d50160fcf30b)
ly_associate_package(PACKAGE_NAME squish-ccr-20150601-rev3-multiplatform TARGETS squish-ccr PACKAGE_HASH c878c6c0c705e78403c397d03f5aa7bc87e5978298710e14d09c9daf951a83b3)
ly_associate_package(PACKAGE_NAME ASTCEncoder-2017_11_14-rev2-multiplatform TARGETS ASTCEncoder PACKAGE_HASH c240ffc12083ee39a5ce9dc241de44d116e513e1e3e4cc1d05305e7aa3bdc326)
ly_associate_package(PACKAGE_NAME md5-2.0-multiplatform TARGETS md5 PACKAGE_HASH 29e52ad22c78051551f78a40c2709594f0378762ae03b417adca3f4b700affdf)
+9 -1
View File
@@ -13,7 +13,13 @@ if(NOT PAL_TRAIT_BUILD_CPACK_SUPPORTED)
return()
endif()
set(CPACK_GENERATOR "ZIP")
ly_get_absolute_pal_filename(pal_dir ${CMAKE_SOURCE_DIR}/cmake/Platform/${PAL_HOST_PLATFORM_NAME})
include(${pal_dir}/Packaging_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake)
# if we get here and the generator hasn't been set, then a non fatal error occurred disabling packaging support
if(NOT CPACK_GENERATOR)
return()
endif()
set(CPACK_PACKAGE_VENDOR "${PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}")
@@ -27,6 +33,8 @@ set(DEFAULT_LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt")
set(CPACK_RESOURCE_FILE_LICENSE ${DEFAULT_LICENSE_FILE})
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_VENDOR}/${CPACK_PACKAGE_VERSION}")
# IMPORTANT: required to be included AFTER setting all property overrides
include(CPack REQUIRED)
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<?include "cpack_variables.wxi"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" @CPACK_WIX_CUSTOM_XMLNS_EXPANDED@
RequiredVersion="3.6.3303.0">
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
Name="$(var.CPACK_PACKAGE_NAME)"
Language="1033"
Version="$(var.CPACK_PACKAGE_VERSION)"
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
<Package InstallerVersion="301" Compressed="yes"/>
<!-- auto distribute the installable files across N cab files and embed them in the final MSI -->
<MediaTemplate EmbedCab="yes"/>
<MajorUpgrade
Schedule="afterInstallInitialize"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
<?endif?>
<FeatureRef Id="ProductFeature"/>
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
</Product>
</Wix>
@@ -0,0 +1,92 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(LY_WIX_PATH "" CACHE PATH "Path to the WiX install path")
if(LY_WIX_PATH)
file(TO_CMAKE_PATH ${LY_QTIFW_PATH} CPACK_WIX_ROOT)
elseif(DEFINED ENV{WIX})
file(TO_CMAKE_PATH $ENV{WIX} CPACK_WIX_ROOT)
endif()
if(CPACK_WIX_ROOT)
if(NOT EXISTS ${CPACK_WIX_ROOT})
message(FATAL_ERROR "Invalid path supplied for LY_WIX_PATH argument or WIX environment variable")
endif()
else()
# early out as no path to WiX has been supplied effectively disabling support
return()
endif()
set(CPACK_GENERATOR "WIX")
# CPack will generate the WiX product/upgrade GUIDs further down the chain if they weren't supplied
# however, they are unique for each run. instead, let's do the auto generation here and add it to
# the cache for run persistence. an additional cache file will be used to store the information on
# the original generation so we still have the ability to detect if they are still being used.
set(_guid_cache_file "${CMAKE_BINARY_DIR}/installer/wix_guid_cache.cmake")
if(NOT EXISTS ${_guid_cache_file})
set(_wix_guid_namespace "6D43F57A-2917-4AD9-B758-1F13CDB08593")
# based the ISO-8601 standard (YYYY-MM-DDTHH-mm-ssTZD) e.g., 20210506145533
string(TIMESTAMP _guid_gen_timestamp "%Y%m%d%H%M%S")
file(WRITE ${_guid_cache_file} "set(_wix_guid_gen_timestamp ${_guid_gen_timestamp})\n")
string(UUID _default_product_guid
NAMESPACE ${_wix_guid_namespace}
NAME "ProductID_${_guid_gen_timestamp}"
TYPE SHA1
UPPER
)
file(APPEND ${_guid_cache_file} "set(_wix_default_product_guid ${_default_product_guid})\n")
string(UUID _default_upgrade_guid
NAMESPACE ${_wix_guid_namespace}
NAME "UpgradeCode_${_guid_gen_timestamp}"
TYPE SHA1
UPPER
)
file(APPEND ${_guid_cache_file} "set(_wix_default_upgrade_guid ${_default_upgrade_guid})\n")
endif()
include(${_guid_cache_file})
set(LY_WIX_PRODUCT_GUID "${_wix_default_product_guid}" CACHE STRING "GUID for the Product ID field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(LY_WIX_UPGRADE_GUID "${_wix_default_upgrade_guid}" CACHE STRING "GUID for the Upgrade Code field. Format: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
set(_uses_default_product_guid FALSE)
if(NOT LY_WIX_PRODUCT_GUID OR LY_WIX_PRODUCT_GUID STREQUAL ${_wix_default_product_guid})
set(_uses_default_product_guid TRUE)
set(LY_WIX_PRODUCT_GUID ${_wix_default_product_guid})
endif()
set(_uses_default_upgrade_guid FALSE)
if(NOT LY_WIX_UPGRADE_GUID OR LY_WIX_UPGRADE_GUID STREQUAL ${_wix_default_upgrade_guid})
set(_uses_default_upgrade_guid TRUE)
set(LY_WIX_UPGRADE_GUID ${_wix_default_upgrade_guid})
endif()
if(_uses_default_product_guid OR _uses_default_upgrade_guid)
message(STATUS "One or both WiX GUIDs were auto generated. It is recommended you supply your own GUIDs through LY_WIX_PRODUCT_GUID and LY_WIX_UPGRADE_GUID.")
if(_uses_default_product_guid)
message(STATUS "-> Default LY_WIX_PRODUCT_GUID = ${LY_WIX_PRODUCT_GUID}")
endif()
if(_uses_default_upgrade_guid)
message(STATUS "-> Default LY_WIX_UPGRADE_GUID = ${LY_WIX_UPGRADE_GUID}")
endif()
endif()
set(CPACK_WIX_PRODUCT_GUID ${LY_WIX_PRODUCT_GUID})
set(CPACK_WIX_UPGRADE_GUID ${LY_WIX_UPGRADE_GUID})
set(CPACK_WIX_TEMPLATE "${CMAKE_SOURCE_DIR}/cmake/Platform/Windows/PackagingTemplate.wxs.in")
@@ -23,4 +23,6 @@ set(FILES
PAL_windows.cmake
PALDetection_windows.cmake
Install_windows.cmake
Packaging_windows.cmake
PackagingTemplate.wxs.in
)
@@ -27,7 +27,8 @@
},
"debug": {
"TAGS":[
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND":"../Windows/build_ninja_windows.cmd",
@@ -67,7 +68,8 @@
},
"profile_nounity": {
"TAGS":[
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND":"../Windows/build_ninja_windows.cmd",
@@ -83,7 +85,9 @@
"asset_profile": {
"TAGS":[
"default",
"weekly-build-metrics"
"weekly-build-metrics",
"nightly-incremental",
"nightly-clean"
],
"COMMAND":"../Windows/build_asset_windows.cmd",
"PARAMETERS": {
@@ -98,21 +102,10 @@
"ASSET_PROCESSOR_PLATFORMS":"es3"
}
},
"asset_clean_profile": {
"TAGS":[
"nightly"
],
"PIPELINE_ENV": {
"CLEAN_ASSETS": "1"
},
"steps": [
"clean",
"asset_profile"
]
},
"release": {
"TAGS":[
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND":"../Windows/build_ninja_windows.cmd",
@@ -127,7 +120,8 @@
},
"monolithic_release": {
"TAGS":[
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND":"../Windows/build_ninja_windows.cmd",
@@ -13,6 +13,9 @@
},
"packaging": {
"CLEAN_WORKSPACE": true
},
"nightly-clean": {
"CLEAN_WORKSPACE": true
}
}
}
+17 -21
View File
@@ -29,7 +29,8 @@
},
"debug": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_linux.sh",
@@ -43,9 +44,10 @@
},
"profile": {
"TAGS": [
"nightly",
"daily-pipeline-metrics",
"weekly-build-metrics"
"nightly-incremental",
"nightly-clean",
"daily-pipeline-metrics",
"weekly-build-metrics"
],
"COMMAND": "build_linux.sh",
"PARAMETERS": {
@@ -98,7 +100,9 @@
},
"asset_profile": {
"TAGS": [
"weekly-build-metrics"
"weekly-build-metrics",
"nightly-incremental",
"nightly-clean"
],
"COMMAND": "build_asset_linux.sh",
"PARAMETERS": {
@@ -126,21 +130,10 @@
"ASSET_PROCESSOR_PLATFORMS": "pc,server"
}
},
"asset_clean_profile": {
"TAGS": [
"nightly"
],
"PIPELINE_ENV": {
"CLEAN_ASSETS": "1"
},
"steps": [
"clean",
"asset_profile"
]
},
"periodic_test_profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_linux.sh",
@@ -155,7 +148,8 @@
},
"benchmark_test_profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_linux.sh",
@@ -170,7 +164,8 @@
},
"release": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_linux.sh",
@@ -184,7 +179,8 @@
},
"monolithic_release": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_linux.sh",
@@ -12,6 +12,9 @@
},
"packaging": {
"CLEAN_WORKSPACE": true
},
"nightly-clean": {
"CLEAN_WORKSPACE": true
}
}
}
+17 -20
View File
@@ -9,7 +9,8 @@
},
"profile_pipe": {
"TAGS": [
"nightly"
"nightly-incremental",
"nightly-clean"
],
"steps": [
"profile",
@@ -28,7 +29,8 @@
},
"debug": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_mac.sh",
@@ -56,7 +58,8 @@
},
"profile_nounity": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_mac.sh",
@@ -70,7 +73,9 @@
},
"asset_profile": {
"TAGS": [
"weekly-build-metrics"
"weekly-build-metrics",
"nightly-incremental",
"nightly-clean"
],
"COMMAND": "build_asset_mac.sh",
"PARAMETERS": {
@@ -84,21 +89,10 @@
"ASSET_PROCESSOR_PLATFORMS": "osx_gl"
}
},
"asset_clean_profile": {
"TAGS": [
"nightly"
],
"PIPELINE_ENV": {
"CLEAN_ASSETS": "1"
},
"steps": [
"clean",
"asset_profile"
]
},
"periodic_test_profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_mac.sh",
@@ -113,7 +107,8 @@
},
"benchmark_test_profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_mac.sh",
@@ -128,7 +123,8 @@
},
"release": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_mac.sh",
@@ -142,7 +138,8 @@
},
"monolithic_release": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_mac.sh",
+3
View File
@@ -12,6 +12,9 @@
},
"packaging": {
"CLEAN_WORKSPACE": true
},
"nightly-clean": {
"CLEAN_WORKSPACE": true
}
}
}
@@ -17,7 +17,8 @@
},
"debug_vs2019_pipe": {
"TAGS": [
"nightly"
"nightly-incremental",
"nightly-clean"
],
"steps": [
"debug_vs2019",
@@ -125,7 +126,8 @@
},
"profile_vs2019_nounity": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_windows.cmd",
@@ -157,10 +159,11 @@
},
"test_gpu_profile_vs2019": {
"TAGS":[
"nightly"
"nightly-incremental",
"nightly-clean"
],
"PIPELINE_ENV":{
"NODE_LABEL":"windows-gpu"
"NODE_LABEL":"windows-gpu"
},
"COMMAND": "build_test_windows.cmd",
"PARAMETERS": {
@@ -176,7 +179,9 @@
},
"asset_profile_vs2019": {
"TAGS": [
"weekly-build-metrics"
"weekly-build-metrics",
"nightly-incremental",
"nightly-clean"
],
"COMMAND": "build_asset_windows.cmd",
"PARAMETERS": {
@@ -191,21 +196,10 @@
"ASSET_PROCESSOR_PLATFORMS": "pc,server"
}
},
"asset_clean_profile_vs2019": {
"TAGS": [
"nightly"
],
"PIPELINE_ENV": {
"CLEAN_ASSETS": "1"
},
"steps": [
"clean",
"asset_profile_vs2019"
]
},
"periodic_test_profile_vs2019": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_windows.cmd",
@@ -222,7 +216,8 @@
},
"sandbox_test_profile_vs2019": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"PIPELINE_ENV": {
@@ -242,7 +237,8 @@
},
"benchmark_test_profile_vs2019": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_test_windows.cmd",
@@ -259,7 +255,8 @@
},
"release_vs2019": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_windows.cmd",
@@ -274,7 +271,8 @@
},
"monolithic_release_vs2019": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "build_windows.cmd",
@@ -289,7 +287,8 @@
},
"install_profile_vs2019": {
"TAGS": [
"nightly"
"nightly-incremental",
"nightly-clean"
],
"COMMAND": "build_windows.cmd",
"PARAMETERS": {
@@ -12,6 +12,9 @@
},
"packaging": {
"CLEAN_WORKSPACE": true
},
"nightly-clean": {
"CLEAN_WORKSPACE": true
}
}
}
+10 -17
View File
@@ -19,7 +19,8 @@
},
"debug": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "../Mac/build_mac.sh",
@@ -34,7 +35,8 @@
},
"profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"daily-pipeline-metrics",
"weekly-build-metrics"
],
@@ -50,7 +52,8 @@
},
"profile_nounity": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "../Mac/build_mac.sh",
@@ -65,7 +68,8 @@
},
"asset_profile": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "../Mac/build_asset_mac.sh",
@@ -80,21 +84,10 @@
"ASSET_PROCESSOR_PLATFORMS": "ios"
}
},
"asset_clean_profile": {
"TAGS": [
"nightly"
],
"PIPELINE_ENV": {
"CLEAN_ASSETS": "true"
},
"steps": [
"clean",
"asset_profile"
]
},
"release": {
"TAGS": [
"nightly",
"nightly-incremental",
"nightly-clean",
"weekly-build-metrics"
],
"COMMAND": "../Mac/build_mac.sh",
+3
View File
@@ -12,6 +12,9 @@
},
"packaging": {
"CLEAN_WORKSPACE": true
},
"nightly-clean": {
"CLEAN_WORKSPACE": true
}
}
}