Merge branch 'development' into bug-ragdoll-77

monroegm-disable-blank-issue-2
T.J. McGrath-Daly 4 years ago
commit f194841176

@ -19,8 +19,8 @@
<RemoteProcedure Name="AutonomousToAuthorityNoParams" InvokeFrom="Autonomous" HandleOn="Authority" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" />
<RemoteProcedure Name="AuthorityToAutonomous" InvokeFrom="Authority" HandleOn="Autonomous" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" >
<Param Type="float" Name="SomeFloat" />
<RemoteProcedure Name="AuthorityToAutonomous_PlayerNumber" InvokeFrom="Authority" HandleOn="Autonomous" IsPublic="false" IsReliable="true" GenerateEventBindings="true" Description="" >
<Param Type="int" Name="player_number" />
</RemoteProcedure>
<RemoteProcedure Name="AuthorityToAutonomousNoParams" InvokeFrom="Authority" HandleOn="Autonomous" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" />
@ -29,10 +29,10 @@
<Param Type="float" Name="SomeFloat" />
</RemoteProcedure>
<RemoteProcedure Name="AuthorityToClientNoParams" InvokeFrom="Authority" HandleOn="Client" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" />
<RemoteProcedure Name="AuthorityToClientNoParams_PlayFx" InvokeFrom="Authority" HandleOn="Client" IsPublic="false" IsReliable="true" GenerateEventBindings="true" Description="" />
<RemoteProcedure Name="ServerToAuthority" InvokeFrom="Server" HandleOn="Authority" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" >
<Param Type="float" Name="SomeFloat" />
<RemoteProcedure Name="ServerToAuthority_DealDamage" InvokeFrom="Server" HandleOn="Authority" IsPublic="false" IsReliable="true" GenerateEventBindings="true" Description="" >
<Param Type="float" Name="damage" />
</RemoteProcedure>
<RemoteProcedure Name="ServerToAuthorityNoParam" InvokeFrom="Server" HandleOn="Authority" IsPublic="false" IsReliable="false" GenerateEventBindings="true" Description="" />

@ -101,30 +101,56 @@ class TestHelper:
Report.critical_result(msgtuple_success_fail, general.is_in_game_mode())
@staticmethod
def multiplayer_enter_game_mode(msgtuple_success_fail: Tuple[str, str], sv_default_player_spawn_asset: str) -> None:
def find_line(window, line, print_infos):
"""
:param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode.
:param sv_default_player_spawn_asset: The path to the network player prefab that will be automatically spawned upon entering gamemode. The engine default is "prefabs/player.network.spawnable"
Looks for an expected line in a list of tracer log lines
:param window: The log's window name. For example, logs printed via script-canvas use the "Script" window.
:param line: The log message to search for.
:param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints
:return: None
:return: True if the line is found, otherwise false.
"""
for printInfo in print_infos:
if printInfo.window == window.strip() and printInfo.message.strip() == line:
return True
return False
# looks for an expected line in a list of tracers lines
# lines: the tracer list of lines to search. options are section_tracer.warnings, section_tracer.errors, section_tracer.asserts, section_tracer.prints
# return: true if the line is found, otherwise false
def find_expected_line(expected_line, lines):
found_lines = [printInfo.message.strip() for printInfo in lines]
return expected_line in found_lines
@staticmethod
def succeed_if_log_line_found(window, line, print_infos, time_out):
"""
Looks for a line in a list of tracer log lines and reports success if found.
:param window: The log's window name. For example, logs printed via script-canvas use the "Script" window.
:param line: The log message we're hoping to find.
:param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints
:param time_out: The total amount of time to wait before giving up looking for the expected line.
def wait_for_critical_expected_line(expected_line, lines, time_out):
TestHelper.wait_for_condition(lambda : find_expected_line(expected_line, lines), time_out)
Report.critical_result(("Found expected line: " + expected_line, "Failed to find expected line: " + expected_line), find_expected_line(expected_line, lines))
:return: No return value, but if the message is found, a successful critical result is reported; otherwise failure.
"""
TestHelper.wait_for_condition(lambda : TestHelper.find_line(window, line, print_infos), time_out)
Report.critical_result(("Found expected line: " + line, "Failed to find expected line: " + line), TestHelper.find_line(window, line, print_infos))
def wait_for_critical_unexpected_line(unexpected_line, lines, time_out):
TestHelper.wait_for_condition(lambda : find_expected_line(unexpected_line, lines), time_out)
Report.critical_result(("Unexpected line not found: " + unexpected_line, "Unexpected line found: " + unexpected_line), not find_expected_line(unexpected_line, lines))
@staticmethod
def fail_if_log_line_found(window, line, print_infos, time_out):
"""
Reports a failure if a log line in a list of tracer log lines is found.
:param window: The log's window name. For example, logs printed via script-canvas use the "Script" window.
:param line: The log message we're hoping to not find.
:param print_infos: A list of PrintInfos collected by Tracer to search. Example options: your_tracer.warnings, your_tracer.errors, your_tracer.asserts, or your_tracer.prints
:param time_out: The total amount of time to wait before giving up looking for the unexpected line. If time runs out and we don't see the unexpected line then report a success.
:return: No return value, but if the line is found, a failed critical result is reported; otherwise success.
"""
TestHelper.wait_for_condition(lambda : TestHelper.find_line(window, line, print_infos), time_out)
Report.critical_result(("Unexpected line not found: " + line, "Unexpected line found: " + line), not TestHelper.find_line(window, line, print_infos))
@staticmethod
def multiplayer_enter_game_mode(msgtuple_success_fail: Tuple[str, str], sv_default_player_spawn_asset: str) -> None:
"""
:param msgtuple_success_fail: The tuple with the expected/unexpected messages for entering game mode.
:param sv_default_player_spawn_asset: The path to the network player prefab that will be automatically spawned upon entering gamemode. The engine default is "prefabs/player.network.spawnable"
:return: None
"""
Report.info("Entering game mode")
if sv_default_player_spawn_asset :
general.set_cvar("sv_defaultPlayerSpawnAsset", sv_default_player_spawn_asset)
@ -135,20 +161,20 @@ class TestHelper:
multiplayer.PythonEditorFuncs_enter_game_mode()
# make sure the server launcher binary exists
wait_for_critical_unexpected_line("LaunchEditorServer failed! The ServerLauncher binary is missing!", section_tracer.errors, 0.5)
TestHelper.fail_if_log_line_found("MultiplayerEditor", "LaunchEditorServer failed! The ServerLauncher binary is missing!", section_tracer.errors, 0.5)
# make sure the server launcher is running
waiter.wait_for(lambda: process_utils.process_exists("AutomatedTesting.ServerLauncher", ignore_extensions=True), timeout=5.0, exc=AssertionError("AutomatedTesting.ServerLauncher has NOT launched!"), interval=1.0)
wait_for_critical_expected_line("MultiplayerEditorConnection: Editor-server activation has found and connected to the editor.", section_tracer.prints, 15.0)
TestHelper.succeed_if_log_line_found("EditorServer", "MultiplayerEditorConnection: Editor-server activation has found and connected to the editor.", section_tracer.prints, 15.0)
wait_for_critical_expected_line("Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0)
TestHelper.succeed_if_log_line_found("MultiplayerEditor", "Editor is sending the editor-server the level data packet.", section_tracer.prints, 5.0)
wait_for_critical_expected_line("Logger: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0)
TestHelper.succeed_if_log_line_found("EditorServer", "Logger: Editor Server completed receiving the editor's level assets, responding to Editor...", section_tracer.prints, 5.0)
wait_for_critical_expected_line("Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0)
TestHelper.succeed_if_log_line_found("MultiplayerEditorConnection", "Editor-server ready. Editor has successfully connected to the editor-server's network simulation.", section_tracer.prints, 5.0)
wait_for_critical_unexpected_line(f"MultiplayerSystemComponent: SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '{sv_default_player_spawn_asset.lower()}'.", section_tracer.prints, 0.5)
TestHelper.fail_if_log_line_found("EditorServer", f"MultiplayerSystemComponent: SpawnDefaultPlayerPrefab failed. Missing sv_defaultPlayerSpawnAsset at path '{sv_default_player_spawn_asset.lower()}'.", section_tracer.prints, 0.5)
TestHelper.wait_for_condition(lambda : multiplayer.PythonEditorFuncs_is_in_game_mode(), 5.0)
Report.critical_result(msgtuple_success_fail, multiplayer.PythonEditorFuncs_is_in_game_mode())

@ -32,3 +32,6 @@ class TestAutomation(TestAutomationBase):
from .tests import Multiplayer_AutoComponent_NetworkInput as test_module
self._run_prefab_test(request, workspace, editor, test_module)
def test_Multiplayer_AutoComponent_RPC(self, request, workspace, editor, launcher_platform):
from .tests import Multiplayer_AutoComponent_RPC as test_module
self._run_prefab_test(request, workspace, editor, test_module)

@ -0,0 +1,83 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# Test Case Title : Check that the four network RPCs can be sent and received
# fmt: off
class TestSuccessFailTuples():
enter_game_mode = ("Entered game mode", "Failed to enter game mode")
exit_game_mode = ("Exited game mode", "Couldn't exit game mode")
find_network_player = ("Found network player", "Couldn't find network player")
# fmt: on
def Multiplayer_AutoComponent_RPC():
r"""
Summary:
Runs a test to make sure that RPCs can be sent and received via script canvas
Level Description:
- Dynamic
1. Although the level is nearly empty, when the server and editor connect the server will spawn and replicate the player network prefab.
a. The player network prefab has a NetworkTestPlayerComponent.AutoComponent and a script canvas attached which sends and receives various RPCs.
Print logs occur upon sending and receiving the RPCs; we are testing to make sure the expected events and values are received.
- Static
1. NetLevelEntity. This is a networked entity which has a script attached. Used for cross-entity communication. The net-player prefab will send this level entity Server->Authority RPCs
Expected Outcome:
We should see editor logs stating that RPCs have been sent and received.
However, if the script receives unexpected values for the Process event we will see print logs for bad data as well.
:return:
"""
import azlmbr.legacy.general as general
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import Tracer
from editor_python_test_tools.utils import TestHelper as helper
from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole
level_name = "AutoComponent_RPC"
player_prefab_name = "Player"
player_prefab_path = f"levels/multiplayer/{level_name}/{player_prefab_name}.network.spawnable"
helper.init_idle()
# 1) Open Level
helper.open_level("Multiplayer", level_name)
with Tracer() as section_tracer:
# 2) Enter game mode
helper.multiplayer_enter_game_mode(TestSuccessFailTuples.enter_game_mode, player_prefab_path.lower())
# 3) Make sure the network player was spawned
player_id = general.find_game_entity(player_prefab_name)
Report.critical_result(TestSuccessFailTuples.find_network_player, player_id.IsValid())
# 4) Check the editor logs for expected and unexpected log output
PLAYERID_RPC_WAIT_TIME_SECONDS = 1.0 # The player id is sent from the server as soon as the player script is spawned. 1 second should be more than enough time to send/receive that RPC.
helper.succeed_if_log_line_found('EditorServer', 'Script: AutoComponent_RPC: Sending client PlayerNumber 1', section_tracer.prints, PLAYERID_RPC_WAIT_TIME_SECONDS)
helper.succeed_if_log_line_found('Script', "AutoComponent_RPC: I'm Player #1", section_tracer.prints, PLAYERID_RPC_WAIT_TIME_SECONDS)
# Uncomment once editor game-play mode supports level entities with net-binding
#PLAYFX_RPC_WAIT_TIME_SECONDS = 1.1 # The server will send an RPC to play an fx on the client every second.
#helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity Activated on entity: NetLevelEntity", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS)
#helper.succeed_if_log_line_found('EditorServer', "Script: AutoComponent_RPC_NetLevelEntity: Authority sending RPC to play some fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS)
#helper.succeed_if_log_line_found('Script', "AutoComponent_RPC_NetLevelEntity: I'm a client playing some superficial fx.", section_tracer.prints, PLAYFX_RPC_WAIT_TIME_SECONDS)
# Exit game mode
helper.exit_game_mode(TestSuccessFailTuples.exit_game_mode)
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(Multiplayer_AutoComponent_RPC)

@ -12,12 +12,36 @@ import sys
import os
import pytest
import logging
import sqlite3
pytest.importorskip('ly_test_tools')
import ly_test_tools.environment.file_system as file_system
import ly_test_tools.log.log_monitor
import ly_test_tools.environment.waiter as waiter
def detect_product(sql_connection, platform, target):
cur = sql_connection.cursor()
product_target = f'{platform}/{target}'
print(f'Detecting {product_target} in assetdb.sqlite')
hits = 0
for row in cur.execute(f'select ProductID from Products where ProductName is "{product_target}"'):
hits = hits + 1
assert hits == 1
def find_products(cache_folder, platform):
con = sqlite3.connect(os.path.join(cache_folder, 'assetdb.sqlite'))
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel')
detect_product(con, platform, 'gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel')
con.close()
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize('launcher_platform', ['windows_editor'])
@pytest.mark.parametrize('project', ['AutomatedTesting'])
@ -25,16 +49,7 @@ import ly_test_tools.environment.waiter as waiter
class TestPythonAssetProcessing(object):
def test_DetectPythonCreatedAsset(self, request, editor, level, launcher_platform):
unexpected_lines = []
expected_lines = [
'Mock asset exists',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel) found',
'AssetId found for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel) found'
]
expected_lines = []
timeout = 180
halt_on_unexpected = False
test_directory = os.path.join(os.path.dirname(__file__))
@ -50,3 +65,9 @@ class TestPythonAssetProcessing(object):
exc=("Log file '{}' was never opened by another process.".format(editorlog_file)),
interval=1)
log_monitor.monitor_log_for_lines(expected_lines, unexpected_lines, halt_on_unexpected, timeout)
cache_folder = editor.workspace.paths.cache()
platform = editor.workspace.asset_processor_platform
if platform == 'windows':
platform = 'pc'
find_products(cache_folder, platform)

@ -3,8 +3,6 @@ Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
Fixture for clearing out 'MoveOutput' folders from \dev and \dev\PROJECT
"""
# Import builtin libraries

@ -169,17 +169,17 @@ class TestsAssetRelocator_WindowsAndMac(object):
@pytest.mark.test_case_id("C21968388")
@pytest.mark.assetpipeline
def test_WindowsMacPlatforms_MoveCorruptedSliceFile_MoveSuccess(self, request, workspace, ap_setup_fixture,
def test_WindowsMacPlatforms_MoveCorruptedPrefabFile_MoveSuccess(self, request, workspace, ap_setup_fixture,
asset_processor):
"""
Asset with UUID/AssetId reference in non-standard format is
successfully scanned and relocated to the MoveOutput folder.
This test uses a pre-corrupted .slice file.
This test uses a pre-corrupted .prefab file.
Test Steps:
1. Create temporary testing environment with a corrupted slice
2. Attempt to move the corrupted slice
3. Verify that corrupted slice was moved successfully
1. Create temporary testing environment with a corrupted prefab
2. Attempt to move the corrupted prefab
3. Verify that corrupted prefab was moved successfully
"""
env = ap_setup_fixture
@ -187,7 +187,7 @@ class TestsAssetRelocator_WindowsAndMac(object):
asset_folder = "C21968388"
source_dir, _ = asset_processor.prepare_test_environment(env["tests_dir"], asset_folder)
filename = "DependencyScannerAsset.slice"
filename = "DependencyScannerAsset.prefab"
file_path = os.path.join(source_dir, filename)
dst_rel_path = os.path.join("MoveOutput", filename)
dst_full_path = os.path.join(source_dir, dst_rel_path)

@ -0,0 +1,908 @@
{
"ContainerEntity": {
"Id": "ContainerEntity",
"Name": "DependencyScannerAsset",
"Components": {
"Component_[10182366347512475253]": {
"$type": "EditorPrefabComponent",
"Id": 10182366347512475253
},
"Component_[12917798267488243668]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12917798267488243668
},
"Component_[3261249813163778338]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3261249813163778338
},
"Component_[3837204912784440039]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 3837204912784440039
},
"Component_[4272963378099646759]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 4272963378099646759,
"Parent Entity": ""
},
"Component_[4848458548047175816]": {
"$type": "EditorVisibilityComponent",
"Id": 4848458548047175816
},
"Component_[5787060997243919943]": {
"$type": "EditorInspectorComponent",
"Id": 5787060997243919943
},
"Component_[7804170251266531779]": {
"$type": "EditorLockComponent",
"Id": 7804170251266531779
},
"Component_[7874177159288365422]": {
"$type": "EditorEntitySortComponent",
"Id": 7874177159288365422
},
"Component_[8018146290632383969]": {
"$type": "EditorEntityIconComponent",
"Id": 8018146290632383969
},
"Component_[8452360690590857075]": {
"$type": "SelectionComponent",
"Id": 8452360690590857075
}
}
},
"Entities": {
"Entity_[274004659287]": {
"Id": "Entity_[274004659287]",
"Name": "DependencyScannerAsset",
"Components": {
"Component_[10849460799799271301]": {
"$type": "EditorPendingCompositionComponent",
"Id": 10849460799799271301
},
"Component_[11098142762746045658]": {
"$type": "SelectionComponent",
"Id": 11098142762746045658
},
"Component_[11154538629717040387]": {
"$type": "EditorEntitySortComponent",
"Id": 11154538629717040387,
"Child Entity Order": [
"Entity_[305822185575]",
"Entity_[278299626583]",
"Entity_[282594593879]",
"Entity_[286889561175]",
"Entity_[291184528471]"
]
},
"Component_[1365196255752273753]": {
"$type": "EditorOnlyEntityComponent",
"Id": 1365196255752273753
},
"Component_[280906579560376421]": {
"$type": "EditorLockComponent",
"Id": 280906579560376421
},
"Component_[4629965429001113748]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 4629965429001113748
},
"Component_[4876910656129741263]": {
"$type": "EditorEntityIconComponent",
"Id": 4876910656129741263
},
"Component_[5763306492614623496]": {
"$type": "EditorInspectorComponent",
"Id": 5763306492614623496,
"ComponentOrderEntryArray": [
{
"ComponentId": 7514977506847036117
}
]
},
"Component_[7327709568605458460]": {
"$type": "EditorVisibilityComponent",
"Id": 7327709568605458460
},
"Component_[7514977506847036117]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 7514977506847036117,
"Parent Entity": "ContainerEntity"
}
}
},
"Entity_[278299626583]": {
"Id": "Entity_[278299626583]",
"Name": "AssetIDMatch",
"Components": {
"Component_[10285740519857855186]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10285740519857855186
},
"Component_[11273731016303624898]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11273731016303624898,
"Parent Entity": "Entity_[274004659287]"
},
"Component_[1136790983026972010]": {
"$type": "EditorVisibilityComponent",
"Id": 1136790983026972010
},
"Component_[12777313618328131055]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12777313618328131055
},
"Component_[13256044902558773795]": {
"$type": "EditorLockComponent",
"Id": 13256044902558773795
},
"Component_[15834551022302435776]": {
"$type": "EditorInspectorComponent",
"Id": 15834551022302435776,
"ComponentOrderEntryArray": [
{
"ComponentId": 11273731016303624898
},
{
"ComponentId": 9671522714018290727,
"SortIndex": 1
}
]
},
"Component_[16345420368214930095]": {
"$type": "SelectionComponent",
"Id": 16345420368214930095
},
"Component_[5309075942188429052]": {
"$type": "EditorEntitySortComponent",
"Id": 5309075942188429052
},
"Component_[8639731896786645938]": {
"$type": "EditorEntityIconComponent",
"Id": 8639731896786645938
},
"Component_[9844585173698551415]": {
"$type": "EditorOnlyEntityComponent",
"Id": 9844585173698551415
}
}
},
"Entity_[282594593879]": {
"Id": "Entity_[282594593879]",
"Name": "UUIDMatch",
"Components": {
"Component_[10379494986254888760]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10379494986254888760
},
"Component_[10932830014545295552]": {
"$type": "SelectionComponent",
"Id": 10932830014545295552
},
"Component_[16077882919902242532]": {
"$type": "EditorEntitySortComponent",
"Id": 16077882919902242532
},
"Component_[2150375322459274584]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2150375322459274584
},
"Component_[2645455411436465820]": {
"$type": "EditorEntityIconComponent",
"Id": 2645455411436465820
},
"Component_[5422214869037468733]": {
"$type": "EditorOnlyEntityComponent",
"Id": 5422214869037468733
},
"Component_[7238126895911071330]": {
"$type": "EditorInspectorComponent",
"Id": 7238126895911071330,
"ComponentOrderEntryArray": [
{
"ComponentId": 8407607000804893064
},
{
"ComponentId": 12952323341649885242,
"SortIndex": 1
}
]
},
"Component_[7981670269715131988]": {
"$type": "EditorVisibilityComponent",
"Id": 7981670269715131988
},
"Component_[8407607000804893064]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 8407607000804893064,
"Parent Entity": "Entity_[274004659287]"
},
"Component_[8567641786004090803]": {
"$type": "EditorLockComponent",
"Id": 8567641786004090803
}
}
},
"Entity_[286889561175]": {
"Id": "Entity_[286889561175]",
"Name": "RelativeProductMatch",
"Components": {
"Component_[10180645282669228972]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 10180645282669228972,
"Parent Entity": "Entity_[274004659287]"
},
"Component_[10200807690182688147]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10200807690182688147
},
"Component_[11014661873645081316]": {
"$type": "EditorInspectorComponent",
"Id": 11014661873645081316,
"ComponentOrderEntryArray": [
{
"ComponentId": 10180645282669228972
},
{
"ComponentId": 12869852248016369650,
"SortIndex": 1
}
]
},
"Component_[12869852248016369650]": {
"$type": "{77CDE991-EC1A-B7C1-B112-7456ABAC81A1} EditorSpawnerComponent",
"Id": 12869852248016369650,
"Slice": {
"assetId": {
"guid": "{29F14025-3BD2-5CA9-A9DE-B8B349268C2F}",
"subId": 2
},
"assetHint": "slices/bullet.dynamicslice"
}
},
"Component_[15136448544716183259]": {
"$type": "EditorOnlyEntityComponent",
"Id": 15136448544716183259
},
"Component_[15966001894874626764]": {
"$type": "SelectionComponent",
"Id": 15966001894874626764
},
"Component_[16167982631516160155]": {
"$type": "EditorEntityIconComponent",
"Id": 16167982631516160155
},
"Component_[16672905198052847867]": {
"$type": "EditorEntitySortComponent",
"Id": 16672905198052847867
},
"Component_[4506946122562404190]": {
"$type": "EditorPendingCompositionComponent",
"Id": 4506946122562404190
},
"Component_[6836304267269231429]": {
"$type": "EditorLockComponent",
"Id": 6836304267269231429
},
"Component_[8756593519140349183]": {
"$type": "EditorVisibilityComponent",
"Id": 8756593519140349183
}
}
},
"Entity_[291184528471]": {
"Id": "Entity_[291184528471]",
"Name": "RelativeSourceMatch",
"Components": {
"Component_[11694027325905361034]": {
"$type": "EditorEntitySortComponent",
"Id": 11694027325905361034
},
"Component_[13891029613307790064]": {
"$type": "EditorEntityIconComponent",
"Id": 13891029613307790064
},
"Component_[15933511034411930900]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 15933511034411930900,
"Parent Entity": "Entity_[274004659287]"
},
"Component_[17540827492846961803]": {
"$type": "EditorLockComponent",
"Id": 17540827492846961803
},
"Component_[2850297705939373458]": {
"$type": "SelectionComponent",
"Id": 2850297705939373458
},
"Component_[4809103331004345812]": {
"$type": "EditorPendingCompositionComponent",
"Id": 4809103331004345812
},
"Component_[5654779331777839943]": {
"$type": "EditorInspectorComponent",
"Id": 5654779331777839943,
"ComponentOrderEntryArray": [
{
"ComponentId": 15933511034411930900
},
{
"ComponentId": 10284025539900054207,
"SortIndex": 1
}
]
},
"Component_[6097019179005900386]": {
"$type": "EditorVisibilityComponent",
"Id": 6097019179005900386
},
"Component_[7748387730313625157]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 7748387730313625157
},
"Component_[9822265453841229082]": {
"$type": "EditorOnlyEntityComponent",
"Id": 9822265453841229082
}
}
},
"Entity_[297232250983]": {
"Id": "Entity_[297232250983]",
"Name": "1151F14D38A65579888ABE3139882E68:[0]",
"Components": {
"Component_[11936148741777754959]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 11936148741777754959
},
"Component_[12610073699988743015]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 12610073699988743015,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[1603205169722765279]": {
"$type": "EditorLockComponent",
"Id": 1603205169722765279
},
"Component_[17691206348057560715]": {
"$type": "EditorPendingCompositionComponent",
"Id": 17691206348057560715
},
"Component_[2711821203680330048]": {
"$type": "SelectionComponent",
"Id": 2711821203680330048
},
"Component_[3887480309311474860]": {
"$type": "EditorVisibilityComponent",
"Id": 3887480309311474860
},
"Component_[5853968883842282450]": {
"$type": "EditorEntityIconComponent",
"Id": 5853968883842282450
},
"Component_[7679080692843343453]": {
"$type": "EditorCommentComponent",
"Id": 7679080692843343453,
"Configuration": "Asset ID that matches an existing dependency of this asset (am_grass1.mtl)"
},
"Component_[8024752235278898687]": {
"$type": "EditorOnlyEntityComponent",
"Id": 8024752235278898687
},
"Component_[8373296084678231042]": {
"$type": "EditorEntitySortComponent",
"Id": 8373296084678231042
},
"Component_[9782967158965587831]": {
"$type": "EditorInspectorComponent",
"Id": 9782967158965587831,
"ComponentOrderEntryArray": [
{
"ComponentId": 12610073699988743015
},
{
"ComponentId": 7679080692843343453,
"SortIndex": 1
}
]
}
}
},
"Entity_[301527218279]": {
"Id": "Entity_[301527218279]",
"Name": "Slices/bullet.dynamicslice",
"Components": {
"Component_[15613078542630153866]": {
"$type": "EditorInspectorComponent",
"Id": 15613078542630153866,
"ComponentOrderEntryArray": [
{
"ComponentId": 2483032678718995164
},
{
"ComponentId": 9734604379060902193,
"SortIndex": 1
}
]
},
"Component_[16098942854900817264]": {
"$type": "SelectionComponent",
"Id": 16098942854900817264
},
"Component_[16720139961856477500]": {
"$type": "EditorEntitySortComponent",
"Id": 16720139961856477500
},
"Component_[2483032678718995164]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 2483032678718995164,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[2502984783426127018]": {
"$type": "EditorLockComponent",
"Id": 2502984783426127018
},
"Component_[46714013890147210]": {
"$type": "EditorOnlyEntityComponent",
"Id": 46714013890147210
},
"Component_[4907474530744780429]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 4907474530744780429
},
"Component_[5420332829198300813]": {
"$type": "EditorPendingCompositionComponent",
"Id": 5420332829198300813
},
"Component_[7683578164681693579]": {
"$type": "EditorEntityIconComponent",
"Id": 7683578164681693579
},
"Component_[8312115250363172310]": {
"$type": "EditorVisibilityComponent",
"Id": 8312115250363172310
},
"Component_[9734604379060902193]": {
"$type": "EditorCommentComponent",
"Id": 9734604379060902193,
"Configuration": "Relative product path that matches an existing dependency of this asset"
}
}
},
"Entity_[305822185575]": {
"Id": "Entity_[305822185575]",
"Name": "AssetReferences",
"Components": {
"Component_[13422135993444528172]": {
"$type": "EditorPendingCompositionComponent",
"Id": 13422135993444528172
},
"Component_[13988015667379021413]": {
"$type": "EditorLockComponent",
"Id": 13988015667379021413
},
"Component_[14885956487876614434]": {
"$type": "EditorVisibilityComponent",
"Id": 14885956487876614434
},
"Component_[15550715415947731915]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15550715415947731915
},
"Component_[2576266145980379805]": {
"$type": "EditorInspectorComponent",
"Id": 2576266145980379805,
"ComponentOrderEntryArray": [
{
"ComponentId": 3176911836967955668
},
{
"ComponentId": 836721549453007197,
"SortIndex": 1
}
]
},
"Component_[3176911836967955668]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 3176911836967955668,
"Parent Entity": "Entity_[274004659287]"
},
"Component_[5613459137294642234]": {
"$type": "SelectionComponent",
"Id": 5613459137294642234
},
"Component_[6400873582148097152]": {
"$type": "EditorEntityIconComponent",
"Id": 6400873582148097152
},
"Component_[684670817803453913]": {
"$type": "EditorEntitySortComponent",
"Id": 684670817803453913,
"Child Entity Order": [
"Entity_[323002054759]",
"Entity_[327297022055]",
"Entity_[301527218279]",
"Entity_[318707087463]",
"Entity_[297232250983]",
"Entity_[314412120167]",
"Entity_[331591989351]",
"Entity_[310117152871]"
]
},
"Component_[8118206464926826097]": {
"$type": "EditorOnlyEntityComponent",
"Id": 8118206464926826097
},
"Component_[836721549453007197]": {
"$type": "EditorCommentComponent",
"Id": 836721549453007197,
"Configuration": "Entity names are used to trigger the missing dependency scanner. Comments are stripped from dynamic slices."
}
}
},
"Entity_[310117152871]": {
"Id": "Entity_[310117152871]",
"Name": "Materials/FakeMaterial.mtl",
"Components": {
"Component_[10593857511582714674]": {
"$type": "EditorInspectorComponent",
"Id": 10593857511582714674,
"ComponentOrderEntryArray": [
{
"ComponentId": 11797216659359478300
},
{
"ComponentId": 13816702107134233983,
"SortIndex": 1
}
]
},
"Component_[11797216659359478300]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11797216659359478300,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[13816702107134233983]": {
"$type": "EditorCommentComponent",
"Id": 13816702107134233983,
"Configuration": "Invalid path that does not match an existing dependency of this asset"
},
"Component_[14868583012186337705]": {
"$type": "EditorOnlyEntityComponent",
"Id": 14868583012186337705
},
"Component_[14965348027145283648]": {
"$type": "EditorEntitySortComponent",
"Id": 14965348027145283648
},
"Component_[15075774238648121688]": {
"$type": "EditorEntityIconComponent",
"Id": 15075774238648121688
},
"Component_[16157883709857447266]": {
"$type": "EditorLockComponent",
"Id": 16157883709857447266
},
"Component_[17712080510249108208]": {
"$type": "EditorVisibilityComponent",
"Id": 17712080510249108208
},
"Component_[2247408514677946398]": {
"$type": "SelectionComponent",
"Id": 2247408514677946398
},
"Component_[5565369976544134481]": {
"$type": "EditorPendingCompositionComponent",
"Id": 5565369976544134481
},
"Component_[6044814215558788086]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 6044814215558788086
}
}
},
"Entity_[314412120167]": {
"Id": "Entity_[314412120167]",
"Name": "88888888-4444-4444-4444-CCCCCCCCCCCC",
"Components": {
"Component_[10072177500579430176]": {
"$type": "EditorLockComponent",
"Id": 10072177500579430176
},
"Component_[10853215476279564671]": {
"$type": "EditorCommentComponent",
"Id": 10853215476279564671,
"Configuration": "UUID that does not exist"
},
"Component_[13413154971272749631]": {
"$type": "SelectionComponent",
"Id": 13413154971272749631
},
"Component_[15316173756367163440]": {
"$type": "EditorInspectorComponent",
"Id": 15316173756367163440,
"ComponentOrderEntryArray": [
{
"ComponentId": 3266728630359207653
},
{
"ComponentId": 10853215476279564671,
"SortIndex": 1
}
]
},
"Component_[15809307959802829291]": {
"$type": "EditorEntitySortComponent",
"Id": 15809307959802829291
},
"Component_[17649652752752487081]": {
"$type": "EditorEntityIconComponent",
"Id": 17649652752752487081
},
"Component_[2130036493438440377]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2130036493438440377
},
"Component_[3266728630359207653]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 3266728630359207653,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[5892125564582966187]": {
"$type": "EditorVisibilityComponent",
"Id": 5892125564582966187
},
"Component_[597602776660257245]": {
"$type": "EditorOnlyEntityComponent",
"Id": 597602776660257245
},
"Component_[8238652007701465495]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 8238652007701465495
}
}
},
"Entity_[318707087463]": {
"Id": "Entity_[318707087463]",
"Name": "BBA1A5494C73578894BF0692CDA5FC33",
"Components": {
"Component_[10222455787643359341]": {
"$type": "EditorPendingCompositionComponent",
"Id": 10222455787643359341
},
"Component_[11487845392038268864]": {
"$type": "SelectionComponent",
"Id": 11487845392038268864
},
"Component_[12135534290310046764]": {
"$type": "EditorVisibilityComponent",
"Id": 12135534290310046764
},
"Component_[14412623226519978498]": {
"$type": "EditorOnlyEntityComponent",
"Id": 14412623226519978498
},
"Component_[14516371382857751872]": {
"$type": "EditorEntityIconComponent",
"Id": 14516371382857751872
},
"Component_[16011611743122468576]": {
"$type": "EditorInspectorComponent",
"Id": 16011611743122468576,
"ComponentOrderEntryArray": [
{
"ComponentId": 4157328932578509254
},
{
"ComponentId": 8524796860605854850,
"SortIndex": 1
}
]
},
"Component_[3813931698067937301]": {
"$type": "EditorEntitySortComponent",
"Id": 3813931698067937301
},
"Component_[4157328932578509254]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 4157328932578509254,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[8524796860605854850]": {
"$type": "EditorCommentComponent",
"Id": 8524796860605854850,
"Configuration": "UUID that matches an existing dependency of this asset (lumbertank_body.cgf)"
},
"Component_[8660819596448699427]": {
"$type": "EditorLockComponent",
"Id": 8660819596448699427
},
"Component_[8768262795169819026]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 8768262795169819026
}
}
},
"Entity_[323002054759]": {
"Id": "Entity_[323002054759]",
"Name": "Materials/am_rockground.mtl",
"Components": {
"Component_[13459503224133892836]": {
"$type": "EditorEntityIconComponent",
"Id": 13459503224133892836
},
"Component_[1346698328271204385]": {
"$type": "EditorVisibilityComponent",
"Id": 1346698328271204385
},
"Component_[13662830241397426219]": {
"$type": "SelectionComponent",
"Id": 13662830241397426219
},
"Component_[14169735046939083706]": {
"$type": "EditorInspectorComponent",
"Id": 14169735046939083706,
"ComponentOrderEntryArray": [
{
"ComponentId": 833157791612452820
},
{
"ComponentId": 3573928838741352115,
"SortIndex": 1
}
]
},
"Component_[16049700338512950477]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 16049700338512950477
},
"Component_[16191253524853449302]": {
"$type": "EditorOnlyEntityComponent",
"Id": 16191253524853449302
},
"Component_[1737139665005484521]": {
"$type": "EditorPendingCompositionComponent",
"Id": 1737139665005484521
},
"Component_[17562284119637289685]": {
"$type": "EditorEntitySortComponent",
"Id": 17562284119637289685
},
"Component_[3573928838741352115]": {
"$type": "EditorCommentComponent",
"Id": 3573928838741352115,
"Configuration": "Relative source path that matches an existing dependency of this asset"
},
"Component_[485401015869338526]": {
"$type": "EditorLockComponent",
"Id": 485401015869338526
},
"Component_[833157791612452820]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 833157791612452820,
"Parent Entity": "Entity_[305822185575]"
}
}
},
"Entity_[327297022055]": {
"Id": "Entity_[327297022055]",
"Name": "Config/Game.xml",
"Components": {
"Component_[11848260632907964142]": {
"$type": "EditorInspectorComponent",
"Id": 11848260632907964142,
"ComponentOrderEntryArray": [
{
"ComponentId": 497869813123895830
},
{
"ComponentId": 5248857300320701553,
"SortIndex": 1
}
]
},
"Component_[12842864953492512672]": {
"$type": "EditorEntitySortComponent",
"Id": 12842864953492512672
},
"Component_[16656501539883791157]": {
"$type": "EditorLockComponent",
"Id": 16656501539883791157
},
"Component_[17365661125603122123]": {
"$type": "EditorEntityIconComponent",
"Id": 17365661125603122123
},
"Component_[2967487135389707052]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 2967487135389707052
},
"Component_[3356294263684362888]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3356294263684362888
},
"Component_[497869813123895830]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 497869813123895830,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[5248857300320701553]": {
"$type": "EditorCommentComponent",
"Id": 5248857300320701553,
"Configuration": "Valid path that does not match an existing dependency of this asset. Should report as a missing dependency"
},
"Component_[746309483212393367]": {
"$type": "SelectionComponent",
"Id": 746309483212393367
},
"Component_[8319831469290771470]": {
"$type": "EditorPendingCompositionComponent",
"Id": 8319831469290771470
},
"Component_[9369067377618608622]": {
"$type": "EditorVisibilityComponent",
"Id": 9369067377618608622
}
}
},
"Entity_[331591989351]": {
"Id": "Entity_[331591989351]",
"Name": "1151F14D38A65579888ABE3139882E68:[333]",
"Components": {
"Component_[104857639379046106]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 104857639379046106,
"Parent Entity": "Entity_[305822185575]"
},
"Component_[1061601983221247493]": {
"$type": "EditorLockComponent",
"Id": 1061601983221247493
},
"Component_[11028443253330664986]": {
"$type": "EditorVisibilityComponent",
"Id": 11028443253330664986
},
"Component_[13806275118632081006]": {
"$type": "EditorEntitySortComponent",
"Id": 13806275118632081006
},
"Component_[13922573109551604801]": {
"$type": "EditorEntityIconComponent",
"Id": 13922573109551604801
},
"Component_[17027032709917108335]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 17027032709917108335
},
"Component_[17030988165269698825]": {
"$type": "EditorOnlyEntityComponent",
"Id": 17030988165269698825
},
"Component_[2294579021665535860]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2294579021665535860
},
"Component_[5863078697041048226]": {
"$type": "EditorInspectorComponent",
"Id": 5863078697041048226,
"ComponentOrderEntryArray": [
{
"ComponentId": 104857639379046106
},
{
"ComponentId": 9466290982672370664,
"SortIndex": 1
}
]
},
"Component_[7608263859116142496]": {
"$type": "SelectionComponent",
"Id": 7608263859116142496
},
"Component_[9466290982672370664]": {
"$type": "EditorCommentComponent",
"Id": 9466290982672370664,
"Configuration": "Asset ID that does not exist (am_grass1.mtl UUID, no matching product ID)"
}
}
}
}
}

@ -23,7 +23,7 @@ def output_test_data(scene):
# Just write something to the file, but the filename is the main information
# used for the test.
f.write(f"scene.sourceFilename: {scene.sourceFilename}\n")
return True
return ''
mySceneJobHandler = None

@ -98,7 +98,13 @@ def AssetBrowser_SearchFiltering():
# 3) Type the name of an asset in the search bar and make sure it is filtered to and selectable
asset_browser = editor_window.findChild(QtWidgets.QDockWidget, "Asset Browser")
search_bar = asset_browser.findChild(QtWidgets.QLineEdit, "textSearch")
search_bar.setText("cedar.fbx")
# Add a small pause when typing in the search bar in order to check that the entries are updated properly
search_bar.setText("Cedar.f")
general.idle_wait(0.5)
search_bar.setText("Cedar.fbx")
general.idle_wait(0.5)
asset_browser_tree = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTreeViewWidget")
asset_browser_table = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTableViewWidget")
found = await pyside_utils.wait_for_condition(lambda: pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx"), 5.0)

@ -31,22 +31,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
Smoke
)
ly_add_pytest(
NAME AutomatedTesting::LoadLevelGPU
TEST_SUITE smoke
TEST_SERIAL
TEST_REQUIRES gpu
PATH ${CMAKE_CURRENT_LIST_DIR}/test_RemoteConsole_GPULoadLevel_Works.py
TIMEOUT 100
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
AZ::PythonBindingsExample
AutomatedTesting.GameLauncher
AutomatedTesting.Assets
COMPONENT
Smoke
)
ly_add_pytest(
NAME AutomatedTesting::EditorTestWithGPU
TEST_REQUIRES gpu

@ -1,43 +0,0 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
UI Apps: AutomatedTesting.GameLauncher
Launch AutomatedTesting.GameLauncher with Simple level
Test should run in both gpu and non gpu
"""
import pytest
import psutil
import ly_test_tools.environment.waiter as waiter
import editor_python_test_tools.hydra_test_utils as editor_test_utils
from ly_remote_console.remote_console_commands import RemoteConsole as RemoteConsole
from ly_remote_console.remote_console_commands import (
send_command_and_expect_response as send_command_and_expect_response,
)
@pytest.mark.parametrize("launcher_platform", ["windows"])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("level", ["Simple"])
class TestRemoteConsoleLoadLevelWorks(object):
@pytest.fixture
def remote_console_instance(self, request):
console = RemoteConsole()
def teardown():
if console.connected:
console.stop()
request.addfinalizer(teardown)
return console
def test_RemoteConsole_LoadLevel_Works(self, launcher, level, remote_console_instance, launcher_platform):
expected_lines = ['Level system is loading "Simple"']
editor_test_utils.launch_and_validate_results_launcher(launcher, level, remote_console_instance, expected_lines, null_renderer=False)

@ -0,0 +1,566 @@
{
"ContainerEntity": {
"Id": "ContainerEntity",
"Name": "ShadowTest",
"Components": {
"Component_[10182366347512475253]": {
"$type": "EditorPrefabComponent",
"Id": 10182366347512475253
},
"Component_[12917798267488243668]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12917798267488243668
},
"Component_[3261249813163778338]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3261249813163778338
},
"Component_[3837204912784440039]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 3837204912784440039
},
"Component_[4272963378099646759]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 4272963378099646759,
"Parent Entity": ""
},
"Component_[4848458548047175816]": {
"$type": "EditorVisibilityComponent",
"Id": 4848458548047175816
},
"Component_[5787060997243919943]": {
"$type": "EditorInspectorComponent",
"Id": 5787060997243919943
},
"Component_[7804170251266531779]": {
"$type": "EditorLockComponent",
"Id": 7804170251266531779
},
"Component_[7874177159288365422]": {
"$type": "EditorEntitySortComponent",
"Id": 7874177159288365422
},
"Component_[8018146290632383969]": {
"$type": "EditorEntityIconComponent",
"Id": 8018146290632383969
},
"Component_[8452360690590857075]": {
"$type": "SelectionComponent",
"Id": 8452360690590857075
}
}
},
"Entities": {
"Entity_[232650527119]": {
"Id": "Entity_[232650527119]",
"Name": "DirectionalLight",
"Components": {
"Component_[10660156197505313227]": {
"$type": "EditorLockComponent",
"Id": 10660156197505313227
},
"Component_[14184823757717157844]": {
"$type": "EditorInspectorComponent",
"Id": 14184823757717157844,
"ComponentOrderEntryArray": [
{
"ComponentId": 9854879901259791898
},
{
"ComponentId": 3968519938187714949,
"SortIndex": 1
}
]
},
"Component_[1495573908681275492]": {
"$type": "EditorEntitySortComponent",
"Id": 1495573908681275492
},
"Component_[15580233403487968826]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15580233403487968826
},
"Component_[3968519938187714949]": {
"$type": "AZ::Render::EditorDirectionalLightComponent",
"Id": 3968519938187714949,
"Controller": {
"Configuration": {
"Intensity": 0.0,
"CameraEntityId": "",
"ShadowmapSize": "Size2048"
}
}
},
"Component_[4961040003466069196]": {
"$type": "EditorEntityIconComponent",
"Id": 4961040003466069196
},
"Component_[7824884165323036147]": {
"$type": "EditorVisibilityComponent",
"Id": 7824884165323036147
},
"Component_[8741866916946672319]": {
"$type": "EditorPendingCompositionComponent",
"Id": 8741866916946672319
},
"Component_[9288966876314965560]": {
"$type": "EditorOnlyEntityComponent",
"Id": 9288966876314965560
},
"Component_[9313163355156975968]": {
"$type": "SelectionComponent",
"Id": 9313163355156975968
},
"Component_[9854879901259791898]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 9854879901259791898,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.0,
0.0,
2.0
],
"Rotate": [
-32.05662536621094,
-26.103206634521484,
47.54806137084961
]
}
}
}
},
"Entity_[260824893221]": {
"Id": "Entity_[260824893221]",
"Name": "SpotLight",
"Components": {
"Component_[16098295228434057928]": {
"$type": "EditorDiskShapeComponent",
"Id": 16098295228434057928,
"ShapeColor": [
1.0,
1.0,
1.0,
1.0
],
"DiskShape": {
"Configuration": {
"Radius": 0.0
}
}
},
"Component_[16175995808158769171]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 16175995808158769171,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.6417449712753296,
1.3211734294891357,
3.022759199142456
],
"Rotate": [
243.31329345703125,
0.0,
0.0
]
}
},
"Component_[17136787899581093377]": {
"$type": "EditorEntitySortComponent",
"Id": 17136787899581093377
},
"Component_[17938027566627202610]": {
"$type": "EditorPendingCompositionComponent",
"Id": 17938027566627202610
},
"Component_[190081405128299223]": {
"$type": "SelectionComponent",
"Id": 190081405128299223
},
"Component_[2181418147135573579]": {
"$type": "EditorEntityIconComponent",
"Id": 2181418147135573579
},
"Component_[2564149706319215342]": {
"$type": "EditorOnlyEntityComponent",
"Id": 2564149706319215342
},
"Component_[3716169383940064541]": {
"$type": "EditorInspectorComponent",
"Id": 3716169383940064541,
"ComponentOrderEntryArray": [
{
"ComponentId": 16175995808158769171
},
{
"ComponentId": 16665800442781289114,
"SortIndex": 1
}
]
},
"Component_[4143676462074671972]": {
"$type": "AZ::Render::EditorAreaLightComponent",
"Id": 4143676462074671972,
"Controller": {
"Configuration": {
"LightType": 2,
"AttenuationRadius": 31.62277603149414,
"EnableShutters": true,
"InnerShutterAngleDegrees": 22.5,
"OuterShutterAngleDegrees": 27.5,
"Enable Shadow": true,
"Shadowmap Max Size": "Size2048",
"Filtering Sample Count": 32
}
}
},
"Component_[6706371214647538019]": {
"$type": "EditorVisibilityComponent",
"Id": 6706371214647538019
},
"Component_[7493944209625718550]": {
"$type": "EditorLockComponent",
"Id": 7493944209625718550
},
"Component_[7614113482082939165]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 7614113482082939165
}
}
},
"Entity_[269117486973]": {
"Id": "Entity_[269117486973]",
"Name": "Floor",
"Components": {
"Component_[10562678944594915756]": {
"$type": "EditorEntitySortComponent",
"Id": 10562678944594915756
},
"Component_[1175452962278157526]": {
"$type": "EditorEntityIconComponent",
"Id": 1175452962278157526
},
"Component_[13598353801231166887]": {
"$type": "EditorPendingCompositionComponent",
"Id": 13598353801231166887
},
"Component_[13735087293504923475]": {
"$type": "SelectionComponent",
"Id": 13735087293504923475
},
"Component_[13888244442459268363]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 13888244442459268363,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{E65E9ED3-3E38-5ABA-9E22-95E34DA4C3AE}",
"subId": 280178048
},
"assetHint": "objects/plane.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[1525720357937234014]": {
"$type": "EditorMaterialComponent",
"Id": 1525720357937234014,
"materialSlotsByLodEnabled": true
},
"Component_[16568998871680422442]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 16568998871680422442
},
"Component_[2147751093058990131]": {
"$type": "EditorInspectorComponent",
"Id": 2147751093058990131,
"ComponentOrderEntryArray": [
{
"ComponentId": 3266761149114817871
},
{
"ComponentId": 13888244442459268363,
"SortIndex": 1
},
{
"ComponentId": 1525720357937234014,
"SortIndex": 2
}
]
},
"Component_[3266761149114817871]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 3266761149114817871,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Scale": [
100.0,
100.0,
100.0
],
"UniformScale": 100.0
}
},
"Component_[4625895382416898670]": {
"$type": "EditorVisibilityComponent",
"Id": 4625895382416898670
},
"Component_[4856699190357614535]": {
"$type": "EditorLockComponent",
"Id": 4856699190357614535
},
"Component_[6466465153982575739]": {
"$type": "EditorOnlyEntityComponent",
"Id": 6466465153982575739
}
}
},
"Entity_[282757803856]": {
"Id": "Entity_[282757803856]",
"Name": "Cube",
"Components": {
"Component_[11189870094752260272]": {
"$type": "EditorEntitySortComponent",
"Id": 11189870094752260272
},
"Component_[11909086967677513257]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 11909086967677513257,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{593006BE-FE73-5A4B-A0A6-06C02EFFE458}",
"subId": 285127096
},
"loadBehavior": "PreLoad",
"assetHint": "objects/cube.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[1443341568598731610]": {
"$type": "EditorVisibilityComponent",
"Id": 1443341568598731610
},
"Component_[18339772707807258951]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 18339772707807258951,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.6083869934082031,
3.137901782989502,
0.5876787900924683
]
}
},
"Component_[2447207272572065708]": {
"$type": "EditorEntityIconComponent",
"Id": 2447207272572065708
},
"Component_[3281906807632213471]": {
"$type": "SelectionComponent",
"Id": 3281906807632213471
},
"Component_[3412442673858204671]": {
"$type": "EditorPendingCompositionComponent",
"Id": 3412442673858204671
},
"Component_[5382641380294287889]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 5382641380294287889
},
"Component_[7221534636342494619]": {
"$type": "EditorInspectorComponent",
"Id": 7221534636342494619,
"ComponentOrderEntryArray": [
{
"ComponentId": 18339772707807258951
},
{
"ComponentId": 11909086967677513257,
"SortIndex": 1
}
]
},
"Component_[7701217952253676487]": {
"$type": "EditorLockComponent",
"Id": 7701217952253676487
},
"Component_[7758436981023123121]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7758436981023123121
}
}
},
"Entity_[372196702077]": {
"Id": "Entity_[372196702077]",
"Name": "Bunny",
"Components": {
"Component_[11345914745205508221]": {
"$type": "EditorEntityIconComponent",
"Id": 11345914745205508221
},
"Component_[11507863983962969790]": {
"$type": "EditorMaterialComponent",
"Id": 11507863983962969790,
"materialSlotsByLodEnabled": true
},
"Component_[1342998773562921470]": {
"$type": "EditorPendingCompositionComponent",
"Id": 1342998773562921470
},
"Component_[14975835087235718844]": {
"$type": "EditorInspectorComponent",
"Id": 14975835087235718844,
"ComponentOrderEntryArray": [
{
"ComponentId": 5012565883129470759
},
{
"ComponentId": 7975043234993822905,
"SortIndex": 1
},
{
"ComponentId": 11507863983962969790,
"SortIndex": 2
}
]
},
"Component_[16460806723667032929]": {
"$type": "EditorOnlyEntityComponent",
"Id": 16460806723667032929
},
"Component_[18225690044585951363]": {
"$type": "EditorLockComponent",
"Id": 18225690044585951363
},
"Component_[18314752491697618927]": {
"$type": "EditorEntitySortComponent",
"Id": 18314752491697618927
},
"Component_[2431610550789583502]": {
"$type": "EditorVisibilityComponent",
"Id": 2431610550789583502
},
"Component_[5012565883129470759]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 5012565883129470759,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.0,
0.0,
0.20401419699192047
]
}
},
"Component_[7975043234993822905]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 7975043234993822905,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{0C6BBB76-4EC2-583A-B8C6-1A4C4FD1FE9D}",
"subId": 283109893
},
"assetHint": "objects/bunny.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[8510666363380501112]": {
"$type": "SelectionComponent",
"Id": 8510666363380501112
},
"Component_[9639060480533776634]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 9639060480533776634
}
}
},
"Entity_[670308843764]": {
"Id": "Entity_[670308843764]",
"Name": "Camera1",
"Components": {
"Component_[12951260100632682169]": {
"$type": "GenericComponentWrapper",
"Id": 12951260100632682169,
"m_template": {
"$type": "FlyCameraInputComponent"
}
},
"Component_[14180723329646459524]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14180723329646459524
},
"Component_[14996469885773917977]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 14996469885773917977,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
4.563776969909668,
0.7667046785354614,
3.000542640686035
],
"Rotate": [
-9.740042686462402,
-20.20942497253418,
63.57760238647461
]
}
},
"Component_[17638492356673689530]": {
"$type": "EditorInspectorComponent",
"Id": 17638492356673689530
},
"Component_[2421853983468750254]": {
"$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent",
"Id": 2421853983468750254,
"Controller": {
"Configuration": {
"Field of View": 90.00020599365234,
"EditorEntityId": 666013876468
}
}
},
"Component_[2572028619185965684]": {
"$type": "EditorEntityIconComponent",
"Id": 2572028619185965684
},
"Component_[2782900516907042776]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 2782900516907042776
},
"Component_[2849166119438883669]": {
"$type": "EditorVisibilityComponent",
"Id": 2849166119438883669
},
"Component_[4618311795498613781]": {
"$type": "EditorOnlyEntityComponent",
"Id": 4618311795498613781
},
"Component_[5402004894214413002]": {
"$type": "EditorEntitySortComponent",
"Id": 5402004894214413002
},
"Component_[6111028576371006514]": {
"$type": "SelectionComponent",
"Id": 6111028576371006514
},
"Component_[8203141294643544464]": {
"$type": "EditorLockComponent",
"Id": 8203141294643544464
}
}
}
}
}

@ -0,0 +1,12 @@
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0

@ -0,0 +1,705 @@
{
"ContainerEntity": {
"Id": "ContainerEntity",
"Name": "Hermanubis",
"Components": {
"Component_[10182366347512475253]": {
"$type": "EditorPrefabComponent",
"Id": 10182366347512475253
},
"Component_[12917798267488243668]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12917798267488243668
},
"Component_[3261249813163778338]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3261249813163778338
},
"Component_[3837204912784440039]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 3837204912784440039
},
"Component_[4272963378099646759]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 4272963378099646759,
"Parent Entity": ""
},
"Component_[4848458548047175816]": {
"$type": "EditorVisibilityComponent",
"Id": 4848458548047175816
},
"Component_[5787060997243919943]": {
"$type": "EditorInspectorComponent",
"Id": 5787060997243919943
},
"Component_[7804170251266531779]": {
"$type": "EditorLockComponent",
"Id": 7804170251266531779
},
"Component_[7874177159288365422]": {
"$type": "EditorEntitySortComponent",
"Id": 7874177159288365422
},
"Component_[8018146290632383969]": {
"$type": "EditorEntityIconComponent",
"Id": 8018146290632383969
},
"Component_[8452360690590857075]": {
"$type": "SelectionComponent",
"Id": 8452360690590857075
}
}
},
"Entities": {
"Entity_[250006174949]": {
"Id": "Entity_[250006174949]",
"Name": "WorldOrigin",
"Components": {
"Component_[13379444112629774116]": {
"$type": "EditorEntityIconComponent",
"Id": 13379444112629774116
},
"Component_[13797113876161133062]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 13797113876161133062,
"Parent Entity": "ContainerEntity"
},
"Component_[16382506042739704306]": {
"$type": "EditorInspectorComponent",
"Id": 16382506042739704306,
"ComponentOrderEntryArray": [
{
"ComponentId": 13797113876161133062
},
{
"ComponentId": 8816319458242680670,
"SortIndex": 1
}
]
},
"Component_[2147729086581105478]": {
"$type": "EditorOnlyEntityComponent",
"Id": 2147729086581105478
},
"Component_[2433100672102773575]": {
"$type": "SelectionComponent",
"Id": 2433100672102773575
},
"Component_[4832829387489613630]": {
"$type": "EditorVisibilityComponent",
"Id": 4832829387489613630
},
"Component_[5585931842723227683]": {
"$type": "EditorEntitySortComponent",
"Id": 5585931842723227683,
"Child Entity Order": [
"Entity_[254301142245]"
]
},
"Component_[7088004383223117498]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 7088004383223117498
},
"Component_[7856264459806503732]": {
"$type": "EditorPendingCompositionComponent",
"Id": 7856264459806503732
},
"Component_[8816319458242680670]": {
"$type": "AZ::Render::EditorGridComponent",
"Id": 8816319458242680670
},
"Component_[930042309700959235]": {
"$type": "EditorLockComponent",
"Id": 930042309700959235
}
}
},
"Entity_[254301142245]": {
"Id": "Entity_[254301142245]",
"Name": "GlobalSkylight",
"Components": {
"Component_[10076500561520682485]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 10076500561520682485,
"Parent Entity": "Entity_[250006174949]"
},
"Component_[12626877995248630950]": {
"$type": "EditorInspectorComponent",
"Id": 12626877995248630950,
"ComponentOrderEntryArray": [
{
"ComponentId": 10076500561520682485
},
{
"ComponentId": 8158442301445120126,
"SortIndex": 1
},
{
"ComponentId": 7260006984216245935,
"SortIndex": 2
}
]
},
"Component_[13040837632921717329]": {
"$type": "SelectionComponent",
"Id": 13040837632921717329
},
"Component_[1390505494369101864]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 1390505494369101864
},
"Component_[6733278858932131836]": {
"$type": "EditorVisibilityComponent",
"Id": 6733278858932131836
},
"Component_[7260006984216245935]": {
"$type": "AZ::Render::EditorImageBasedLightComponent",
"Id": 7260006984216245935,
"Controller": {
"Configuration": {
"diffuseImageAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 3000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_ibldiffuse.exr.streamingimage"
},
"specularImageAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 2000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage"
}
}
}
},
"Component_[7944006745008331817]": {
"$type": "EditorEntitySortComponent",
"Id": 7944006745008331817
},
"Component_[8158442301445120126]": {
"$type": "AZ::Render::EditorHDRiSkyboxComponent",
"Id": 8158442301445120126,
"Controller": {
"Configuration": {
"CubemapAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 1000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm.exr.streamingimage"
}
}
}
},
"Component_[8255370213772594097]": {
"$type": "EditorOnlyEntityComponent",
"Id": 8255370213772594097
},
"Component_[8551180373364097938]": {
"$type": "EditorLockComponent",
"Id": 8551180373364097938
},
"Component_[8852330656608249928]": {
"$type": "EditorPendingCompositionComponent",
"Id": 8852330656608249928
},
"Component_[8913694496991926693]": {
"$type": "EditorEntityIconComponent",
"Id": 8913694496991926693
}
}
},
"Entity_[258596109541]": {
"Id": "Entity_[258596109541]",
"Name": "Hermanubis_stone",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{1F650917-AA74-5107-9C49-648C957B33DA}",
"subId": 275904906
},
"assetHint": "materialeditor/viewportmodels/hermanubis.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{FF6412B6-F86E-54C8-835C-04F08190D81B}"
},
"assetHint": "objects/hermanubis/hermanubis_stone.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
1.1189539432525635,
0.0,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[262891076837]": {
"Id": "Entity_[262891076837]",
"Name": "Hermanubis_brass",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{1F650917-AA74-5107-9C49-648C957B33DA}",
"subId": 275904906
},
"assetHint": "materialeditor/viewportmodels/hermanubis.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{B3AC2305-1DE6-54AA-AAD5-5E77C75E5BB5}"
},
"assetHint": "objects/hermanubis/hermanubis_brass.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-1.4824472665786743,
-0.034557100385427475,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[267186044133]": {
"Id": "Entity_[267186044133]",
"Name": "SphereLight",
"Components": {
"Component_[10922228943444131599]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10922228943444131599
},
"Component_[11625534306113165068]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11625534306113165068,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.2636711895465851,
2.2845842838287354,
0.22468790411949158
]
}
},
"Component_[12372418243816154216]": {
"$type": "EditorSphereShapeComponent",
"Id": 12372418243816154216,
"ShapeColor": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005,
1.0
]
},
"Component_[12579170654872581897]": {
"$type": "EditorLockComponent",
"Id": 12579170654872581897
},
"Component_[12844637542561882557]": {
"$type": "EditorOnlyEntityComponent",
"Id": 12844637542561882557
},
"Component_[13087890528096920855]": {
"$type": "EditorInspectorComponent",
"Id": 13087890528096920855,
"ComponentOrderEntryArray": [
{
"ComponentId": 11625534306113165068
},
{
"ComponentId": 13427905514841050195,
"SortIndex": 1
},
{
"ComponentId": 12372418243816154216,
"SortIndex": 2
}
]
},
"Component_[13427905514841050195]": {
"$type": "AZ::Render::EditorAreaLightComponent",
"Id": 13427905514841050195,
"Controller": {
"Configuration": {
"LightType": 1,
"Color": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005
],
"IntensityMode": 1,
"Intensity": 676.7677001953125,
"AttenuationRadius": 226.51287841796875
}
}
},
"Component_[15364092815744365073]": {
"$type": "SelectionComponent",
"Id": 15364092815744365073
},
"Component_[2481373975540551564]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2481373975540551564
},
"Component_[4101167782224846352]": {
"$type": "EditorEntityIconComponent",
"Id": 4101167782224846352
},
"Component_[8664715119660216219]": {
"$type": "EditorEntitySortComponent",
"Id": 8664715119660216219
},
"Component_[8952093761729701957]": {
"$type": "EditorVisibilityComponent",
"Id": 8952093761729701957,
"VisibilityFlag": false
}
}
},
"Entity_[275775978725]": {
"Id": "Entity_[275775978725]",
"Name": "TubeLight",
"Components": {
"Component_[10922228943444131599]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10922228943444131599,
"DisabledComponents": [
{
"$type": "EditorSphereShapeComponent",
"Id": 12372418243816154216,
"ShapeColor": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005,
1.0
]
}
]
},
"Component_[11625534306113165068]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11625534306113165068,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-4.275930881500244,
0.5104026794433594,
2.3807857036590576
],
"Rotate": [
270.0043029785156,
0.16617189347743988,
268.51611328125
]
}
},
"Component_[12579170654872581897]": {
"$type": "EditorLockComponent",
"Id": 12579170654872581897
},
"Component_[12844637542561882557]": {
"$type": "EditorOnlyEntityComponent",
"Id": 12844637542561882557
},
"Component_[13087890528096920855]": {
"$type": "EditorInspectorComponent",
"Id": 13087890528096920855,
"ComponentOrderEntryArray": [
{
"ComponentId": 11625534306113165068
},
{
"ComponentId": 13427905514841050195,
"SortIndex": 1
},
{
"ComponentId": 12372418243816154216,
"SortIndex": 2
},
{
"ComponentId": 2193911499802409037,
"SortIndex": 3
}
]
},
"Component_[13427905514841050195]": {
"$type": "AZ::Render::EditorAreaLightComponent",
"Id": 13427905514841050195,
"Controller": {
"Configuration": {
"LightType": 3,
"Color": [
0.8521705865859985,
0.7865872979164124,
0.6079347133636475
],
"IntensityMode": 1,
"Intensity": 10000.0,
"AttenuationRadius": 21608.193359375
}
}
},
"Component_[15364092815744365073]": {
"$type": "SelectionComponent",
"Id": 15364092815744365073
},
"Component_[2193911499802409037]": {
"$type": "EditorCapsuleShapeComponent",
"Id": 2193911499802409037,
"ShapeColor": [
0.8521705865859985,
0.7865872979164124,
0.6079347133636475,
1.0
],
"CapsuleShape": {
"Configuration": {
"Height": 5.0,
"Radius": 0.10000000149011612
}
}
},
"Component_[2481373975540551564]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2481373975540551564
},
"Component_[4101167782224846352]": {
"$type": "EditorEntityIconComponent",
"Id": 4101167782224846352
},
"Component_[8664715119660216219]": {
"$type": "EditorEntitySortComponent",
"Id": 8664715119660216219
},
"Component_[8952093761729701957]": {
"$type": "EditorVisibilityComponent",
"Id": 8952093761729701957,
"VisibilityFlag": false
}
}
},
"Entity_[482743502241]": {
"Id": "Entity_[482743502241]",
"Name": "Camera1",
"Components": {
"Component_[10672707967016183310]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10672707967016183310
},
"Component_[13520081755303040361]": {
"$type": "EditorLockComponent",
"Id": 13520081755303040361
},
"Component_[13650522584195762912]": {
"$type": "SelectionComponent",
"Id": 13650522584195762912
},
"Component_[14204465933176839167]": {
"$type": "EditorOnlyEntityComponent",
"Id": 14204465933176839167
},
"Component_[14509697511269710983]": {
"$type": "EditorEntitySortComponent",
"Id": 14509697511269710983
},
"Component_[271930369355383880]": {
"$type": "EditorEntityIconComponent",
"Id": 271930369355383880
},
"Component_[5015186380056948439]": {
"$type": "EditorInspectorComponent",
"Id": 5015186380056948439
},
"Component_[6297637832938894772]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 6297637832938894772,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-0.0018702250672504306,
2.9982283115386963,
3.0017592906951904
],
"Rotate": [
20.080352783203125,
-0.020488755777478218,
179.92381286621094
]
}
},
"Component_[6611378759823339947]": {
"$type": "EditorPendingCompositionComponent",
"Id": 6611378759823339947
},
"Component_[8475839846509409509]": {
"$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent",
"Id": 8475839846509409509,
"Controller": {
"Configuration": {
"Field of View": 90.00020599365234,
"EditorEntityId": 478448534945
}
}
},
"Component_[9659542522325095386]": {
"$type": "EditorVisibilityComponent",
"Id": 9659542522325095386
}
}
}
}
}

@ -0,0 +1,12 @@
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0

@ -0,0 +1,943 @@
{
"ContainerEntity": {
"Id": "ContainerEntity",
"Name": "hermanubis_high",
"Components": {
"Component_[10182366347512475253]": {
"$type": "EditorPrefabComponent",
"Id": 10182366347512475253
},
"Component_[12917798267488243668]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12917798267488243668
},
"Component_[3261249813163778338]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3261249813163778338
},
"Component_[3837204912784440039]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 3837204912784440039
},
"Component_[4272963378099646759]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 4272963378099646759,
"Parent Entity": ""
},
"Component_[4848458548047175816]": {
"$type": "EditorVisibilityComponent",
"Id": 4848458548047175816
},
"Component_[5787060997243919943]": {
"$type": "EditorInspectorComponent",
"Id": 5787060997243919943
},
"Component_[7804170251266531779]": {
"$type": "EditorLockComponent",
"Id": 7804170251266531779
},
"Component_[7874177159288365422]": {
"$type": "EditorEntitySortComponent",
"Id": 7874177159288365422,
"Child Entity Order": [
"Entity_[243647107259]",
"Entity_[247179151093]",
"Entity_[262891076837]",
"Entity_[242884183797]",
"Entity_[258596109541]",
"Entity_[267186044133]",
"Entity_[275775978725]",
"Entity_[250006174949]"
]
},
"Component_[8018146290632383969]": {
"$type": "EditorEntityIconComponent",
"Id": 8018146290632383969
},
"Component_[8452360690590857075]": {
"$type": "SelectionComponent",
"Id": 8452360690590857075
}
}
},
"Entities": {
"Entity_[242884183797]": {
"Id": "Entity_[242884183797]",
"Name": "Hermanubis_stone",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}",
"subId": 274433667
},
"assetHint": "objects/hermanubis/hermanubis_high.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{A78EA2FC-688B-5E3A-A7F6-DB413D11D4CF}"
},
"assetHint": "materials/presets/pbr/metal_chrome_matte.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
3.810185432434082,
0.0,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[243647107259]": {
"Id": "Entity_[243647107259]",
"Name": "Camera1",
"Components": {
"Component_[11276153162797125616]": {
"$type": "GenericComponentWrapper",
"Id": 11276153162797125616,
"m_template": {
"$type": "FlyCameraInputComponent"
}
},
"Component_[11484120648160206262]": {
"$type": "EditorLockComponent",
"Id": 11484120648160206262
},
"Component_[14251459960897306807]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 14251459960897306807,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-0.10533800721168518,
-4.001697063446045,
3.061025619506836
],
"Rotate": [
-19.998117446899414,
0.01881762035191059,
-0.051706261932849884
],
"Scale": [
0.9999998807907104,
1.0,
1.0
]
}
},
"Component_[149351061984148634]": {
"$type": "EditorOnlyEntityComponent",
"Id": 149351061984148634
},
"Component_[15121925351155689107]": {
"$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent",
"Id": 15121925351155689107,
"Controller": {
"Configuration": {
"EditorEntityId": 243647107259
}
}
},
"Component_[15327903729148812780]": {
"$type": "EditorPendingCompositionComponent",
"Id": 15327903729148812780
},
"Component_[17667820301809320373]": {
"$type": "EditorEntityIconComponent",
"Id": 17667820301809320373
},
"Component_[17708351813187009272]": {
"$type": "EditorVisibilityComponent",
"Id": 17708351813187009272
},
"Component_[17941668830905411554]": {
"$type": "SelectionComponent",
"Id": 17941668830905411554
},
"Component_[48451466091772435]": {
"$type": "EditorEntitySortComponent",
"Id": 48451466091772435
},
"Component_[6163614082436403601]": {
"$type": "EditorInspectorComponent",
"Id": 6163614082436403601,
"ComponentOrderEntryArray": [
{
"ComponentId": 14251459960897306807
},
{
"ComponentId": 15121925351155689107,
"SortIndex": 1
},
{
"ComponentId": 11935019334576395684,
"SortIndex": 2
}
]
},
"Component_[8660334631968180943]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 8660334631968180943
}
}
},
"Entity_[247179151093]": {
"Id": "Entity_[247179151093]",
"Name": "Hermanubis_brass",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}",
"subId": 274433667
},
"assetHint": "objects/hermanubis/hermanubis_high.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{80E0F2A7-1EE4-597F-80EF-985C65BCE2EB}"
},
"assetHint": "materials/presets/pbr/metal_brass.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-4.019397258758545,
-0.034557100385427475,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[250006174949]": {
"Id": "Entity_[250006174949]",
"Name": "WorldOrigin",
"Components": {
"Component_[13379444112629774116]": {
"$type": "EditorEntityIconComponent",
"Id": 13379444112629774116
},
"Component_[13797113876161133062]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 13797113876161133062,
"Parent Entity": "ContainerEntity"
},
"Component_[16382506042739704306]": {
"$type": "EditorInspectorComponent",
"Id": 16382506042739704306,
"ComponentOrderEntryArray": [
{
"ComponentId": 13797113876161133062
},
{
"ComponentId": 8816319458242680670,
"SortIndex": 1
}
]
},
"Component_[2147729086581105478]": {
"$type": "EditorOnlyEntityComponent",
"Id": 2147729086581105478
},
"Component_[2433100672102773575]": {
"$type": "SelectionComponent",
"Id": 2433100672102773575
},
"Component_[4832829387489613630]": {
"$type": "EditorVisibilityComponent",
"Id": 4832829387489613630
},
"Component_[5585931842723227683]": {
"$type": "EditorEntitySortComponent",
"Id": 5585931842723227683,
"Child Entity Order": [
"Entity_[254301142245]"
]
},
"Component_[7088004383223117498]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 7088004383223117498
},
"Component_[7856264459806503732]": {
"$type": "EditorPendingCompositionComponent",
"Id": 7856264459806503732
},
"Component_[8816319458242680670]": {
"$type": "AZ::Render::EditorGridComponent",
"Id": 8816319458242680670
},
"Component_[930042309700959235]": {
"$type": "EditorLockComponent",
"Id": 930042309700959235
}
}
},
"Entity_[254301142245]": {
"Id": "Entity_[254301142245]",
"Name": "GlobalSkylight",
"Components": {
"Component_[10076500561520682485]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 10076500561520682485,
"Parent Entity": "Entity_[250006174949]"
},
"Component_[12626877995248630950]": {
"$type": "EditorInspectorComponent",
"Id": 12626877995248630950,
"ComponentOrderEntryArray": [
{
"ComponentId": 10076500561520682485
},
{
"ComponentId": 8158442301445120126,
"SortIndex": 1
},
{
"ComponentId": 7260006984216245935,
"SortIndex": 2
}
]
},
"Component_[13040837632921717329]": {
"$type": "SelectionComponent",
"Id": 13040837632921717329
},
"Component_[1390505494369101864]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 1390505494369101864
},
"Component_[6733278858932131836]": {
"$type": "EditorVisibilityComponent",
"Id": 6733278858932131836
},
"Component_[7260006984216245935]": {
"$type": "AZ::Render::EditorImageBasedLightComponent",
"Id": 7260006984216245935,
"Controller": {
"Configuration": {
"diffuseImageAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 3000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_ibldiffuse.exr.streamingimage"
},
"specularImageAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 2000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage"
}
}
}
},
"Component_[7944006745008331817]": {
"$type": "EditorEntitySortComponent",
"Id": 7944006745008331817
},
"Component_[8158442301445120126]": {
"$type": "AZ::Render::EditorHDRiSkyboxComponent",
"Id": 8158442301445120126,
"Controller": {
"Configuration": {
"CubemapAsset": {
"assetId": {
"guid": "{3B78EA69-7CF0-56A7-A49A-110B88412666}",
"subId": 1000
},
"assetHint": "lightingpresets/greenwich_park_02_4k_iblskyboxcm.exr.streamingimage"
}
}
}
},
"Component_[8255370213772594097]": {
"$type": "EditorOnlyEntityComponent",
"Id": 8255370213772594097
},
"Component_[8551180373364097938]": {
"$type": "EditorLockComponent",
"Id": 8551180373364097938
},
"Component_[8852330656608249928]": {
"$type": "EditorPendingCompositionComponent",
"Id": 8852330656608249928
},
"Component_[8913694496991926693]": {
"$type": "EditorEntityIconComponent",
"Id": 8913694496991926693
}
}
},
"Entity_[258596109541]": {
"Id": "Entity_[258596109541]",
"Name": "Hermanubis_stone",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}",
"subId": 274433667
},
"assetHint": "objects/hermanubis/hermanubis_high.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{B7C712DC-4839-58BB-B522-A4F120084CF5}"
},
"assetHint": "materials/presets/pbr/metal_chrome.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
1.1189539432525635,
0.0,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[262891076837]": {
"Id": "Entity_[262891076837]",
"Name": "Hermanubis_brass",
"Components": {
"Component_[1026780512255775175]": {
"$type": "EditorEntityIconComponent",
"Id": 1026780512255775175
},
"Component_[10882452951986489612]": {
"$type": "SelectionComponent",
"Id": 10882452951986489612
},
"Component_[12454042755417175050]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 12454042755417175050,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{35A45F31-F1C1-5076-8B51-FF599E2EEBAA}",
"subId": 274433667
},
"assetHint": "objects/hermanubis/hermanubis_high.azmodel"
},
"LodOverride": 255
}
}
},
"Component_[13691807045809495479]": {
"$type": "EditorMaterialComponent",
"Id": 13691807045809495479,
"Controller": {
"Configuration": {
"materials": {
"{}": {
"MaterialAsset": {
"assetId": {
"guid": "{CAF50181-3384-5DF2-9304-C6E48E83C72D}"
},
"assetHint": "materials/presets/pbr/metal_chrome_polished.azmaterial"
}
}
}
}
},
"materialSlotsByLodEnabled": true
},
"Component_[14490373655742304057]": {
"$type": "EditorPendingCompositionComponent",
"Id": 14490373655742304057
},
"Component_[15248132570755287431]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15248132570755287431
},
"Component_[16950375358457415777]": {
"$type": "EditorVisibilityComponent",
"Id": 16950375358457415777
},
"Component_[17852268252813268496]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 17852268252813268496,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-1.4824472665786743,
-0.034557100385427475,
0.0
]
}
},
"Component_[3867610358542973898]": {
"$type": "EditorEntitySortComponent",
"Id": 3867610358542973898
},
"Component_[7717372065847089412]": {
"$type": "EditorOnlyEntityComponent",
"Id": 7717372065847089412
},
"Component_[7783943040473764331]": {
"$type": "EditorInspectorComponent",
"Id": 7783943040473764331,
"ComponentOrderEntryArray": [
{
"ComponentId": 17852268252813268496
},
{
"ComponentId": 12454042755417175050,
"SortIndex": 1
},
{
"ComponentId": 13691807045809495479,
"SortIndex": 2
}
]
},
"Component_[833407121913837256]": {
"$type": "EditorLockComponent",
"Id": 833407121913837256
}
}
},
"Entity_[267186044133]": {
"Id": "Entity_[267186044133]",
"Name": "SphereLight",
"Components": {
"Component_[10922228943444131599]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10922228943444131599
},
"Component_[11625534306113165068]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11625534306113165068,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
0.2636711895465851,
2.2845842838287354,
0.22468790411949158
]
}
},
"Component_[12372418243816154216]": {
"$type": "EditorSphereShapeComponent",
"Id": 12372418243816154216,
"ShapeColor": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005,
1.0
]
},
"Component_[12579170654872581897]": {
"$type": "EditorLockComponent",
"Id": 12579170654872581897
},
"Component_[12844637542561882557]": {
"$type": "EditorOnlyEntityComponent",
"Id": 12844637542561882557
},
"Component_[13087890528096920855]": {
"$type": "EditorInspectorComponent",
"Id": 13087890528096920855,
"ComponentOrderEntryArray": [
{
"ComponentId": 11625534306113165068
},
{
"ComponentId": 13427905514841050195,
"SortIndex": 1
},
{
"ComponentId": 12372418243816154216,
"SortIndex": 2
}
]
},
"Component_[13427905514841050195]": {
"$type": "AZ::Render::EditorAreaLightComponent",
"Id": 13427905514841050195,
"Controller": {
"Configuration": {
"LightType": 1,
"Color": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005
],
"IntensityMode": 1,
"Intensity": 676.7677001953125,
"AttenuationRadius": 226.51287841796875
}
}
},
"Component_[15364092815744365073]": {
"$type": "SelectionComponent",
"Id": 15364092815744365073
},
"Component_[2481373975540551564]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2481373975540551564
},
"Component_[4101167782224846352]": {
"$type": "EditorEntityIconComponent",
"Id": 4101167782224846352
},
"Component_[8664715119660216219]": {
"$type": "EditorEntitySortComponent",
"Id": 8664715119660216219
},
"Component_[8952093761729701957]": {
"$type": "EditorVisibilityComponent",
"Id": 8952093761729701957,
"VisibilityFlag": false
}
}
},
"Entity_[275775978725]": {
"Id": "Entity_[275775978725]",
"Name": "TubeLight",
"Components": {
"Component_[10922228943444131599]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10922228943444131599,
"DisabledComponents": [
{
"$type": "EditorSphereShapeComponent",
"Id": 12372418243816154216,
"ShapeColor": [
0.3289234936237335,
0.7307698130607605,
0.14859239757061005,
1.0
]
}
]
},
"Component_[11625534306113165068]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 11625534306113165068,
"Parent Entity": "ContainerEntity",
"Transform Data": {
"Translate": [
-4.275930881500244,
0.5104026794433594,
2.3807857036590576
],
"Rotate": [
270.0043029785156,
0.16617189347743988,
268.51611328125
]
}
},
"Component_[12579170654872581897]": {
"$type": "EditorLockComponent",
"Id": 12579170654872581897
},
"Component_[12844637542561882557]": {
"$type": "EditorOnlyEntityComponent",
"Id": 12844637542561882557
},
"Component_[13087890528096920855]": {
"$type": "EditorInspectorComponent",
"Id": 13087890528096920855,
"ComponentOrderEntryArray": [
{
"ComponentId": 11625534306113165068
},
{
"ComponentId": 13427905514841050195,
"SortIndex": 1
},
{
"ComponentId": 12372418243816154216,
"SortIndex": 2
},
{
"ComponentId": 2193911499802409037,
"SortIndex": 3
}
]
},
"Component_[13427905514841050195]": {
"$type": "AZ::Render::EditorAreaLightComponent",
"Id": 13427905514841050195,
"Controller": {
"Configuration": {
"LightType": 3,
"Color": [
0.8521705865859985,
0.7865872979164124,
0.6079347133636475
],
"IntensityMode": 1,
"Intensity": 10000.0,
"AttenuationRadius": 21608.193359375
}
}
},
"Component_[15364092815744365073]": {
"$type": "SelectionComponent",
"Id": 15364092815744365073
},
"Component_[2193911499802409037]": {
"$type": "EditorCapsuleShapeComponent",
"Id": 2193911499802409037,
"ShapeColor": [
0.8521705865859985,
0.7865872979164124,
0.6079347133636475,
1.0
],
"CapsuleShape": {
"Configuration": {
"Height": 5.0,
"Radius": 0.10000000149011612
}
}
},
"Component_[2481373975540551564]": {
"$type": "EditorPendingCompositionComponent",
"Id": 2481373975540551564
},
"Component_[4101167782224846352]": {
"$type": "EditorEntityIconComponent",
"Id": 4101167782224846352
},
"Component_[8664715119660216219]": {
"$type": "EditorEntitySortComponent",
"Id": 8664715119660216219
},
"Component_[8952093761729701957]": {
"$type": "EditorVisibilityComponent",
"Id": 8952093761729701957,
"VisibilityFlag": false
}
}
}
}
}

@ -0,0 +1,12 @@
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0

@ -0,0 +1,747 @@
{
"ContainerEntity": {
"Id": "Entity_[1146574390643]",
"Name": "Level",
"Components": {
"Component_[10641544592923449938]": {
"$type": "EditorInspectorComponent",
"Id": 10641544592923449938
},
"Component_[12039882709170782873]": {
"$type": "EditorOnlyEntityComponent",
"Id": 12039882709170782873
},
"Component_[12265484671603697631]": {
"$type": "EditorPendingCompositionComponent",
"Id": 12265484671603697631
},
"Component_[14126657869720434043]": {
"$type": "EditorEntitySortComponent",
"Id": 14126657869720434043,
"Child Entity Order": [
"Entity_[1176639161715]",
"Entity_[12685882829720]",
"Entity_[31145534614197]"
]
},
"Component_[15230859088967841193]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 15230859088967841193,
"Parent Entity": ""
},
"Component_[16239496886950819870]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 16239496886950819870
},
"Component_[5688118765544765547]": {
"$type": "EditorEntityIconComponent",
"Id": 5688118765544765547
},
"Component_[6545738857812235305]": {
"$type": "SelectionComponent",
"Id": 6545738857812235305
},
"Component_[7247035804068349658]": {
"$type": "EditorPrefabComponent",
"Id": 7247035804068349658
},
"Component_[9307224322037797205]": {
"$type": "EditorLockComponent",
"Id": 9307224322037797205
},
"Component_[9562516168917670048]": {
"$type": "EditorVisibilityComponent",
"Id": 9562516168917670048
}
}
},
"Entities": {
"Entity_[1155164325235]": {
"Id": "Entity_[1155164325235]",
"Name": "Sun",
"Components": {
"Component_[10440557478882592717]": {
"$type": "SelectionComponent",
"Id": 10440557478882592717
},
"Component_[13620450453324765907]": {
"$type": "EditorLockComponent",
"Id": 13620450453324765907
},
"Component_[2134313378593666258]": {
"$type": "EditorInspectorComponent",
"Id": 2134313378593666258
},
"Component_[234010807770404186]": {
"$type": "EditorVisibilityComponent",
"Id": 234010807770404186
},
"Component_[2970359110423865725]": {
"$type": "EditorEntityIconComponent",
"Id": 2970359110423865725
},
"Component_[3722854130373041803]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3722854130373041803
},
"Component_[5992533738676323195]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 5992533738676323195
},
"Component_[7378860763541895402]": {
"$type": "AZ::Render::EditorDirectionalLightComponent",
"Id": 7378860763541895402,
"Controller": {
"Configuration": {
"Intensity": 1.0,
"CameraEntityId": "",
"ShadowFilterMethod": 1
}
}
},
"Component_[7892834440890947578]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 7892834440890947578,
"Parent Entity": "Entity_[1176639161715]",
"Transform Data": {
"Translate": [
0.0,
0.0,
13.487043380737305
],
"Rotate": [
-76.13099670410156,
-0.847000002861023,
-15.8100004196167
]
}
},
"Component_[8599729549570828259]": {
"$type": "EditorEntitySortComponent",
"Id": 8599729549570828259
},
"Component_[952797371922080273]": {
"$type": "EditorPendingCompositionComponent",
"Id": 952797371922080273
}
}
},
"Entity_[1159459292531]": {
"Id": "Entity_[1159459292531]",
"Name": "Ground",
"Components": {
"Component_[11701138785793981042]": {
"$type": "SelectionComponent",
"Id": 11701138785793981042
},
"Component_[12260880513256986252]": {
"$type": "EditorEntityIconComponent",
"Id": 12260880513256986252
},
"Component_[13711420870643673468]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 13711420870643673468
},
"Component_[138002849734991713]": {
"$type": "EditorOnlyEntityComponent",
"Id": 138002849734991713
},
"Component_[16578565737331764849]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 16578565737331764849,
"Parent Entity": "Entity_[1176639161715]"
},
"Component_[16919232076966545697]": {
"$type": "EditorInspectorComponent",
"Id": 16919232076966545697
},
"Component_[5182430712893438093]": {
"$type": "EditorMaterialComponent",
"Id": 5182430712893438093
},
"Component_[5675108321710651991]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 5675108321710651991,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{0CD745C0-6AA8-569A-A68A-73A3270986C4}",
"subId": 277889906
},
"assetHint": "objects/groudplane/groundplane_512x512m.azmodel"
}
}
}
},
"Component_[5681893399601237518]": {
"$type": "EditorEntitySortComponent",
"Id": 5681893399601237518
},
"Component_[592692962543397545]": {
"$type": "EditorPendingCompositionComponent",
"Id": 592692962543397545
},
"Component_[7090012899106946164]": {
"$type": "EditorLockComponent",
"Id": 7090012899106946164
},
"Component_[9410832619875640998]": {
"$type": "EditorVisibilityComponent",
"Id": 9410832619875640998
}
}
},
"Entity_[1163754259827]": {
"Id": "Entity_[1163754259827]",
"Name": "Camera",
"Components": {
"Component_[11895140916889160460]": {
"$type": "EditorEntityIconComponent",
"Id": 11895140916889160460
},
"Component_[16880285896855930892]": {
"$type": "{CA11DA46-29FF-4083-B5F6-E02C3A8C3A3D} EditorCameraComponent",
"Id": 16880285896855930892,
"Controller": {
"Configuration": {
"Field of View": 55.0,
"EditorEntityId": 11050384689878106598
}
}
},
"Component_[17187464423780271193]": {
"$type": "EditorLockComponent",
"Id": 17187464423780271193
},
"Component_[17495696818315413311]": {
"$type": "EditorEntitySortComponent",
"Id": 17495696818315413311
},
"Component_[18086214374043522055]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 18086214374043522055,
"Parent Entity": "Entity_[1176639161715]",
"Transform Data": {
"Translate": [
-2.3000001907348633,
-3.9368600845336914,
1.0
],
"Rotate": [
-2.050307512283325,
1.9552897214889526,
-43.623355865478516
]
}
},
"Component_[18387556550380114975]": {
"$type": "SelectionComponent",
"Id": 18387556550380114975
},
"Component_[2654521436129313160]": {
"$type": "EditorVisibilityComponent",
"Id": 2654521436129313160
},
"Component_[5265045084611556958]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 5265045084611556958
},
"Component_[7169798125182238623]": {
"$type": "EditorPendingCompositionComponent",
"Id": 7169798125182238623
},
"Component_[7255796294953281766]": {
"$type": "GenericComponentWrapper",
"Id": 7255796294953281766,
"m_template": {
"$type": "FlyCameraInputComponent"
}
},
"Component_[8866210352157164042]": {
"$type": "EditorInspectorComponent",
"Id": 8866210352157164042
},
"Component_[9129253381063760879]": {
"$type": "EditorOnlyEntityComponent",
"Id": 9129253381063760879
}
}
},
"Entity_[1168049227123]": {
"Id": "Entity_[1168049227123]",
"Name": "Grid",
"Components": {
"Component_[11443347433215807130]": {
"$type": "EditorEntityIconComponent",
"Id": 11443347433215807130
},
"Component_[11779275529534764488]": {
"$type": "SelectionComponent",
"Id": 11779275529534764488
},
"Component_[14249419413039427459]": {
"$type": "EditorInspectorComponent",
"Id": 14249419413039427459
},
"Component_[15448581635946161318]": {
"$type": "AZ::Render::EditorGridComponent",
"Id": 15448581635946161318,
"Controller": {
"Configuration": {
"primarySpacing": 4.0,
"primaryColor": [
0.501960813999176,
0.501960813999176,
0.501960813999176
],
"secondarySpacing": 0.5,
"secondaryColor": [
0.250980406999588,
0.250980406999588,
0.250980406999588
]
}
}
},
"Component_[1843303322527297409]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 1843303322527297409
},
"Component_[380249072065273654]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 380249072065273654,
"Parent Entity": "Entity_[1176639161715]"
},
"Component_[7476660583684339787]": {
"$type": "EditorPendingCompositionComponent",
"Id": 7476660583684339787
},
"Component_[7557626501215118375]": {
"$type": "EditorEntitySortComponent",
"Id": 7557626501215118375
},
"Component_[7984048488947365511]": {
"$type": "EditorVisibilityComponent",
"Id": 7984048488947365511
},
"Component_[8118181039276487398]": {
"$type": "EditorOnlyEntityComponent",
"Id": 8118181039276487398
},
"Component_[9189909764215270515]": {
"$type": "EditorLockComponent",
"Id": 9189909764215270515
}
}
},
"Entity_[1172344194419]": {
"Id": "Entity_[1172344194419]",
"Name": "Shader Ball",
"Components": {
"Component_[10789351944715265527]": {
"$type": "EditorOnlyEntityComponent",
"Id": 10789351944715265527
},
"Component_[12037033284781049225]": {
"$type": "EditorEntitySortComponent",
"Id": 12037033284781049225
},
"Component_[13759153306105970079]": {
"$type": "EditorPendingCompositionComponent",
"Id": 13759153306105970079
},
"Component_[14135560884830586279]": {
"$type": "EditorInspectorComponent",
"Id": 14135560884830586279
},
"Component_[16247165675903986673]": {
"$type": "EditorVisibilityComponent",
"Id": 16247165675903986673
},
"Component_[18082433625958885247]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 18082433625958885247
},
"Component_[6472623349872972660]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 6472623349872972660,
"Parent Entity": "Entity_[1176639161715]",
"Transform Data": {
"Rotate": [
0.0,
0.10000000149011612,
180.0
]
}
},
"Component_[6495255223970673916]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 6495255223970673916,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{FD340C30-755C-5911-92A3-19A3F7A77931}",
"subId": 281415304
},
"assetHint": "objects/shaderball/shaderball_default_1m.azmodel"
}
}
}
},
"Component_[8056625192494070973]": {
"$type": "SelectionComponent",
"Id": 8056625192494070973
},
"Component_[8550141614185782969]": {
"$type": "EditorEntityIconComponent",
"Id": 8550141614185782969
},
"Component_[9439770997198325425]": {
"$type": "EditorLockComponent",
"Id": 9439770997198325425
}
}
},
"Entity_[1176639161715]": {
"Id": "Entity_[1176639161715]",
"Name": "Atom Default Environment",
"Components": {
"Component_[10757302973393310045]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 10757302973393310045,
"Parent Entity": "Entity_[1146574390643]"
},
"Component_[14505817420424255464]": {
"$type": "EditorInspectorComponent",
"Id": 14505817420424255464,
"ComponentOrderEntryArray": [
{
"ComponentId": 10757302973393310045
}
]
},
"Component_[14988041764659020032]": {
"$type": "EditorLockComponent",
"Id": 14988041764659020032
},
"Component_[15808690248755038124]": {
"$type": "SelectionComponent",
"Id": 15808690248755038124
},
"Component_[15900837685796817138]": {
"$type": "EditorVisibilityComponent",
"Id": 15900837685796817138
},
"Component_[3298767348226484884]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3298767348226484884
},
"Component_[4076975109609220594]": {
"$type": "EditorPendingCompositionComponent",
"Id": 4076975109609220594
},
"Component_[5679760548946028854]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 5679760548946028854
},
"Component_[5855590796136709437]": {
"$type": "EditorEntitySortComponent",
"Id": 5855590796136709437,
"Child Entity Order": [
"Entity_[1155164325235]",
"Entity_[1180934129011]",
"Entity_[1172344194419]",
"Entity_[1168049227123]",
"Entity_[1163754259827]",
"Entity_[1159459292531]"
]
},
"Component_[9277695270015777859]": {
"$type": "EditorEntityIconComponent",
"Id": 9277695270015777859
}
}
},
"Entity_[1180934129011]": {
"Id": "Entity_[1180934129011]",
"Name": "Global Sky",
"Components": {
"Component_[11231930600558681245]": {
"$type": "AZ::Render::EditorHDRiSkyboxComponent",
"Id": 11231930600558681245,
"Controller": {
"Configuration": {
"CubemapAsset": {
"assetId": {
"guid": "{215E47FD-D181-5832-B1AB-91673ABF6399}",
"subId": 1000
},
"assetHint": "lightingpresets/highcontrast/goegap_4k_skyboxcm.exr.streamingimage"
}
}
}
},
"Component_[11980494120202836095]": {
"$type": "SelectionComponent",
"Id": 11980494120202836095
},
"Component_[1428633914413949476]": {
"$type": "EditorLockComponent",
"Id": 1428633914413949476
},
"Component_[14936200426671614999]": {
"$type": "AZ::Render::EditorImageBasedLightComponent",
"Id": 14936200426671614999,
"Controller": {
"Configuration": {
"diffuseImageAsset": {
"assetId": {
"guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}",
"subId": 3000
},
"assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_ibldiffuse.exr.streamingimage"
},
"specularImageAsset": {
"assetId": {
"guid": "{3FD09945-D0F2-55C8-B9AF-B2FD421FE3BE}",
"subId": 2000
},
"assetHint": "lightingpresets/highcontrast/goegap_4k_iblglobalcm_iblspecular.exr.streamingimage"
}
}
}
},
"Component_[14994774102579326069]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 14994774102579326069
},
"Component_[15417479889044493340]": {
"$type": "EditorPendingCompositionComponent",
"Id": 15417479889044493340
},
"Component_[15826613364991382688]": {
"$type": "EditorEntitySortComponent",
"Id": 15826613364991382688
},
"Component_[1665003113283562343]": {
"$type": "EditorOnlyEntityComponent",
"Id": 1665003113283562343
},
"Component_[3704934735944502280]": {
"$type": "EditorEntityIconComponent",
"Id": 3704934735944502280
},
"Component_[5698542331457326479]": {
"$type": "EditorVisibilityComponent",
"Id": 5698542331457326479
},
"Component_[6644513399057217122]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 6644513399057217122,
"Parent Entity": "Entity_[1176639161715]"
},
"Component_[931091830724002070]": {
"$type": "EditorInspectorComponent",
"Id": 931091830724002070
}
}
},
"Entity_[12685882829720]": {
"Id": "Entity_[12685882829720]",
"Name": "GlobalGameData",
"Components": {
"Component_[11240656689650225106]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 11240656689650225106
},
"Component_[13863201640354873385]": {
"$type": "EditorPendingCompositionComponent",
"Id": 13863201640354873385
},
"Component_[14671754037021562789]": {
"$type": "EditorInspectorComponent",
"Id": 14671754037021562789
},
"Component_[14750978061505735417]": {
"$type": "EditorScriptCanvasComponent",
"Id": 14750978061505735417,
"m_name": "GlobalGameData",
"m_assetHolder": {
"m_asset": {
"assetId": {
"guid": "{B16589A0-EA01-56BC-8141-91A3967FB95F}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptcanvas"
}
},
"runtimeDataIsValid": true,
"runtimeDataOverrides": {
"source": {
"assetId": {
"guid": "{B16589A0-EA01-56BC-8141-91A3967FB95F}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptcanvas"
}
}
},
"Component_[16436925042043744033]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 16436925042043744033,
"Parent Entity": "Entity_[1146574390643]",
"Transform Data": {
"Translate": [
0.0,
0.10000038146972656,
4.005393981933594
]
}
},
"Component_[16974524495698916088]": {
"$type": "EditorOnlyEntityComponent",
"Id": 16974524495698916088
},
"Component_[2753700837834389204]": {
"$type": "EditorLockComponent",
"Id": 2753700837834389204
},
"Component_[3766473509503096065]": {
"$type": "SelectionComponent",
"Id": 3766473509503096065
},
"Component_[4025955184206569130]": {
"$type": "EditorEntitySortComponent",
"Id": 4025955184206569130
},
"Component_[7909743395732791573]": {
"$type": "EditorVisibilityComponent",
"Id": 7909743395732791573
},
"Component_[9550161640684119498]": {
"$type": "EditorEntityIconComponent",
"Id": 9550161640684119498
}
}
},
"Entity_[31145534614197]": {
"Id": "Entity_[31145534614197]",
"Name": "NetLevelEntity",
"Components": {
"Component_[12132849363414901338]": {
"$type": "EditorEntityIconComponent",
"Id": 12132849363414901338
},
"Component_[12302672911455629152]": {
"$type": "SelectionComponent",
"Id": 12302672911455629152
},
"Component_[14169903623243423134]": {
"$type": "EditorVisibilityComponent",
"Id": 14169903623243423134
},
"Component_[14607413934411389854]": {
"$type": "EditorInspectorComponent",
"Id": 14607413934411389854
},
"Component_[15396284312416541768]": {
"$type": "GenericComponentWrapper",
"Id": 15396284312416541768,
"m_template": {
"$type": "Multiplayer::LocalPredictionPlayerInputComponent"
}
},
"Component_[15494977028055234270]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 15494977028055234270
},
"Component_[16325088972532345964]": {
"$type": "EditorLockComponent",
"Id": 16325088972532345964
},
"Component_[1986030426392465743]": {
"$type": "EditorEntitySortComponent",
"Id": 1986030426392465743
},
"Component_[4591476848838823508]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 4591476848838823508,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{80FA8BAF-4A5B-5937-9679-2E592E841A3A}",
"subId": 275306041
},
"assetHint": "assets/physics/collider_pxmeshautoassigned/spherebot/r0-b_body.azmodel"
}
}
}
},
"Component_[7256163899440301540]": {
"$type": "EditorScriptCanvasComponent",
"Id": 7256163899440301540,
"m_name": "AutoComponent_RPC_NetLevelEntity",
"m_assetHolder": {
"m_asset": {
"assetId": {
"guid": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas"
}
},
"runtimeDataIsValid": true,
"runtimeDataOverrides": {
"source": {
"assetId": {
"guid": "{1D517006-AC01-5ECA-AE66-0E007871F0CD}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc_netlevelentity.scriptcanvas"
}
}
},
"Component_[731336627222243355]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 731336627222243355,
"Parent Entity": "Entity_[1146574390643]",
"Transform Data": {
"Translate": [
2.561863899230957,
-1.038161277770996,
0.1487259864807129
]
}
},
"Component_[8012379125499217348]": {
"$type": "EditorPendingCompositionComponent",
"Id": 8012379125499217348
},
"Component_[8122568562140740597]": {
"$type": "GenericComponentWrapper",
"Id": 8122568562140740597,
"m_template": {
"$type": "Multiplayer::NetworkTransformComponent"
}
},
"Component_[8805228647591404845]": {
"$type": "GenericComponentWrapper",
"Id": 8805228647591404845,
"m_template": {
"$type": "NetBindComponent"
}
},
"Component_[9816897251206708579]": {
"$type": "GenericComponentWrapper",
"Id": 9816897251206708579,
"m_template": {
"$type": "AutomatedTesting::NetworkTestPlayerComponent"
}
},
"Component_[9880860858035405475]": {
"$type": "EditorOnlyEntityComponent",
"Id": 9880860858035405475
}
}
}
}
}

@ -0,0 +1,662 @@
{
"Type": "JsonSerialization",
"Version": 1,
"ClassName": "ScriptCanvasData",
"ClassData": {
"m_scriptCanvas": {
"Id": {
"id": 17732469402520
},
"Name": "Untitled-1",
"Components": {
"Component_[16492301523567686923]": {
"$type": "{4D755CA9-AB92-462C-B24F-0B3376F19967} Graph",
"Id": 16492301523567686923,
"m_graphData": {
"m_nodes": [
{
"Id": {
"id": 17741059337112
},
"Name": "SC-Node(OperatorAdd)",
"Components": {
"Component_[11612963594766700030]": {
"$type": "OperatorAdd",
"Id": 11612963594766700030,
"Slots": [
{
"id": {
"m_id": "{B7529112-C29F-45F0-811C-DB8EE18EB8B8}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "In",
"Descriptor": {
"ConnectionType": 1,
"SlotType": 1
}
},
{
"id": {
"m_id": "{49618851-F6B2-4B90-BFDF-ADBAAA84BBA4}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "Out",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
}
},
{
"id": {
"m_id": "{4612C904-82DF-4B48-8485-4C878AF9A4D1}"
},
"DynamicTypeOverride": 3,
"contracts": [
{
"$type": "SlotTypeContract"
},
{
"$type": "MathOperatorContract",
"NativeTypes": [
{
"m_type": 3
},
{
"m_type": 6
},
{
"m_type": 8
},
{
"m_type": 9
},
{
"m_type": 10
},
{
"m_type": 11
},
{
"m_type": 12
},
{
"m_type": 14
},
{
"m_type": 15
}
]
}
],
"slotName": "Number",
"toolTip": "An operand to use in performing the specified Operation",
"DisplayDataType": {
"m_type": 3
},
"DisplayGroup": {
"Value": 1114760223
},
"Descriptor": {
"ConnectionType": 1,
"SlotType": 2
},
"DynamicGroup": {
"Value": 1114760223
},
"DataType": 1,
"IsReference": true,
"VariableReference": {
"m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}"
}
},
{
"id": {
"m_id": "{610B3BFB-9043-47A0-9694-5F14A1947E36}"
},
"DynamicTypeOverride": 3,
"contracts": [
{
"$type": "SlotTypeContract"
},
{
"$type": "MathOperatorContract",
"NativeTypes": [
{
"m_type": 3
},
{
"m_type": 6
},
{
"m_type": 8
},
{
"m_type": 9
},
{
"m_type": 10
},
{
"m_type": 11
},
{
"m_type": 12
},
{
"m_type": 14
},
{
"m_type": 15
}
]
}
],
"slotName": "Number",
"toolTip": "An operand to use in performing the specified Operation",
"DisplayDataType": {
"m_type": 3
},
"DisplayGroup": {
"Value": 1114760223
},
"Descriptor": {
"ConnectionType": 1,
"SlotType": 2
},
"DynamicGroup": {
"Value": 1114760223
},
"DataType": 1
},
{
"id": {
"m_id": "{36FFF1AB-C208-47CB-8271-436C85E0AE42}"
},
"DynamicTypeOverride": 3,
"contracts": [
{
"$type": "SlotTypeContract"
},
{
"$type": "MathOperatorContract",
"NativeTypes": [
{
"m_type": 3
},
{
"m_type": 6
},
{
"m_type": 8
},
{
"m_type": 9
},
{
"m_type": 10
},
{
"m_type": 11
},
{
"m_type": 12
},
{
"m_type": 14
},
{
"m_type": 15
}
]
}
],
"slotName": "Result",
"toolTip": "The result of the specified operation",
"DisplayDataType": {
"m_type": 3
},
"DisplayGroup": {
"Value": 1114760223
},
"Descriptor": {
"ConnectionType": 2,
"SlotType": 2
},
"DynamicGroup": {
"Value": 1114760223
},
"DataType": 1,
"IsReference": true,
"VariableReference": {
"m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}"
}
}
],
"Datums": [
{
"isOverloadedStorage": false,
"scriptCanvasType": {
"m_type": 3
},
"isNullPointer": false,
"$type": "double",
"value": 0.0,
"label": "Number"
},
{
"isOverloadedStorage": false,
"scriptCanvasType": {
"m_type": 3
},
"isNullPointer": false,
"$type": "double",
"value": 1.0,
"label": "Number"
}
]
}
}
},
{
"Id": {
"id": 17736764369816
},
"Name": "ReceiveScriptEvent",
"Components": {
"Component_[16408183651077237195]": {
"$type": "ReceiveScriptEvent",
"Id": 16408183651077237195,
"Slots": [
{
"id": {
"m_id": "{8DC10581-B8DF-473C-9C75-996111DBF560}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "Connect",
"toolTip": "Connect this event handler to the specified entity.",
"Descriptor": {
"ConnectionType": 1,
"SlotType": 1
}
},
{
"id": {
"m_id": "{E60D1951-E56D-41F8-84C5-AD0BA803DD51}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "Disconnect",
"toolTip": "Disconnect this event handler.",
"Descriptor": {
"ConnectionType": 1,
"SlotType": 1
}
},
{
"id": {
"m_id": "{1BCE6CAC-B1C0-43FA-B4F5-E9A34D5064E5}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "OnConnected",
"toolTip": "Signaled when a connection has taken place.",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
}
},
{
"id": {
"m_id": "{FEB42E9A-D562-4BBD-90AB-32255124BFE8}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "OnDisconnected",
"toolTip": "Signaled when this event handler is disconnected.",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
}
},
{
"id": {
"m_id": "{C9EF936B-8C74-42B4-8793-67FC7FD3BCBC}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "OnFailure",
"toolTip": "Signaled when it is not possible to connect this handler.",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
}
},
{
"id": {
"m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "ExecutionSlot:NewPlayerScriptActive",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
},
"IsLatent": true
},
{
"id": {
"m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "Number",
"Descriptor": {
"ConnectionType": 1,
"SlotType": 2
},
"DataType": 1,
"IsReference": true,
"VariableReference": {
"m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}"
}
},
{
"id": {
"m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}"
},
"contracts": [
{
"$type": "SlotTypeContract"
}
],
"slotName": "ExecutionSlot:GetNumberOfActivePlayers",
"Descriptor": {
"ConnectionType": 2,
"SlotType": 1
},
"IsLatent": true
}
],
"Datums": [
{
"isOverloadedStorage": false,
"scriptCanvasType": {
"m_type": 3
},
"isNullPointer": false,
"$type": "double",
"value": 0.0,
"label": "Number"
}
],
"m_version": 1,
"m_eventMap": [
{
"Key": {
"Value": 242067946
},
"Value": {
"m_scriptEventAssetId": {
"guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}"
},
"m_eventName": "GetNumberOfActivePlayers",
"m_eventSlotId": {
"m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}"
},
"m_resultSlotId": {
"m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}"
}
}
},
{
"Key": {
"Value": 2930121176
},
"Value": {
"m_scriptEventAssetId": {
"guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}"
},
"m_eventName": "NewPlayerScriptActive",
"m_eventSlotId": {
"m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}"
}
}
}
],
"m_eventSlotMapping": {
"{155BF981-AD70-4D29-81A6-1517FAE59FB1}": {
"m_id": "{5CD8E1E9-6192-4B7D-9C2C-6C18BE99CF44}"
},
"{65D394D3-F90D-4F10-94BF-F5E1581CF2CF}": {
"m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}"
},
"{67784749-9B41-429C-9C97-3D296182EB67}": {
"m_id": "{9FDB71AA-0F19-406D-82CA-508A2CA10F95}"
}
},
"m_scriptEventAssetId": {
"guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}"
},
"m_asset": {
"assetId": {
"guid": "{FE1B1992-8220-5DD3-A60A-AEC85EB91C54}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/globalgamedata.scriptevents"
}
}
}
}
],
"m_connections": [
{
"Id": {
"id": 17745354304408
},
"Name": "srcEndpoint=(Receive Script Event: ExecutionSlot:NewPlayerScriptActive), destEndpoint=(Add (+): In)",
"Components": {
"Component_[8782209668839578826]": {
"$type": "{64CA5016-E803-4AC4-9A36-BDA2C890C6EB} Connection",
"Id": 8782209668839578826,
"sourceEndpoint": {
"nodeId": {
"id": 17736764369816
},
"slotId": {
"m_id": "{76985C7A-761A-4CEF-9F55-6DD2B136317A}"
}
},
"targetEndpoint": {
"nodeId": {
"id": 17741059337112
},
"slotId": {
"m_id": "{B7529112-C29F-45F0-811C-DB8EE18EB8B8}"
}
}
}
}
}
],
"m_scriptEventAssets": [
[
{
"id": 17736764369816
},
{}
]
]
},
"m_assetType": "{3E2AC8CD-713F-453E-967F-29517F331784}",
"versionData": {
"_grammarVersion": 1,
"_runtimeVersion": 1,
"_fileVersion": 1
},
"m_variableCounter": 1,
"GraphCanvasData": [
{
"Key": {
"id": 17732469402520
},
"Value": {
"ComponentData": {
"{5F84B500-8C45-40D1-8EFC-A5306B241444}": {
"$type": "SceneComponentSaveData"
}
}
}
},
{
"Key": {
"id": 17736764369816
},
"Value": {
"ComponentData": {
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
"$type": "NodeSaveData"
},
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
"$type": "GeometrySaveData",
"Position": [
-360.0,
-60.0
]
},
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
"$type": "StylingComponentSaveData"
},
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
"$type": "PersistentIdComponentSaveData",
"PersistentId": "{C419A1CF-CBA8-416B-BF6C-4B574C3E59E3}"
},
"{D8BBE799-7E4D-495A-B69A-1E3940670891}": {
"$type": "ScriptEventReceiverHandlerNodeDescriptorSaveData",
"EventNames": [
[
{
"Value": 242067946
},
"GetNumberOfActivePlayers"
],
[
{
"Value": 2930121176
},
"NewPlayerScriptActive"
]
]
}
}
}
},
{
"Key": {
"id": 17741059337112
},
"Value": {
"ComponentData": {
"{24CB38BB-1705-4EC5-8F63-B574571B4DCD}": {
"$type": "NodeSaveData"
},
"{328FF15C-C302-458F-A43D-E1794DE0904E}": {
"$type": "GeneralNodeTitleComponentSaveData",
"PaletteOverride": "MathNodeTitlePalette"
},
"{7CC444B1-F9B3-41B5-841B-0C4F2179F111}": {
"$type": "GeometrySaveData",
"Position": [
120.0,
100.0
]
},
"{B0B99C8A-03AF-4CF6-A926-F65C874C3D97}": {
"$type": "StylingComponentSaveData"
},
"{B1F49A35-8408-40DA-B79E-F1E3B64322CE}": {
"$type": "PersistentIdComponentSaveData",
"PersistentId": "{0D0751AD-8164-4196-9C09-8CDB9AAA296F}"
}
}
}
}
],
"StatisticsHelper": {
"InstanceCounter": [
{
"Key": 1244476766431948410,
"Value": 1
},
{
"Key": 1678857390775488101,
"Value": 1
},
{
"Key": 1678857392390856307,
"Value": 1
}
]
}
},
"Component_[16498171485036643402]": {
"$type": "EditorGraphVariableManagerComponent",
"Id": 16498171485036643402,
"m_variableData": {
"m_nameVariableMap": [
{
"Key": {
"m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}"
},
"Value": {
"Datum": {
"isOverloadedStorage": false,
"scriptCanvasType": {
"m_type": 3
},
"isNullPointer": false,
"$type": "double",
"value": 0.0
},
"VariableId": {
"m_id": "{8451E795-6A0E-44CE-81FD-AEF0EE5B0400}"
},
"VariableName": "ActivePlayerCount"
}
}
]
}
}
}
}
}
}

@ -0,0 +1,106 @@
<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="1" 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="{6C6C69BC-EACC-450D-86FB-4CFCEED68F59}" 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="GlobalGameData" 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="{2DF5A7AC-201B-4538-9903-8573C90CA595}" 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="{E2175455-06AB-402A-B4B5-C33D7CB6EAF9}" 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="{1B2DA4A8-A367-4A58-A8CA-8BB6F1F56E66}" 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="{65D394D3-F90D-4F10-94BF-F5E1581CF2CF}" 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="NewPlayerScriptActive" 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="{372785C7-51F9-4F51-989B-2C851F4D000E}" 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="{359740D1-3764-4267-8BEE-1D734C7D81FB}" 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 name="AZStd::vector" field="m_parameters" type="{6ED13EA7-791B-57A8-A4F1-560B5F35B472}"/>
</Class>
<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="{67784749-9B41-429C-9C97-3D296182EB67}" 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="GetNumberOfActivePlayers" 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="{92E33EC2-4B10-42A7-A568-2E1392E85D9F}" 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="{155BF981-AD70-4D29-81A6-1517FAE59FB1}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
<Class name="AZStd::string" field="m_label" value="Number" 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="{110C4B14-11A8-4E9D-8638-5051013A56AC}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
</Class>
</Class>
<Class name="AZStd::vector" field="m_parameters" type="{6ED13EA7-791B-57A8-A4F1-560B5F35B472}"/>
</Class>
</Class>
</Class>
</Class>
</ObjectStream>

@ -0,0 +1,195 @@
{
"ContainerEntity": {
"Id": "ContainerEntity",
"Name": "Player",
"Components": {
"Component_[10603663676997462041]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 10603663676997462041
},
"Component_[11066377844757909329]": {
"$type": "EditorPrefabComponent",
"Id": 11066377844757909329
},
"Component_[11664640320098005944]": {
"$type": "EditorEntityIconComponent",
"Id": 11664640320098005944
},
"Component_[12551690377468870725]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 12551690377468870725,
"Parent Entity": ""
},
"Component_[16402163080075698011]": {
"$type": "EditorOnlyEntityComponent",
"Id": 16402163080075698011
},
"Component_[3491366785918494447]": {
"$type": "EditorLockComponent",
"Id": 3491366785918494447
},
"Component_[4830373679514129871]": {
"$type": "EditorVisibilityComponent",
"Id": 4830373679514129871
},
"Component_[5144323498211834874]": {
"$type": "SelectionComponent",
"Id": 5144323498211834874
},
"Component_[5267607163086533733]": {
"$type": "EditorInspectorComponent",
"Id": 5267607163086533733
},
"Component_[6678300504118618849]": {
"$type": "EditorPendingCompositionComponent",
"Id": 6678300504118618849
},
"Component_[8384628950786300469]": {
"$type": "EditorEntitySortComponent",
"Id": 8384628950786300469,
"Child Entity Order": [
"Entity_[10070247746456]"
]
}
}
},
"Entities": {
"Entity_[10070247746456]": {
"Id": "Entity_[10070247746456]",
"Name": "Player",
"Components": {
"Component_[1059478843478789313]": {
"$type": "EditorInspectorComponent",
"Id": 1059478843478789313,
"ComponentOrderEntryArray": [
{
"ComponentId": 9878555871810913249
},
{
"ComponentId": 11481641385923146202,
"SortIndex": 1
},
{
"ComponentId": 11440172471478606933,
"SortIndex": 2
},
{
"ComponentId": 17461691807054668218,
"SortIndex": 3
},
{
"ComponentId": 15530420875454157766,
"SortIndex": 4
},
{
"ComponentId": 10596595655489113153,
"SortIndex": 5
}
]
},
"Component_[10596595655489113153]": {
"$type": "EditorScriptCanvasComponent",
"Id": 10596595655489113153,
"m_name": "AutoComponent_RPC",
"m_assetHolder": {
"m_asset": {
"assetId": {
"guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas"
}
},
"runtimeDataIsValid": true,
"runtimeDataOverrides": {
"source": {
"assetId": {
"guid": "{5ED120C4-07DC-56F1-80A7-37BFC98FD74E}"
},
"assetHint": "levels/multiplayer/autocomponent_rpc/autocomponent_rpc.scriptcanvas"
}
}
},
"Component_[11440172471478606933]": {
"$type": "GenericComponentWrapper",
"Id": 11440172471478606933,
"m_template": {
"$type": "Multiplayer::NetworkTransformComponent"
}
},
"Component_[11481641385923146202]": {
"$type": "GenericComponentWrapper",
"Id": 11481641385923146202,
"m_template": {
"$type": "NetBindComponent"
}
},
"Component_[13110996849704981748]": {
"$type": "EditorVisibilityComponent",
"Id": 13110996849704981748
},
"Component_[1472895075383059499]": {
"$type": "EditorLockComponent",
"Id": 1472895075383059499
},
"Component_[1526920553231193509]": {
"$type": "EditorPendingCompositionComponent",
"Id": 1526920553231193509
},
"Component_[15530420875454157766]": {
"$type": "GenericComponentWrapper",
"Id": 15530420875454157766,
"m_template": {
"$type": "Multiplayer::LocalPredictionPlayerInputComponent"
}
},
"Component_[1699895912837266792]": {
"$type": "EditorDisabledCompositionComponent",
"Id": 1699895912837266792
},
"Component_[17461691807054668218]": {
"$type": "GenericComponentWrapper",
"Id": 17461691807054668218,
"m_template": {
"$type": "AutomatedTesting::NetworkTestPlayerComponent"
}
},
"Component_[3622545398462507871]": {
"$type": "EditorOnlyEntityComponent",
"Id": 3622545398462507871
},
"Component_[5778259918231688598]": {
"$type": "AZ::Render::EditorMeshComponent",
"Id": 5778259918231688598,
"Controller": {
"Configuration": {
"ModelAsset": {
"assetId": {
"guid": "{F322592F-43BC-50E7-903C-CC231846093F}",
"subId": 276443623
},
"assetHint": "objects/_primitives/_cylinder_1x1.azmodel"
}
}
}
},
"Component_[7004633483882343256]": {
"$type": "SelectionComponent",
"Id": 7004633483882343256
},
"Component_[8469628382507693850]": {
"$type": "EditorEntitySortComponent",
"Id": 8469628382507693850
},
"Component_[9407892837096707905]": {
"$type": "EditorEntityIconComponent",
"Id": 9407892837096707905
},
"Component_[9878555871810913249]": {
"$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
"Id": 9878555871810913249,
"Parent Entity": "ContainerEntity"
}
}
}
}
}

@ -0,0 +1,12 @@
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0
0,0,0,0,0,0

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5f7a86a693878c10f91783955cc72535bf7d7c495163087a4c1982f228d27f0
size 2145248

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef71257b240a7e704731806f8cd4b966af5d3c60f22881f9c6a6320180ee71a4
size 2496384

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:531b6473b314259504ab595e4983838b5866035ef4d70cedaf4cc9c7d9e65c3a
size 24512

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e32877eab35459499c73ff093df898f93bf3e7379de25eef6875d693be9bec81
size 18015

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2949a50eec079a7d43a1d92e056c580ef625ee39e00e91cc25318319e37dcd3b
size 115689

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a1f8d75dcd85e8b4aa57f6c0c81af0300ff96915ba3c2b591095c215d5e1d8c
size 12072

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3bcfac5de831c269dac58e7d73d1dc61eb8d9f6d8a241f5c029537b6bcdf166
size 1088304

@ -28,7 +28,7 @@ def update_manifest(scene):
meshGroup = sceneManifest.add_mesh_group(chunkName)
meshGroup['id'] = '{' + str(uuid.uuid5(uuid.NAMESPACE_DNS, scene.sourceFilename + chunkName)) + '}'
sceneManifest.mesh_group_add_comment(meshGroup, 'auto generated by test_chunks_builder')
sceneManifest.mesh_group_set_origin(meshGroup, None, 0, 0, 0, 1.0)
sceneManifest.mesh_group_add_advanced_coordinate_system(meshGroup)
for meshIndex in range(len(chunkNameList)):
if (activeMeshIndex == meshIndex):
sceneManifest.mesh_group_select_node(meshGroup, chunkNameList[meshIndex])

@ -7,7 +7,7 @@
"android_settings": {
"package_name": "com.lumberyard.yourgame",
"version_number": 1,
"version_name": "1.0.0.0",
"version_name": "1.0.0",
"orientation": "landscape"
},
"engine": "o3de",

@ -30,8 +30,6 @@ CAboutDialog::CAboutDialog(QString versionText, QString richTextCopyrightNotice,
m_ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
connect(m_ui->m_transparentAgreement, &QLabel::linkActivated, this, &CAboutDialog::OnCustomerAgreement);
m_ui->m_transparentTrademarks->setText(versionText);
m_ui->m_transparentAllRightReserved->setObjectName("copyrightNotice");
@ -84,9 +82,4 @@ void CAboutDialog::mouseReleaseEvent(QMouseEvent* event)
QDialog::mouseReleaseEvent(event);
}
void CAboutDialog::OnCustomerAgreement()
{
QDesktopServices::openUrl(QUrl(QStringLiteral("https://www.o3debinaries.org/license")));
}
#include <moc_AboutDialog.cpp>

@ -30,8 +30,6 @@ public:
private:
void OnCustomerAgreement();
void mouseReleaseEvent(QMouseEvent* event) override;
void paintEvent(QPaintEvent* event) override;

@ -181,14 +181,17 @@
</spacer>
</item>
<item>
<widget class="ClickableLabel" name="m_transparentAgreement">
<widget class="QLabel" name="m_transparentAgreement">
<property name="text">
<string>Terms of Use</string>
<string>&lt;a href=&quot;https://www.o3debinaries.org/license&quot;&gt;Terms of Use&lt;/a&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="showDecoration" stdset="0">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
@ -274,11 +277,6 @@
<extends>QWidget</extends>
<header>qsvgwidget.h</header>
</customwidget>
<customwidget>
<class>ClickableLabel</class>
<extends>QLabel</extends>
<header>QtUI/ClickableLabel.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>

@ -1,30 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "AnimationBipedBoneNames.h"
namespace EditorAnimationBones::Biped
{
const char* Pelvis = "Bip01 Pelvis";
const char* Head = "Bip01 Head";
const char* Weapon = "weapon_bone";
const char* LeftEye = "eye_bone_left";
const char* RightEye = "eye_bone_right";
const char* Spine[5] = { "Bip01 Spine", "Bip01 Spine1", "Bip01 Spine2", "Bip01 Spine3", "Bip01 Spine4" };
const char* Neck[2] = { "Bip01 Neck", "Bip01 Neck1" };
const char* LeftHeel = "Bip01 L Heel";
const char* LeftToe[2] = { "Bip01 L Toe0", "Bip01 L Toe1" };
const char* RightHeel = "Bip01 R Heel";
const char* RightToe[2] = { "Bip01 R Toe0", "Bip01 R Toe1" };
} // namespace EditorAnimationBones::Biped

@ -1,34 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H
#define CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H
#pragma once
namespace EditorAnimationBones
{
namespace Biped
{
extern const char* Pelvis;
extern const char* Head;
extern const char* Weapon;
extern const char* Spine[5];
extern const char* Neck[2];
extern const char* LeftEye;
extern const char* RightEye;
extern const char* LeftHeel;
extern const char* RightHeel;
extern const char* LeftToe[2];
extern const char* RightToe[2];
}
}
#endif // CRYINCLUDE_EDITOR_ANIMATION_ANIMATIONBIPEDBONENAMES_H

@ -1,232 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "BaseLibrary.h"
#include "BaseLibraryItem.h"
#include "Include/IBaseLibraryManager.h"
#include <Util/PathUtil.h>
#include <IFileUtil.h>
//////////////////////////////////////////////////////////////////////////
// CBaseLibrary implementation.
//////////////////////////////////////////////////////////////////////////
CBaseLibrary::CBaseLibrary(IBaseLibraryManager* pManager)
: m_pManager(pManager)
, m_bModified(false)
, m_bLevelLib(false)
, m_bNewLibrary(true)
{
}
//////////////////////////////////////////////////////////////////////////
CBaseLibrary::~CBaseLibrary()
{
m_items.clear();
}
//////////////////////////////////////////////////////////////////////////
IBaseLibraryManager* CBaseLibrary::GetManager()
{
return m_pManager;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibrary::RemoveAllItems()
{
AddRef();
for (int i = 0; i < m_items.size(); i++)
{
// Unregister item in case it was registered. It is ok if it wasn't. This is still safe to call.
m_pManager->UnregisterItem(m_items[i]);
// Clear library item.
m_items[i]->m_library = nullptr;
}
m_items.clear();
Release();
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibrary::SetName(const QString& name)
{
//the fullname of the items in the library will be changed due to library's name change
//so we need unregistered them and register them after their name changed.
for (int i = 0; i < m_items.size(); i++)
{
m_pManager->UnregisterItem(m_items[i]);
}
m_name = name;
for (int i = 0; i < m_items.size(); i++)
{
m_pManager->RegisterItem(m_items[i]);
}
SetModified();
}
//////////////////////////////////////////////////////////////////////////
const QString& CBaseLibrary::GetName() const
{
return m_name;
}
//////////////////////////////////////////////////////////////////////////
bool CBaseLibrary::Save()
{
return true;
}
//////////////////////////////////////////////////////////////////////////
bool CBaseLibrary::Load(const QString& filename)
{
m_filename = filename;
SetModified(false);
m_bNewLibrary = false;
return true;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibrary::SetModified(bool bModified)
{
if (bModified != m_bModified)
{
m_bModified = bModified;
emit Modified(bModified);
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibrary::AddItem(IDataBaseItem* item, bool bRegister)
{
CBaseLibraryItem* pLibItem = (CBaseLibraryItem*)item;
// Check if item is already assigned to this library.
if (pLibItem->m_library != this)
{
pLibItem->m_library = this;
m_items.push_back(pLibItem);
SetModified();
if (bRegister)
{
m_pManager->RegisterItem(pLibItem);
}
}
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibrary::GetItem(int index)
{
assert(index >= 0 && index < m_items.size());
return m_items[index];
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibrary::RemoveItem(IDataBaseItem* item)
{
for (int i = 0; i < m_items.size(); i++)
{
if (m_items[i] == item)
{
// Unregister item in case it was registered. It is ok if it wasn't. This is still safe to call.
m_pManager->UnregisterItem(m_items[i]);
m_items.erase(m_items.begin() + i);
SetModified();
break;
}
}
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibrary::FindItem(const QString& name)
{
for (int i = 0; i < m_items.size(); i++)
{
if (QString::compare(m_items[i]->GetName(), name, Qt::CaseInsensitive) == 0)
{
return m_items[i];
}
}
return nullptr;
}
bool CBaseLibrary::AddLibraryToSourceControl(const QString& fullPathName) const
{
IEditor* pEditor = GetIEditor();
IFileUtil* pFileUtil = pEditor ? pEditor->GetFileUtil() : nullptr;
if (pFileUtil)
{
return pFileUtil->CheckoutFile(fullPathName.toUtf8().data(), nullptr);
}
return false;
}
bool CBaseLibrary::SaveLibrary(const char* name, bool saveEmptyLibrary)
{
assert(name != nullptr);
if (name == nullptr)
{
CryFatalError("The library you are attempting to save has no name specified.");
return false;
}
QString fileName(GetFilename());
if (fileName.isEmpty() && !saveEmptyLibrary)
{
return false;
}
fileName = Path::GamePathToFullPath(fileName);
XmlNodeRef root = GetIEditor()->GetSystem()->CreateXmlNode(name);
Serialize(root, false);
bool bRes = XmlHelpers::SaveXmlNode(GetIEditor()->GetFileUtil(), root, fileName.toUtf8().data());
if (m_bNewLibrary)
{
AddLibraryToSourceControl(fileName);
m_bNewLibrary = false;
}
if (!bRes)
{
QByteArray filenameUtf8 = fileName.toUtf8();
AZStd::string strMessage = AZStd::string::format("The file %s is read-only and the save of the library couldn't be performed. Try to remove the \"read-only\" flag or check-out the file and then try again.", filenameUtf8.data());
CryMessageBox(strMessage.c_str(), "Saving Error", MB_OK | MB_ICONWARNING);
}
return bRes;
}
//CONFETTI BEGIN
void CBaseLibrary::ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation)
{
std::vector<_smart_ptr<CBaseLibraryItem> > temp;
for (unsigned int i = 0; i < m_items.size(); i++)
{
if (i == newLocation)
{
temp.push_back(_smart_ptr<CBaseLibraryItem>(item));
}
if (m_items[i] != item)
{
temp.push_back(m_items[i]);
}
}
// If newLocation is greater than the original size, append the item to end of the list
if (newLocation >= m_items.size())
{
temp.push_back(_smart_ptr<CBaseLibraryItem>(item));
}
m_items = temp;
}
//CONFETTI END
#include <moc_BaseLibrary.cpp>

@ -1,129 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_BASELIBRARY_H
#define CRYINCLUDE_EDITOR_BASELIBRARY_H
#pragma once
#if !defined(Q_MOC_RUN)
#include "Include/IDataBaseLibrary.h"
#include "Include/IBaseLibraryManager.h"
#include "Include/EditorCoreAPI.h"
#include "Util/TRefCountBase.h"
#include <QObject>
#endif
// Ensure we don't try to dllimport when moc includes us
#if defined(Q_MOC_BUILD) && !defined(EDITOR_CORE)
#define EDITOR_CORE
#endif
/** This a base class for all Libraries used by Editor.
*/
class EDITOR_CORE_API CBaseLibrary
: public QObject
, public TRefCountBase<IDataBaseLibrary>
{
Q_OBJECT
public:
explicit CBaseLibrary(IBaseLibraryManager* pManager);
~CBaseLibrary();
//! Set library name.
virtual void SetName(const QString& name);
//! Get library name.
const QString& GetName() const override;
//! Set new filename for this library.
virtual bool SetFilename(const QString& filename, [[maybe_unused]] bool checkForUnique = true) { m_filename = filename.toLower(); return true; };
const QString& GetFilename() const override { return m_filename; };
bool Save() override = 0;
bool Load(const QString& filename) override = 0;
void Serialize(XmlNodeRef& node, bool bLoading) override = 0;
//! Mark library as modified.
void SetModified(bool bModified = true) override;
//! Check if library was modified.
bool IsModified() const override { return m_bModified; };
//////////////////////////////////////////////////////////////////////////
// Working with items.
//////////////////////////////////////////////////////////////////////////
//! Add a new prototype to library.
void AddItem(IDataBaseItem* item, bool bRegister = true) override;
//! Get number of known prototypes.
int GetItemCount() const override { return static_cast<int>(m_items.size()); }
//! Get prototype by index.
IDataBaseItem* GetItem(int index) override;
//! Delete item by pointer of item.
void RemoveItem(IDataBaseItem* item) override;
//! Delete all items from library.
void RemoveAllItems() override;
//! Find library item by name.
//! Using linear search.
IDataBaseItem* FindItem(const QString& name) override;
//! Check if this library is local level library.
bool IsLevelLibrary() const override { return m_bLevelLib; };
//! Set library to be level library.
void SetLevelLibrary(bool bEnable) override { m_bLevelLib = bEnable; };
//////////////////////////////////////////////////////////////////////////
//! Return manager for this library.
IBaseLibraryManager* GetManager() override;
// Saves the library with the main tag defined by the parameter name
bool SaveLibrary(const char* name, bool saveEmptyLibrary = false);
//CONFETTI BEGIN
// Used to change the library item order
void ChangeItemOrder(CBaseLibraryItem* item, unsigned int newLocation) override;
//CONFETTI END
signals:
void Modified(bool bModified);
private:
// Add the library to the source control
bool AddLibraryToSourceControl(const QString& fullPathName) const;
protected:
//! Name of the library.
QString m_name;
//! Filename of the library.
QString m_filename;
//! Flag set when library was modified.
bool m_bModified;
// Flag set when the library is just created and it's not yet saved for the first time.
bool m_bNewLibrary;
//! Level library is saved within the level .ly file and is local for this level.
bool m_bLevelLib;
//////////////////////////////////////////////////////////////////////////
// Manager.
IBaseLibraryManager* m_pManager;
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
// Array of all our library items.
std::vector<_smart_ptr<CBaseLibraryItem> > m_items;
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
};
#endif // CRYINCLUDE_EDITOR_BASELIBRARY_H

@ -1,261 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "BaseLibraryItem.h"
#include "BaseLibrary.h"
#include "BaseLibraryManager.h"
#include "Undo/IUndoObject.h"
#include <AzCore/Math/Uuid.h>
//undo object for multi-changes inside library item. such as set all variables to default values.
//For example: change particle emitter shape will lead to multiple variable changes
class CUndoBaseLibraryItem
: public IUndoObject
{
public:
CUndoBaseLibraryItem(IBaseLibraryManager *libMgr, CBaseLibraryItem* libItem, bool ignoreChild)
: m_libMgr(libMgr)
{
assert(libItem);
assert(libMgr);
m_itemPath = libItem->GetFullName();
//serialize the lib item to undo
m_undoCtx.node = GetIEditor()->GetSystem()->CreateXmlNode("Undo");
m_undoCtx.bIgnoreChilds = ignoreChild;
m_undoCtx.bLoading = false; //saving
m_undoCtx.bUniqName = false; //don't generate new name
m_undoCtx.bCopyPaste = true; //so it won't override guid
m_undoCtx.bUndo = true;
libItem->Serialize(m_undoCtx);
//evaluate size
XmlString xmlStr = m_undoCtx.node->getXML();
m_size = sizeof(CUndoBaseLibraryItem);
m_size += static_cast<int>(xmlStr.GetAllocatedMemory());
m_size += m_itemPath.length();
}
protected:
int GetSize() override
{
return m_size;
}
void Undo(bool bUndo) override
{
//find the libItem
IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath);
if (libItem == nullptr)
{
//the undo stack is not reliable any more..
assert(false);
return;
}
//save for redo
if (bUndo)
{
m_redoCtx.node = GetIEditor()->GetSystem()->CreateXmlNode("Redo");
m_redoCtx.bIgnoreChilds = m_undoCtx.bIgnoreChilds;
m_redoCtx.bLoading = false; //saving
m_redoCtx.bUniqName = false;
m_redoCtx.bCopyPaste = true;
m_redoCtx.bUndo = true;
libItem->Serialize(m_redoCtx);
XmlString xmlStr = m_redoCtx.node->getXML();
m_size += static_cast<int>(xmlStr.GetAllocatedMemory());
}
//load previous saved data
m_undoCtx.bLoading = true;
libItem->Serialize(m_undoCtx);
}
void Redo() override
{
//find the libItem
IDataBaseItem *libItem = m_libMgr->FindItemByName(m_itemPath);
if (libItem == nullptr || m_redoCtx.node == nullptr)
{
//the undo stack is not reliable any more..
assert(false);
return;
}
m_redoCtx.bLoading = true;
libItem->Serialize(m_redoCtx);
}
private:
QString m_itemPath;
IDataBaseItem::SerializeContext m_undoCtx; //saved before operation
IDataBaseItem::SerializeContext m_redoCtx; //saved after operation so used for redo
IBaseLibraryManager* m_libMgr;
int m_size;
};
//////////////////////////////////////////////////////////////////////////
// CBaseLibraryItem implementation.
//////////////////////////////////////////////////////////////////////////
CBaseLibraryItem::CBaseLibraryItem()
{
m_library = nullptr;
GenerateId();
m_bModified = false;
}
CBaseLibraryItem::~CBaseLibraryItem()
{
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryItem::GetFullName() const
{
QString name;
if (m_library)
{
name = m_library->GetName() + ".";
}
name += m_name;
return name;
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryItem::GetGroupName()
{
QString str = GetName();
int p = str.lastIndexOf('.');
if (p >= 0)
{
return str.mid(0, p);
}
return "";
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryItem::GetShortName()
{
QString str = GetName();
int p = str.lastIndexOf('.');
if (p >= 0)
{
return str.mid(p + 1);
}
p = str.lastIndexOf('/');
if (p >= 0)
{
return str.mid(p + 1);
}
return str;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryItem::SetName(const QString& name)
{
assert(m_library);
if (name == m_name)
{
return;
}
QString oldName = GetFullName();
m_name = name;
((CBaseLibraryManager*)m_library->GetManager())->OnRenameItem(this, oldName);
}
//////////////////////////////////////////////////////////////////////////
const QString& CBaseLibraryItem::GetName() const
{
return m_name;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryItem::GenerateId()
{
GUID guid = AZ::Uuid::CreateRandom();
SetGUID(guid);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryItem::SetGUID(REFGUID guid)
{
if (m_library)
{
((CBaseLibraryManager*)m_library->GetManager())->RegisterItem(this, guid);
}
m_guid = guid;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryItem::Serialize(SerializeContext& ctx)
{
assert(m_library);
XmlNodeRef node = ctx.node;
if (ctx.bLoading)
{
QString name = m_name;
// Loading
node->getAttr("Name", name);
if (!ctx.bUniqName)
{
SetName(name);
}
else
{
SetName(GetLibrary()->GetManager()->MakeUniqueItemName(name));
}
if (!ctx.bCopyPaste)
{
GUID guid;
if (node->getAttr("Id", guid))
{
SetGUID(guid);
}
}
}
else
{
// Saving.
node->setAttr("Name", m_name.toUtf8().data());
node->setAttr("Id", m_guid);
node->setAttr("Library", GetLibrary()->GetName().toUtf8().data());
}
m_bModified = false;
}
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryItem::GetLibrary() const
{
return m_library;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryItem::SetLibrary(CBaseLibrary* pLibrary)
{
m_library = pLibrary;
}
//! Mark library as modified.
void CBaseLibraryItem::SetModified(bool bModified)
{
m_bModified = bModified;
if (m_bModified && m_library != nullptr)
{
m_library->SetModified(bModified);
}
}

@ -1,114 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_BASELIBRARYITEM_H
#define CRYINCLUDE_EDITOR_BASELIBRARYITEM_H
#pragma once
#include "Include/IDataBaseItem.h"
#include "BaseLibrary.h"
#include <QMetaType>
class CBaseLibrary;
//////////////////////////////////////////////////////////////////////////
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING
/** Base class for all items contained in BaseLibraray.
*/
class EDITOR_CORE_API CBaseLibraryItem
: public TRefCountBase<IDataBaseItem>
{
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
public:
CBaseLibraryItem();
~CBaseLibraryItem();
//! Set item name.
//! Its virtual, in case you want to override it in derrived item.
virtual void SetName(const QString& name);
//! Get item name.
const QString& GetName() const;
//! Get full item name, including name of library.
//! Name formed by adding dot after name of library
//! eg. library Pickup and item PickupRL form full item name: "Pickups.PickupRL".
QString GetFullName() const;
//! Get only nameof group from prototype.
QString GetGroupName();
//! Get short name of prototype without group.
QString GetShortName();
//! Return Library this item are contained in.
//! Item can only be at one library.
IDataBaseLibrary* GetLibrary() const;
void SetLibrary(CBaseLibrary* pLibrary);
//////////////////////////////////////////////////////////////////////////
//! Serialize library item to archive.
virtual void Serialize(SerializeContext& ctx);
//////////////////////////////////////////////////////////////////////////
//! Generate new unique id for this item.
void GenerateId();
//! Returns GUID of this material.
const GUID& GetGUID() const { return m_guid; }
//! Mark library as modified.
void SetModified(bool bModified = true);
//! Check if library was modified.
bool IsModified() const { return m_bModified; };
//! Returns true if the item is registered, otherwise false
bool IsRegistered() const { return m_bRegistered; };
//! Validate item for errors.
virtual void Validate() {};
//! Get number of sub childs.
virtual int GetChildCount() const { return 0; }
//! Get sub child by index.
virtual CBaseLibraryItem* GetChild([[maybe_unused]] int index) const { return nullptr; }
//////////////////////////////////////////////////////////////////////////
//! Gathers resources by this item.
virtual void GatherUsedResources([[maybe_unused]] CUsedResources& resources) {};
//! Get if stored item is enabled
virtual bool GetIsEnabled() { return true; };
int IsParticleItem = -1;
protected:
void SetGUID(REFGUID guid);
friend class CBaseLibrary;
friend class CBaseLibraryManager;
// Name of this prototype.
QString m_name;
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
//! Reference to prototype library who contains this prototype.
_smart_ptr<CBaseLibrary> m_library;
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
//! Every base library item have unique id.
GUID m_guid;
// True when item modified by editor.
bool m_bModified;
// True when item registered in manager.
bool m_bRegistered = false;
};
Q_DECLARE_METATYPE(CBaseLibraryItem*);
TYPEDEF_AUTOPTR(CBaseLibraryItem);
#endif // CRYINCLUDE_EDITOR_BASELIBRARYITEM_H

@ -1,822 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "BaseLibraryManager.h"
// Editor
#include "BaseLibraryItem.h"
#include "ErrorReport.h"
#include "Undo/IUndoObject.h"
//////////////////////////////////////////////////////////////////////////
// CBaseLibraryManager implementation.
//////////////////////////////////////////////////////////////////////////
CBaseLibraryManager::CBaseLibraryManager()
{
m_bUniqNameMap = false;
m_bUniqGuidMap = true;
GetIEditor()->RegisterNotifyListener(this);
}
//////////////////////////////////////////////////////////////////////////
CBaseLibraryManager::~CBaseLibraryManager()
{
ClearAll();
GetIEditor()->UnregisterNotifyListener(this);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::ClearAll()
{
// Delete all items from all libraries.
for (int i = 0; i < m_libs.size(); i++)
{
m_libs[i]->RemoveAllItems();
}
// if we will not copy maps locally then destructors of the elements of
// the map will operate on the already invalid map object
// see:
// CBaseLibraryManager::UnregisterItem()
// CBaseLibraryManager::DeleteItem()
// CMaterial::~CMaterial()
ItemsGUIDMap itemsGuidMap;
ItemsNameMap itemsNameMap;
{
AZStd::lock_guard<AZStd::mutex> lock(m_itemsNameMapMutex);
std::swap(itemsGuidMap, m_itemsGuidMap);
std::swap(itemsNameMap, m_itemsNameMap);
m_libs.clear();
}
}
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryManager::FindLibrary(const QString& library)
{
const int index = FindLibraryIndex(library);
return index == -1 ? nullptr : m_libs[index];
}
//////////////////////////////////////////////////////////////////////////
int CBaseLibraryManager::FindLibraryIndex(const QString& library)
{
QString lib = library;
lib.replace('\\', '/');
for (int i = 0; i < m_libs.size(); i++)
{
QString _lib = m_libs[i]->GetFilename();
_lib.replace('\\', '/');
if (QString::compare(lib, m_libs[i]->GetName(), Qt::CaseInsensitive) == 0 || QString::compare(lib, _lib, Qt::CaseInsensitive) == 0)
{
return i;
}
}
return -1;
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::FindItem(REFGUID guid) const
{
CBaseLibraryItem* pMtl = stl::find_in_map(m_itemsGuidMap, guid, nullptr);
return pMtl;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName)
{
int p;
p = fullItemName.indexOf('.');
if (p < 0 || !QString::compare(fullItemName.mid(p + 1), "mtl", Qt::CaseInsensitive))
{
libraryName = "";
itemName = fullItemName;
return;
}
libraryName = fullItemName.mid(0, p);
itemName = fullItemName.mid(p + 1);
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::FindItemByName(const QString& fullItemName)
{
AZStd::lock_guard<AZStd::mutex> lock(m_itemsNameMapMutex);
return stl::find_in_map(m_itemsNameMap, fullItemName, nullptr);
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::LoadItemByName(const QString& fullItemName)
{
QString libraryName, itemName;
SplitFullItemName(fullItemName, libraryName, itemName);
if (!FindLibrary(libraryName))
{
LoadLibrary(MakeFilename(libraryName));
}
return FindItemByName(fullItemName);
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::FindItemByName(const char* fullItemName)
{
return FindItemByName(QString(fullItemName));
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::LoadItemByName(const char* fullItemName)
{
return LoadItemByName(QString(fullItemName));
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::CreateItem(IDataBaseLibrary* pLibrary)
{
assert(pLibrary);
// Add item to this library.
TSmartPtr<CBaseLibraryItem> pItem = MakeNewItem();
pLibrary->AddItem(pItem);
return pItem;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::DeleteItem(IDataBaseItem* pItem)
{
assert(pItem);
UnregisterItem((CBaseLibraryItem*)pItem);
if (pItem->GetLibrary())
{
pItem->GetLibrary()->RemoveItem(pItem);
}
}
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryManager::LoadLibrary(const QString& inFilename, [[maybe_unused]] bool bReload)
{
if (auto lib = FindLibrary(inFilename))
{
return lib;
}
TSmartPtr<CBaseLibrary> pLib = MakeNewLibrary();
if (!pLib->Load(MakeFilename(inFilename)))
{
Error(QObject::tr("Failed to Load Item Library: %1").arg(inFilename).toUtf8().data());
return nullptr;
}
m_libs.push_back(pLib);
return pLib;
}
//////////////////////////////////////////////////////////////////////////
int CBaseLibraryManager::GetModifiedLibraryCount() const
{
int count = 0;
for (int i = 0; i < m_libs.size(); i++)
{
if (m_libs[i]->IsModified())
{
count++;
}
}
return count;
}
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryManager::AddLibrary(const QString& library, bool bIsLevelLibrary, bool bIsLoading)
{
// Make a filename from name of library.
QString filename = library;
if (filename.indexOf(".xml") == -1) // if its already a filename, we don't do anything
{
filename.replace(' ', '_');
if (!bIsLevelLibrary)
{
filename = MakeFilename(library);
}
else
{
// if its the level library it gets saved in the level and should not be concatenated with any other file name
filename = filename + ".xml";
}
}
IDataBaseLibrary* pBaseLib = FindLibrary(library); //library name
if (!pBaseLib)
{
pBaseLib = FindLibrary(filename); //library file name
}
if (pBaseLib)
{
return pBaseLib;
}
CBaseLibrary* lib = MakeNewLibrary();
lib->SetName(library);
lib->SetLevelLibrary(bIsLevelLibrary);
lib->SetFilename(filename, !bIsLoading);
// set modified to true, so even empty particle libraries get saved
lib->SetModified(true);
m_libs.push_back(lib);
return lib;
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryManager::MakeFilename(const QString& library)
{
QString filename = library;
filename.replace(' ', '_');
filename.replace(".xml", "");
// make it contain the canonical libs path:
Path::ConvertBackSlashToSlash(filename);
QString LibsPath(GetLibsPath());
Path::ConvertBackSlashToSlash(LibsPath);
if (filename.left(LibsPath.length()).compare(LibsPath, Qt::CaseInsensitive) == 0)
{
filename = filename.mid(LibsPath.length());
}
return LibsPath + filename + ".xml";
}
//////////////////////////////////////////////////////////////////////////
bool CBaseLibraryManager::IsUniqueFilename(const QString& library)
{
QString resultPath = MakeFilename(library);
CCryFile xmlFile;
// If we can find a file for the path
return !xmlFile.Open(resultPath.toUtf8().data(), "rb");
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::DeleteLibrary(const QString& library, bool forceDeleteLevel)
{
for (int i = 0; i < m_libs.size(); i++)
{
if (QString::compare(library, m_libs[i]->GetName(), Qt::CaseInsensitive) == 0)
{
CBaseLibrary* pLibrary = m_libs[i];
// Check if not level library, they cannot be deleted.
if (!pLibrary->IsLevelLibrary() || forceDeleteLevel)
{
for (int j = 0; j < pLibrary->GetItemCount(); j++)
{
UnregisterItem((CBaseLibraryItem*)pLibrary->GetItem(j));
}
pLibrary->RemoveAllItems();
if (pLibrary->IsLevelLibrary())
{
m_pLevelLibrary = nullptr;
}
m_libs.erase(m_libs.begin() + i);
}
break;
}
}
}
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryManager::GetLibrary(int index) const
{
assert(index >= 0 && index < m_libs.size());
return m_libs[index];
};
//////////////////////////////////////////////////////////////////////////
IDataBaseLibrary* CBaseLibraryManager::GetLevelLibrary() const
{
IDataBaseLibrary* pLevelLib = nullptr;
for (int i = 0; i < GetLibraryCount(); i++)
{
if (GetLibrary(i)->IsLevelLibrary())
{
pLevelLib = GetLibrary(i);
break;
}
}
return pLevelLib;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::SaveAllLibs()
{
for (int i = 0; i < GetLibraryCount(); i++)
{
// Check if library is modified.
IDataBaseLibrary* pLibrary = GetLibrary(i);
//Level library is saved when the level is saved
if (pLibrary->IsLevelLibrary())
{
continue;
}
if (pLibrary->IsModified())
{
if (pLibrary->Save())
{
pLibrary->SetModified(false);
}
}
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::Serialize(XmlNodeRef& node, bool bLoading)
{
static const char* const LEVEL_LIBRARY_TAG = "LevelLibrary";
QString rootNodeName = GetRootNodeName();
if (bLoading)
{
XmlNodeRef libs = node->findChild(rootNodeName.toUtf8().data());
if (libs)
{
for (int i = 0; i < libs->getChildCount(); i++)
{
// Load only library name.
XmlNodeRef libNode = libs->getChild(i);
if (strcmp(libNode->getTag(), LEVEL_LIBRARY_TAG) == 0)
{
if (!m_pLevelLibrary)
{
QString libName;
libNode->getAttr("Name", libName);
m_pLevelLibrary = static_cast<CBaseLibrary*>(AddLibrary(libName, true));
}
m_pLevelLibrary->Serialize(libNode, bLoading);
}
else
{
QString libName;
if (libNode->getAttr("Name", libName))
{
// Load this library.
if (!FindLibrary(libName))
{
LoadLibrary(MakeFilename(libName));
}
}
}
}
}
}
else
{
// Save all libraries.
XmlNodeRef libs = node->newChild(rootNodeName.toUtf8().data());
for (int i = 0; i < GetLibraryCount(); i++)
{
IDataBaseLibrary* pLib = GetLibrary(i);
if (pLib->IsLevelLibrary())
{
// Level libraries are saved in in level.
XmlNodeRef libNode = libs->newChild(LEVEL_LIBRARY_TAG);
pLib->Serialize(libNode, bLoading);
}
else
{
// Save only library name.
XmlNodeRef libNode = libs->newChild("Library");
libNode->setAttr("Name", pLib->GetName().toUtf8().data());
}
}
SaveAllLibs();
}
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryManager::MakeUniqueItemName(const QString& srcName, const QString& libName)
{
// unlikely we'll ever encounter more than 16
std::vector<AZStd::string> possibleDuplicates;
possibleDuplicates.reserve(16);
// search for strings in the database that might have a similar name (ignore case)
IDataBaseItemEnumerator* pEnum = GetItemEnumerator();
for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext())
{
//Check if the item is in the target library first.
IDataBaseLibrary* itemLibrary = pItem->GetLibrary();
QString itemLibraryName;
if (itemLibrary)
{
itemLibraryName = itemLibrary->GetName();
}
// Item is not in the library so there cannot be a naming conflict.
if (!libName.isEmpty() && !itemLibraryName.isEmpty() && itemLibraryName != libName)
{
continue;
}
const QString& name = pItem->GetName();
if (name.startsWith(srcName, Qt::CaseInsensitive))
{
possibleDuplicates.push_back(AZStd::string(name.toUtf8().data()));
}
}
pEnum->Release();
if (possibleDuplicates.empty())
{
return srcName;
}
std::sort(possibleDuplicates.begin(), possibleDuplicates.end(), [](const AZStd::string& strOne, const AZStd::string& strTwo)
{
// I can assume size sorting since if the length is different, either one of the two strings doesn't
// closely match the string we are trying to duplicate, or it's a bigger number (X1 vs X10)
if (strOne.size() != strTwo.size())
{
return strOne.size() < strTwo.size();
}
else
{
return azstricmp(strOne.c_str(), strTwo.c_str()) < 0;
}
}
);
int num = 0;
QString returnValue = srcName;
while (num < possibleDuplicates.size() && QString::compare(possibleDuplicates[num].c_str(), returnValue, Qt::CaseInsensitive) == 0)
{
returnValue = QStringLiteral("%1%2%3").arg(srcName).arg("_").arg(num);
++num;
}
return returnValue;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::Validate()
{
IDataBaseItemEnumerator* pEnum = GetItemEnumerator();
for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext())
{
pItem->Validate();
}
pEnum->Release();
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid)
{
assert(pItem);
bool bNotify = false;
if (m_bUniqGuidMap)
{
REFGUID oldGuid = pItem->GetGUID();
if (!GuidUtil::IsEmpty(oldGuid))
{
m_itemsGuidMap.erase(oldGuid);
}
if (GuidUtil::IsEmpty(newGuid))
{
return;
}
CBaseLibraryItem* pOldItem = stl::find_in_map(m_itemsGuidMap, newGuid, nullptr);
if (!pOldItem)
{
pItem->m_guid = newGuid;
m_itemsGuidMap[newGuid] = pItem;
pItem->m_bRegistered = true;
bNotify = true;
}
else
{
if (pOldItem != pItem)
{
ReportDuplicateItem(pItem, pOldItem);
}
}
}
if (m_bUniqNameMap)
{
QString fullName = pItem->GetFullName();
if (!pItem->GetName().isEmpty())
{
CBaseLibraryItem* pOldItem = static_cast<CBaseLibraryItem*>(FindItemByName(fullName));
if (!pOldItem)
{
AZStd::lock_guard<AZStd::mutex> lock(m_itemsNameMapMutex);
m_itemsNameMap[fullName] = pItem;
pItem->m_bRegistered = true;
bNotify = true;
}
else
{
if (pOldItem != pItem)
{
ReportDuplicateItem(pItem, pOldItem);
}
}
}
}
// Notify listeners.
if (bNotify)
{
NotifyItemEvent(pItem, EDB_ITEM_EVENT_ADD);
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::RegisterItem(CBaseLibraryItem* pItem)
{
assert(pItem);
bool bNotify = false;
if (m_bUniqGuidMap)
{
if (GuidUtil::IsEmpty(pItem->GetGUID()))
{
return;
}
CBaseLibraryItem* pOldItem = stl::find_in_map(m_itemsGuidMap, pItem->GetGUID(), nullptr);
if (!pOldItem)
{
m_itemsGuidMap[pItem->GetGUID()] = pItem;
pItem->m_bRegistered = true;
bNotify = true;
}
else
{
if (pOldItem != pItem)
{
ReportDuplicateItem(pItem, pOldItem);
}
}
}
if (m_bUniqNameMap)
{
QString fullName = pItem->GetFullName();
if (!fullName.isEmpty())
{
CBaseLibraryItem* pOldItem = static_cast<CBaseLibraryItem*>(FindItemByName(fullName));
if (!pOldItem)
{
AZStd::lock_guard<AZStd::mutex> lock(m_itemsNameMapMutex);
m_itemsNameMap[fullName] = pItem;
pItem->m_bRegistered = true;
bNotify = true;
}
else
{
if (pOldItem != pItem)
{
ReportDuplicateItem(pItem, pOldItem);
}
}
}
}
// Notify listeners.
if (bNotify)
{
NotifyItemEvent(pItem, EDB_ITEM_EVENT_ADD);
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::SetRegisteredFlag(CBaseLibraryItem* pItem, bool bFlag)
{
pItem->m_bRegistered = bFlag;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::ReportDuplicateItem(CBaseLibraryItem* pItem, CBaseLibraryItem* pOldItem)
{
QString sLibName;
if (pOldItem->GetLibrary())
{
sLibName = pOldItem->GetLibrary()->GetName();
}
CErrorRecord err;
err.pItem = pItem;
err.error = QStringLiteral("Item %1 with duplicate GUID to loaded item %2 ignored").arg(pItem->GetFullName(), pOldItem->GetFullName());
GetIEditor()->GetErrorReport()->ReportError(err);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::UnregisterItem(CBaseLibraryItem* pItem)
{
// Notify listeners.
NotifyItemEvent(pItem, EDB_ITEM_EVENT_DELETE);
if (!pItem)
{
return;
}
if (m_bUniqGuidMap)
{
m_itemsGuidMap.erase(pItem->GetGUID());
}
if (m_bUniqNameMap && !pItem->GetFullName().isEmpty())
{
AZStd::lock_guard<AZStd::mutex> lock(m_itemsNameMapMutex);
auto findIter = m_itemsNameMap.find(pItem->GetFullName());
if (findIter != m_itemsNameMap.end())
{
_smart_ptr<CBaseLibraryItem> item = findIter->second;
m_itemsNameMap.erase(findIter);
}
}
pItem->m_bRegistered = false;
}
//////////////////////////////////////////////////////////////////////////
QString CBaseLibraryManager::MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName)
{
assert(pLibrary);
QString name = pLibrary->GetName() + ".";
if (!group.isEmpty())
{
name += group + ".";
}
name += itemName;
return name;
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::GatherUsedResources(CUsedResources& resources)
{
IDataBaseItemEnumerator* pEnum = GetItemEnumerator();
for (IDataBaseItem* pItem = pEnum->GetFirst(); pItem != nullptr; pItem = pEnum->GetNext())
{
pItem->GatherUsedResources(resources);
}
pEnum->Release();
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItemEnumerator* CBaseLibraryManager::GetItemEnumerator()
{
if (m_bUniqNameMap)
{
return new CDataBaseItemEnumerator<ItemsNameMap>(&m_itemsNameMap);
}
else
{
return new CDataBaseItemEnumerator<ItemsGUIDMap>(&m_itemsGuidMap);
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::OnEditorNotifyEvent(EEditorNotifyEvent event)
{
switch (event)
{
case eNotify_OnBeginNewScene:
SetSelectedItem(nullptr);
ClearAll();
break;
case eNotify_OnBeginSceneOpen:
SetSelectedItem(nullptr);
ClearAll();
break;
case eNotify_OnCloseScene:
SetSelectedItem(nullptr);
ClearAll();
break;
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName)
{
m_itemsNameMapMutex.lock();
if (!oldName.isEmpty())
{
m_itemsNameMap.erase(oldName);
}
if (!pItem->GetFullName().isEmpty())
{
m_itemsNameMap[pItem->GetFullName()] = pItem;
}
m_itemsNameMapMutex.unlock();
OnItemChanged(pItem);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::AddListener(IDataBaseManagerListener* pListener)
{
stl::push_back_unique(m_listeners, pListener);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::RemoveListener(IDataBaseManagerListener* pListener)
{
stl::find_and_erase(m_listeners, pListener);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::NotifyItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event)
{
// Notify listeners.
if (!m_listeners.empty())
{
for (int i = 0; i < m_listeners.size(); i++)
{
m_listeners[i]->OnDataBaseItemEvent(pItem, event);
}
}
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::OnItemChanged(IDataBaseItem* pItem)
{
NotifyItemEvent(pItem, EDB_ITEM_EVENT_CHANGED);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh)
{
NotifyItemEvent(pItem, bRefresh ? EDB_ITEM_EVENT_UPDATE_PROPERTIES
: EDB_ITEM_EVENT_UPDATE_PROPERTIES_NO_EDITOR_REFRESH);
}
//////////////////////////////////////////////////////////////////////////
void CBaseLibraryManager::SetSelectedItem(IDataBaseItem* pItem)
{
if (m_pSelectedItem == pItem)
{
return;
}
m_pSelectedItem = (CBaseLibraryItem*)pItem;
NotifyItemEvent(m_pSelectedItem, EDB_ITEM_EVENT_SELECTED);
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::GetSelectedItem() const
{
return m_pSelectedItem;
}
//////////////////////////////////////////////////////////////////////////
IDataBaseItem* CBaseLibraryManager::GetSelectedParentItem() const
{
return m_pSelectedParent;
}
void CBaseLibraryManager::ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation)
{
if (!lib || newLocation >= m_libs.size() || lib == m_libs[newLocation])
{
return;
}
for (int i = 0; i < m_libs.size(); i++)
{
if (lib == m_libs[i])
{
_smart_ptr<CBaseLibrary> curLib = m_libs[i];
m_libs.erase(m_libs.begin() + i);
m_libs.insert(m_libs.begin() + newLocation, curLib);
return;
}
}
}
bool CBaseLibraryManager::SetLibraryName(CBaseLibrary* lib, const QString& name)
{
// SetFilename will validate if the name is duplicate with exist libraries.
if (lib->SetFilename(MakeFilename(name)))
{
lib->SetName(name);
return true;
}
return false;
}

@ -1,226 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H
#define CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H
#pragma once
#include "Include/IBaseLibraryManager.h"
#include "Include/IDataBaseItem.h"
#include "Include/IDataBaseLibrary.h"
#include "Include/IDataBaseManager.h"
#include "Util/TRefCountBase.h"
#include "Util/GuidUtil.h"
#include "BaseLibrary.h"
#include "Util/smartptr.h"
#include <EditorDefs.h>
#include <QtUtil.h>
AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING
/** Manages all Libraries and Items.
*/
class SANDBOX_API CBaseLibraryManager
: public IBaseLibraryManager
{
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
public:
CBaseLibraryManager();
~CBaseLibraryManager();
//! Clear all libraries.
void ClearAll() override;
//////////////////////////////////////////////////////////////////////////
// IDocListener implementation.
//////////////////////////////////////////////////////////////////////////
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
//////////////////////////////////////////////////////////////////////////
// Library items.
//////////////////////////////////////////////////////////////////////////
//! Make a new item in specified library.
IDataBaseItem* CreateItem(IDataBaseLibrary* pLibrary) override;
//! Delete item from library and manager.
void DeleteItem(IDataBaseItem* pItem) override;
//! Find Item by its GUID.
IDataBaseItem* FindItem(REFGUID guid) const override;
IDataBaseItem* FindItemByName(const QString& fullItemName) override;
IDataBaseItem* LoadItemByName(const QString& fullItemName) override;
virtual IDataBaseItem* FindItemByName(const char* fullItemName);
virtual IDataBaseItem* LoadItemByName(const char* fullItemName);
IDataBaseItemEnumerator* GetItemEnumerator() override;
//////////////////////////////////////////////////////////////////////////
// Set item currently selected.
void SetSelectedItem(IDataBaseItem* pItem) override;
// Get currently selected item.
IDataBaseItem* GetSelectedItem() const override;
IDataBaseItem* GetSelectedParentItem() const override;
//////////////////////////////////////////////////////////////////////////
// Libraries.
//////////////////////////////////////////////////////////////////////////
//! Add Item library.
IDataBaseLibrary* AddLibrary(const QString& library, bool bIsLevelLibrary = false, bool bIsLoading = true) override;
void DeleteLibrary(const QString& library, bool forceDeleteLevel = false) override;
//! Get number of libraries.
int GetLibraryCount() const override { return static_cast<int>(m_libs.size()); };
//! Get number of modified libraries.
int GetModifiedLibraryCount() const override;
//! Get Item library by index.
IDataBaseLibrary* GetLibrary(int index) const override;
//! Get Level Item library.
IDataBaseLibrary* GetLevelLibrary() const override;
//! Find Items Library by name.
IDataBaseLibrary* FindLibrary(const QString& library) override;
//! Find Items Library's index by name.
int FindLibraryIndex(const QString& library) override;
//! Load Items library.
IDataBaseLibrary* LoadLibrary(const QString& filename, bool bReload = false) override;
//! Save all modified libraries.
void SaveAllLibs() override;
//! Serialize property manager.
void Serialize(XmlNodeRef& node, bool bLoading) override;
//! Export items to game.
void Export([[maybe_unused]] XmlNodeRef& node) override {};
//! Returns unique name base on input name.
QString MakeUniqueItemName(const QString& name, const QString& libName = "") override;
QString MakeFullItemName(IDataBaseLibrary* pLibrary, const QString& group, const QString& itemName) override;
//! Root node where this library will be saved.
QString GetRootNodeName() override = 0;
//! Path to libraries in this manager.
QString GetLibsPath() override = 0;
//////////////////////////////////////////////////////////////////////////
//! Validate library items for errors.
void Validate() override;
//////////////////////////////////////////////////////////////////////////
void GatherUsedResources(CUsedResources& resources) override;
void AddListener(IDataBaseManagerListener* pListener) override;
void RemoveListener(IDataBaseManagerListener* pListener) override;
//////////////////////////////////////////////////////////////////////////
void RegisterItem(CBaseLibraryItem* pItem, REFGUID newGuid) override;
void RegisterItem(CBaseLibraryItem* pItem) override;
void UnregisterItem(CBaseLibraryItem* pItem) override;
// Only Used internally.
void OnRenameItem(CBaseLibraryItem* pItem, const QString& oldName) override;
// Called by items to indicated that they have been modified.
// Sends item changed event to listeners.
void OnItemChanged(IDataBaseItem* pItem) override;
void OnUpdateProperties(IDataBaseItem* pItem, bool bRefresh) override;
QString MakeFilename(const QString& library);
bool IsUniqueFilename(const QString& library) override;
//CONFETTI BEGIN
// Used to change the library item order
void ChangeLibraryOrder(IDataBaseLibrary* lib, unsigned int newLocation) override;
bool SetLibraryName(CBaseLibrary* lib, const QString& name) override;
protected:
void SplitFullItemName(const QString& fullItemName, QString& libraryName, QString& itemName);
void NotifyItemEvent(IDataBaseItem* pItem, EDataBaseItemEvent event);
void SetRegisteredFlag(CBaseLibraryItem* pItem, bool bFlag);
//////////////////////////////////////////////////////////////////////////
// Must be overriden.
//! Makes a new Item.
virtual CBaseLibraryItem* MakeNewItem() = 0;
virtual CBaseLibrary* MakeNewLibrary() = 0;
//////////////////////////////////////////////////////////////////////////
virtual void ReportDuplicateItem(CBaseLibraryItem* pItem, CBaseLibraryItem* pOldItem);
protected:
bool m_bUniqGuidMap;
bool m_bUniqNameMap;
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
//! Array of all loaded entity items libraries.
std::vector<_smart_ptr<CBaseLibrary> > m_libs;
// There is always one current level library.
TSmartPtr<CBaseLibrary> m_pLevelLibrary;
// GUID to item map.
typedef std::map<GUID, _smart_ptr<CBaseLibraryItem>, guid_less_predicate> ItemsGUIDMap;
ItemsGUIDMap m_itemsGuidMap;
// Case insensitive name to items map.
typedef std::map<QString, _smart_ptr<CBaseLibraryItem>, stl::less_stricmp<QString>> ItemsNameMap;
ItemsNameMap m_itemsNameMap;
AZStd::mutex m_itemsNameMapMutex;
std::vector<IDataBaseManagerListener*> m_listeners;
// Currently selected item.
_smart_ptr<CBaseLibraryItem> m_pSelectedItem;
_smart_ptr<CBaseLibraryItem> m_pSelectedParent;
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
};
//////////////////////////////////////////////////////////////////////////
template <class TMap>
class CDataBaseItemEnumerator
: public IDataBaseItemEnumerator
{
TMap* m_pMap;
typename TMap::iterator m_iterator;
public:
CDataBaseItemEnumerator(TMap* pMap)
{
assert(pMap);
m_pMap = pMap;
m_iterator = m_pMap->begin();
}
void Release() override { delete this; };
IDataBaseItem* GetFirst() override
{
m_iterator = m_pMap->begin();
if (m_iterator == m_pMap->end())
{
return 0;
}
return m_iterator->second;
}
IDataBaseItem* GetNext() override
{
if (m_iterator != m_pMap->end())
{
m_iterator++;
}
if (m_iterator == m_pMap->end())
{
return 0;
}
return m_iterator->second;
}
};
#endif // CRYINCLUDE_EDITOR_BASELIBRARYMANAGER_H

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:58ef978b31b31df9aaf715a0e9b006fde414a17a3ff15a3bf680eaad7418867a
size 364

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98a681ec3d89ee57c5d1057fe984dcf8ad45721f47ae4df57fa358fbee85e616
size 385

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:24a2b2c9242a841c20e7815dab0d80a575844055328aea413d28b7283b65a92e
size 386

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce23a276fec849b8f832fab96d3b738793335c27d37ae3813158387f3415b508
size 377

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c03befab41765200f4f28dbf1e0b2a702d2244bfa79b0d463f5d58d0a26095fc
size 386

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:418c3f0f27854b3795841359014d87686a7bf94daf2568d9cfd3ffac22675f69
size 386

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d3a831f34ac53c9b1f20037290e8a2b62a3cfb8a4f86467591f44fd2a0e3c15b
size 379

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4267102ca7a889c34eff905480a68878d4d56e15bc723a5b0575cd472e259f5d
size 389

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a0df013dd102b87348fba18b4da5443591309e9c40166d27ae928636924154ea
size 388

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e713076ab5abbbb2cf28da431a339e9905acc790e35295f025aa2e79e1c04141
size 376

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9e5af9d62ceafc3b8a1dfc36772350cd623fcc86c68711b299e143ff133f79b6
size 387

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17c5fb3d7b87ea87a98934954c721573c641bc44005a34f1e16589d7f39b71e8
size 409

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6f5c78d9f764b62fb7dcf400c91c1edea9d7f88a426ba513fbf70825c6bcd2ac
size 383

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:376b549602afffca407525b77c1a9821bf6a0e279792ae2e52fe0a4f7c3c5bd4
size 364

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e7dc48f8d324b7563b168f27ebde1e00ee2bd11ba462f114a05b297913e285c5
size 374

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:66b73afbd6dba1caaedfaae161b277b460b5198f7fc00bec414530116c567276
size 375

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae6e6714acf495246f4e59f6e5640f3a4417ea50100d37a116950d2b859aed0c
size 417

@ -1,111 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCBMFC_H
#define CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCBMFC_H
#pragma once
#if !defined(Q_MOC_RUN)
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QTextEdit>
#include <QtWidgets/QPushButton>
#include "ConsoleSCB.h"
#endif
class QMenu;
class ConsoleWidget;
class QFocusEvent;
namespace Ui {
class ConsoleMFC;
}
namespace MFC
{
struct ConsoleLine
{
QString text;
bool newLine;
};
typedef std::deque<ConsoleLine> Lines;
class ConsoleLineEdit
: public QLineEdit
{
Q_OBJECT
public:
explicit ConsoleLineEdit(QWidget* parent = nullptr);
protected:
void mousePressEvent(QMouseEvent* ev) override;
void mouseDoubleClickEvent(QMouseEvent* ev) override;
void keyPressEvent(QKeyEvent* ev) override;
bool event(QEvent* ev) override;
signals:
void variableEditorRequested();
void setWindowTitle(const QString&);
private:
void DisplayHistory(bool bForward);
QStringList m_history;
unsigned int m_historyIndex;
bool m_bReusedHistory;
};
class ConsoleTextEdit
: public QTextEdit
{
Q_OBJECT
public:
explicit ConsoleTextEdit(QWidget* parent = nullptr);
};
class CConsoleSCB
: public QWidget
{
Q_OBJECT
public:
explicit CConsoleSCB(QWidget* parent = nullptr);
~CConsoleSCB();
static void RegisterViewClass();
void SetInputFocus();
void AddToConsole(const QString& text, bool bNewLine);
void FlushText();
void showPopupAndSetTitle();
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
static CConsoleSCB* GetCreatedInstance();
static void AddToPendingLines(const QString& text, bool bNewLine); // call this function instead of AddToConsole() until an instance of CConsoleSCB exists to prevent messages from getting lost
public Q_SLOTS:
void OnStyleSettingsChanged();
private Q_SLOTS:
void showVariableEditor();
private:
QScopedPointer<Ui::ConsoleMFC> ui;
int m_richEditTextLength;
Lines m_lines;
static Lines s_pendingLines;
QList<QColor> m_colorTable;
SEditorSettings::ConsoleColorTheme m_backgroundTheme;
};
} // namespace MFC
#endif // CRYINCLUDE_EDITOR_CONTROLS_CONSOLESCB_H

@ -1,132 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConsoleMFC</class>
<widget class="QWidget" name="Console">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>120</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Ignored">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Console</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QTextEdit" name="textEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="container2" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="button">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>20</width>
<height>30</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="MFC::ConsoleLineEdit" name="lineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>MFC::ConsoleLineEdit</class>
<extends>QLineEdit</extends>
<header>ConsoleSCBMFC.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="ConsoleSCB.qrc"/>
</resources>
<connections/>
</ui>

@ -1,48 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "HotTrackingTreeCtrl.h"
// Qt
#include <QMouseEvent>
CHotTrackingTreeCtrl::CHotTrackingTreeCtrl(QWidget* parent)
: QTreeWidget(parent)
{
setMouseTracking(true);
m_hHoverItem = nullptr;
}
void CHotTrackingTreeCtrl::mouseMoveEvent(QMouseEvent* event)
{
QTreeWidgetItem* hItem = itemAt(event->pos());
if (m_hHoverItem != nullptr)
{
QFont font = m_hHoverItem->font(0);
font.setBold(false);
m_hHoverItem->setFont(0, font);
m_hHoverItem = nullptr;
}
if (hItem != nullptr)
{
QFont font = hItem->font(0);
font.setBold(true);
hItem->setFont(0, font);
m_hHoverItem = hItem;
}
QTreeWidget::mouseMoveEvent(event);
}
#include <Controls/moc_HotTrackingTreeCtrl.cpp>

@ -1,33 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H
#define CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H
#pragma once
#if !defined(Q_MOC_RUN)
#include <QTreeWidget>
#endif
class CHotTrackingTreeCtrl
: public QTreeWidget
{
Q_OBJECT
public:
CHotTrackingTreeCtrl(QWidget* parent = 0);
virtual ~CHotTrackingTreeCtrl(){};
protected:
void mouseMoveEvent(QMouseEvent* event) override;
private:
QTreeWidgetItem* m_hHoverItem;
};
#endif // CRYINCLUDE_EDITOR_CONTROLS_HOTTRACKINGTREECTRL_H

@ -1,567 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "ImageListCtrl.h"
// Qt
#include <QPainter>
#include <QScrollBar>
//////////////////////////////////////////////////////////////////////////
CImageListCtrl::CImageListCtrl(QWidget* parent)
: QAbstractItemView(parent)
, m_itemSize(60, 60)
, m_borderSize(4, 4)
, m_style(DefaultStyle)
{
setItemDelegate(new QImageListDelegate(this));
setAutoFillBackground(false);
QPalette p = palette();
p.setColor(QPalette::Highlight, QColor(255, 55, 50));
setPalette(p);
horizontalScrollBar()->setRange(0, 0);
verticalScrollBar()->setRange(0, 0);
}
//////////////////////////////////////////////////////////////////////////
CImageListCtrl::~CImageListCtrl()
{
}
//////////////////////////////////////////////////////////////////////////
CImageListCtrl::ListStyle CImageListCtrl::Style() const
{
return m_style;
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::SetStyle(ListStyle style)
{
m_style = style;
scheduleDelayedItemsLayout();
}
//////////////////////////////////////////////////////////////////////////
const QSize& CImageListCtrl::ItemSize() const
{
return m_itemSize;
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::SetItemSize(QSize size)
{
Q_ASSERT(size.isValid());
m_itemSize = size;
scheduleDelayedItemsLayout();
}
//////////////////////////////////////////////////////////////////////////
const QSize& CImageListCtrl::BorderSize() const
{
return m_borderSize;
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::SetBorderSize(QSize size)
{
Q_ASSERT(size.isValid());
m_borderSize = size;
scheduleDelayedItemsLayout();
}
//////////////////////////////////////////////////////////////////////////
QModelIndexList CImageListCtrl::ItemsInRect(const QRect& rect) const
{
QModelIndexList list;
if (!model())
{
return list;
}
QHash<int, QRect>::const_iterator i;
QHash<int, QRect>::const_iterator c = m_geometry.cend();
for (i = m_geometry.cbegin(); i != c; ++i)
{
if (i.value().intersects(rect))
{
list << model()->index(i.key(), 0, rootIndex());
}
}
return list;
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::paintEvent(QPaintEvent* event)
{
QAbstractItemView::paintEvent(event);
if (!model())
{
return;
}
const int rowCount = model()->rowCount();
if (m_geometry.isEmpty() && rowCount)
{
updateGeometries();
}
QPainter painter(viewport());
painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing);
painter.setBackground(palette().window());
painter.setFont(font());
QStyleOptionViewItem option;
option.palette = palette();
option.font = font();
option.fontMetrics = fontMetrics();
option.decorationAlignment = Qt::AlignCenter;
const QRect visibleRect(QPoint(horizontalOffset(), verticalOffset()), viewport()->contentsRect().size());
painter.translate(-horizontalOffset(), -verticalOffset());
for (int r = 0; r < rowCount; ++r)
{
const QModelIndex& index = model()->index(r, 0, rootIndex());
option.rect = m_geometry.value(r);
if (!option.rect.intersects(visibleRect))
{
continue;
}
option.state = QStyle::State_None;
if (selectionModel()->isSelected(index))
{
option.state |= QStyle::State_Selected;
}
if (currentIndex() == index)
{
option.state |= QStyle::State_HasFocus;
}
QAbstractItemDelegate* idt = itemDelegate(index);
idt->paint(&painter, option, index);
}
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::rowsInserted(const QModelIndex& parent, int start, int end)
{
QAbstractItemView::rowsInserted(parent, start, end);
if (isVisible())
{
scheduleDelayedItemsLayout();
}
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::updateGeometries()
{
ClearItemGeometries();
if (!model())
{
return;
}
const int rowCount = model()->rowCount();
const int nPageHorz = viewport()->width();
const int nPageVert = viewport()->height();
if (nPageHorz == 0 || nPageVert == 0 || rowCount <= 0)
{
return;
}
int x = m_borderSize.width();
int y = m_borderSize.height();
const int nItemWidth = m_itemSize.width() + m_borderSize.width();
if (m_style == HorizontalStyle)
{
for (int row = 0; row < rowCount; ++row)
{
m_geometry.insert(row, QRect(QPoint(x, y), m_itemSize));
x += nItemWidth;
}
horizontalScrollBar()->setPageStep(viewport()->width());
horizontalScrollBar()->setRange(0, x - viewport()->width());
}
else
{
const int nTextHeight = fontMetrics().height();
const int nItemHeight = m_itemSize.height() + m_borderSize.height() + nTextHeight;
int nNumOfHorzItems = nPageHorz / nItemWidth;
if (nNumOfHorzItems <= 0)
{
nNumOfHorzItems = 1;
}
for (int row = 0; row < rowCount; ++row)
{
m_geometry.insert(row, QRect(QPoint(x, y), m_itemSize));
if ((row + 1) % nNumOfHorzItems == 0)
{
y += nItemHeight;
x = m_borderSize.width();
}
else
{
x += nItemWidth;
}
}
verticalScrollBar()->setPageStep(viewport()->height());
verticalScrollBar()->setRange(0, (y + nItemHeight) - viewport()->height());
}
}
//////////////////////////////////////////////////////////////////////////
QModelIndex CImageListCtrl::indexAt(const QPoint& point) const
{
if (!model())
{
return QModelIndex();
}
const QPoint p = point +
QPoint(horizontalOffset(), verticalOffset());
QHash<int, QRect>::const_iterator i;
QHash<int, QRect>::const_iterator c = m_geometry.cend();
for (i = m_geometry.cbegin(); i != c; ++i)
{
if (i.value().contains(p))
{
return model()->index(i.key(), 0, rootIndex());
}
}
return QModelIndex();
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::scrollTo(const QModelIndex& index, ScrollHint hint)
{
if (!index.isValid())
{
return;
}
QRect rect = m_geometry.value(index.row());
switch (hint)
{
case EnsureVisible:
if (horizontalOffset() > rect.right())
{
horizontalScrollBar()->setValue(rect.left());
}
else if ((horizontalOffset() + viewport()->width()) < rect.left())
{
horizontalScrollBar()->setValue(rect.right() - viewport()->width());
}
if (verticalOffset() > rect.bottom())
{
verticalScrollBar()->setValue(rect.top());
}
else if ((verticalOffset() + viewport()->height()) < rect.top())
{
verticalScrollBar()->setValue(rect.bottom() - viewport()->height());
}
break;
case PositionAtTop:
horizontalScrollBar()->setValue(rect.left());
verticalScrollBar()->setValue(rect.top());
break;
case PositionAtBottom:
horizontalScrollBar()->setValue(rect.right() - viewport()->width());
verticalScrollBar()->setValue(rect.bottom() - viewport()->height());
break;
case PositionAtCenter:
horizontalScrollBar()->setValue(rect.center().x() - (viewport()->width() / 2));
verticalScrollBar()->setValue(rect.center().y() - (viewport()->height() / 2));
break;
}
}
//////////////////////////////////////////////////////////////////////////
QRect CImageListCtrl::visualRect(const QModelIndex& index) const
{
if (!index.isValid())
{
return QRect();
}
if (!m_geometry.contains(index.row()))
{
return QRect();
}
return m_geometry.value(index.row())
.translated(-horizontalOffset(), -verticalOffset());
}
//////////////////////////////////////////////////////////////////////////
QRect CImageListCtrl::ItemGeometry(const QModelIndex& index) const
{
Q_ASSERT(index.model() == model());
Q_ASSERT(m_geometry.contains(index.row()));
return m_geometry.value(index.row());
}
void CImageListCtrl::SetItemGeometry(const QModelIndex& index, const QRect& rect)
{
Q_ASSERT(index.model() == model());
m_geometry.insert(index.row(), rect);
update(rect);
}
void CImageListCtrl::ClearItemGeometries()
{
m_geometry.clear();
}
//////////////////////////////////////////////////////////////////////////
int CImageListCtrl::horizontalOffset() const
{
return horizontalScrollBar()->value();
}
//////////////////////////////////////////////////////////////////////////
int CImageListCtrl::verticalOffset() const
{
return verticalScrollBar()->value();
}
//////////////////////////////////////////////////////////////////////////
bool CImageListCtrl::isIndexHidden([[maybe_unused]] const QModelIndex& index) const
{
return false; /* not supported */
}
//////////////////////////////////////////////////////////////////////////
QModelIndex CImageListCtrl::moveCursor(CursorAction cursorAction, [[maybe_unused]] Qt::KeyboardModifiers modifiers)
{
if (!model())
{
return QModelIndex();
}
const int rowCount = model()->rowCount();
if (0 == rowCount)
{
return QModelIndex();
}
switch (cursorAction)
{
case MoveHome:
return model()->index(0, 0, rootIndex());
case MoveEnd:
return model()->index(rowCount - 1, 0, rootIndex());
case MovePrevious:
{
QModelIndex current = currentIndex();
if (current.isValid())
{
return model()->index((current.row() - 1) % rowCount, 0, rootIndex());
}
} break;
case MoveNext:
{
QModelIndex current = currentIndex();
if (current.isValid())
{
return model()->index((current.row() + 1) % rowCount, 0, rootIndex());
}
} break;
case MoveUp:
case MoveDown:
case MoveLeft:
case MoveRight:
case MovePageUp:
case MovePageDown:
/* TODO */
break;
}
return QModelIndex();
}
//////////////////////////////////////////////////////////////////////////
void CImageListCtrl::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags)
{
if (!model())
{
return;
}
const QRect lrect =
rect.translated(horizontalOffset(), verticalOffset());
QHash<int, QRect>::const_iterator i;
QHash<int, QRect>::const_iterator c = m_geometry.cend();
for (i = m_geometry.cbegin(); i != c; ++i)
{
if (i.value().intersects(lrect))
{
selectionModel()->select(model()->index(i.key(), 0, rootIndex()), flags);
}
}
}
//////////////////////////////////////////////////////////////////////////
QRegion CImageListCtrl::visualRegionForSelection(const QItemSelection& selection) const
{
QRegion region;
foreach(const QModelIndex &index, selection.indexes())
{
region += visualRect(index);
}
return region;
}
//////////////////////////////////////////////////////////////////////////
QImageListDelegate::QImageListDelegate(QObject* parent)
: QAbstractItemDelegate(parent)
{
}
//////////////////////////////////////////////////////////////////////////
void QImageListDelegate::paint(QPainter* painter,
const QStyleOptionViewItem& option, const QModelIndex& index) const
{
painter->save();
painter->setFont(option.font);
if (option.rect.isValid())
{
painter->setClipRect(option.rect);
}
QRect innerRect = option.rect.adjusted(1, 1, -1, -1);
QRect textRect(innerRect.left(), innerRect.bottom() - option.fontMetrics.height(),
innerRect.width(), option.fontMetrics.height() + 1);
/* fill item background */
painter->fillRect(option.rect, option.palette.color(QPalette::Base));
/* draw image */
if (index.data(Qt::DecorationRole).isValid())
{
const QPixmap& p = index.data(Qt::DecorationRole).value<QPixmap>();
if (p.isNull() || p.size() == QSize(1, 1))
{
emit InvalidPixmapGenerated(index);
}
else
{
painter->drawPixmap(innerRect, p);
}
}
/* draw text */
const QColor trColor = option.palette.color(QPalette::Shadow);
painter->fillRect(textRect, (option.state & QStyle::State_Selected) ?
trColor.lighter() : trColor);
if (option.state & QStyle::State_Selected)
{
painter->setPen(QPen(option.palette.color(QPalette::HighlightedText)));
QFont f = painter->font();
f.setBold(true);
painter->setFont(f);
}
else
{
painter->setPen(QPen(option.palette.color(QPalette::Text)));
}
painter->drawText(textRect, index.data(Qt::DisplayRole).toString(),
QTextOption(option.decorationAlignment));
painter->setPen(QPen(option.palette.color(QPalette::Shadow)));
painter->drawRect(textRect);
/* draw border */
if (option.state & QStyle::State_Selected)
{
QPen pen(option.palette.color(QPalette::Highlight));
pen.setWidth(2);
painter->setPen(pen);
painter->drawRect(innerRect);
}
else
{
painter->setPen(QPen(option.palette.color(QPalette::Shadow)));
painter->drawRect(option.rect);
}
if (option.state & QStyle::State_HasFocus)
{
QPen pen(Qt::DotLine);
pen.setColor(option.palette.color(QPalette::AlternateBase));
painter->setPen(pen);
painter->drawRect(option.rect);
}
painter->restore();
}
//////////////////////////////////////////////////////////////////////////
QSize QImageListDelegate::sizeHint(const QStyleOptionViewItem& option,
[[maybe_unused]] const QModelIndex& index) const
{
return option.rect.size();
}
//////////////////////////////////////////////////////////////////////////
QVector<int> QImageListDelegate::paintingRoles() const
{
return QVector<int>() << Qt::DecorationRole << Qt::DisplayRole;
}
#include <Controls/moc_ImageListCtrl.cpp>

@ -1,97 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H
#define CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H
#pragma once
#if !defined(Q_MOC_RUN)
#include <QAbstractItemView>
#include <QHash>
#endif
//////////////////////////////////////////////////////////////////////////
// Custom control to display list of images.
//////////////////////////////////////////////////////////////////////////
class CImageListCtrl
: public QAbstractItemView
{
Q_OBJECT
public:
enum ListStyle
{
DefaultStyle,
HorizontalStyle
};
public:
CImageListCtrl(QWidget* parent = nullptr);
~CImageListCtrl();
ListStyle Style() const;
void SetStyle(ListStyle style);
const QSize& ItemSize() const;
void SetItemSize(QSize size);
const QSize& BorderSize() const;
void SetBorderSize(QSize size);
// Get all items inside specified rectangle.
QModelIndexList ItemsInRect(const QRect& rect) const;
QModelIndex indexAt(const QPoint& point) const override;
void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible) override;
QRect visualRect(const QModelIndex& index) const override;
protected:
QRect ItemGeometry(const QModelIndex& index) const;
void SetItemGeometry(const QModelIndex& index, const QRect& rect);
void ClearItemGeometries();
int horizontalOffset() const override;
int verticalOffset() const override;
bool isIndexHidden(const QModelIndex& index) const override;
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) override;
QRegion visualRegionForSelection(const QItemSelection& selection) const override;
void paintEvent(QPaintEvent* event) override;
void rowsInserted(const QModelIndex& parent, int start, int end) override;
void updateGeometries() override;
private:
QHash<int, QRect> m_geometry;
QSize m_itemSize;
QSize m_borderSize;
ListStyle m_style;
};
class QImageListDelegate
: public QAbstractItemDelegate
{
Q_OBJECT
signals:
void InvalidPixmapGenerated(const QModelIndex& index) const;
public:
QImageListDelegate(QObject* parent = nullptr);
void paint(QPainter* painter,
const QStyleOptionViewItem& option,
const QModelIndex& index) const override;
QSize sizeHint(const QStyleOptionViewItem& option,
const QModelIndex& index) const override;
QVector<int> paintingRoles() const override;
};
#endif // CRYINCLUDE_EDITOR_CONTROLS_IMAGELISTCTRL_H

@ -1,67 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "MultiMonHelper.h"
// Qt
#include <QScreen>
////////////////////////////////////////////////////////////////////////////
void ClipOrCenterRectToMonitor(QRect *prc, const UINT flags)
{
const QScreen* currentScreen = nullptr;
QRect rc;
Q_ASSERT(prc);
const auto screens = qApp->screens();
for (auto screen : screens)
{
if (screen->geometry().contains(prc->center()))
{
currentScreen = screen;
break;
}
}
if (!currentScreen)
{
return;
}
const int w = prc->width();
const int h = prc->height();
if (flags & MONITOR_WORKAREA)
{
rc = currentScreen->availableGeometry();
}
else
{
rc = currentScreen->geometry();
}
// center or clip the passed rect to the monitor rect
if (flags & MONITOR_CENTER)
{
prc->setLeft(rc.left() + (rc.right() - rc.left() - w) / 2);
prc->setTop(rc.top() + (rc.bottom() - rc.top() - h) / 2);
prc->setRight(prc->left() + w);
prc->setBottom(prc->top() + h);
}
else
{
prc->setLeft(qMax(rc.left(), qMin(rc.right() - w, prc->left())));
prc->setTop(qMax(rc.top(), qMin(rc.bottom() - h, prc->top())));
prc->setRight(prc->left() + w);
prc->setBottom(prc->top() + h);
}
}

@ -1,44 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H
#define CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H
#pragma once
// Taken from: http://msdn.microsoft.com/en-us/library/dd162826(v=vs.85).aspx
#define MONITOR_CENTER 0x0001 // center rect to monitor
#define MONITOR_CLIP 0x0000 // clip rect to monitor
#define MONITOR_WORKAREA 0x0002 // use monitor work area
#define MONITOR_AREA 0x0000 // use monitor entire area
//
// ClipOrCenterRectToMonitor
//
// The most common problem apps have when running on a
// multimonitor system is that they "clip" or "pin" windows
// based on the SM_CXSCREEN and SM_CYSCREEN system metrics.
// Because of app compatibility reasons these system metrics
// return the size of the primary monitor.
//
// This shows how you use the multi-monitor functions
// to do the same thing.
//
// params:
// prc : pointer to QRect to modify
// flags : some combination of the MONITOR_* flags above
//
// example:
//
// ClipOrCenterRectToMonitor(&aRect, MONITOR_CLIP | MONITOR_WORKAREA);
//
// Takes parameter pointer to RECT "aRect" and flags MONITOR_CLIP | MONITOR_WORKAREA
// This will modify aRect without resizing it so that it remains within the on-screen boundaries.
void ClipOrCenterRectToMonitor(QRect *prc, const UINT flags);
#endif // CRYINCLUDE_EDITOR_CONTROLS_MULTIMONHELPER_H

@ -1,143 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "NumberCtrl.h"
QNumberCtrl::QNumberCtrl(QWidget* parent)
: QDoubleSpinBox(parent)
, m_bMouseDown(false)
, m_bDragged(false)
, m_bUndoEnabled(false)
, m_prevValue(0)
{
connect(this, &QAbstractSpinBox::editingFinished, this, &QNumberCtrl::onEditingFinished);
}
void QNumberCtrl::changeEvent(QEvent* event)
{
if (event->type() == QEvent::EnabledChange)
{
setButtonSymbols(isEnabled() ? UpDownArrows : NoButtons);
}
QDoubleSpinBox::changeEvent(event);
}
void QNumberCtrl::SetRange(double newMin, double newMax)
{
// Avoid setting this value if its close to the current value, because otherwise qt will pump events into the queue to redraw/etc.
if ( (!AZ::IsClose(this->minimum(), newMin, DBL_EPSILON)) || (!AZ::IsClose(this->maximum(), newMax, DBL_EPSILON)) )
{
setRange(newMin, newMax);
}
}
void QNumberCtrl::mousePressEvent(QMouseEvent* event)
{
if (event->button() == Qt::LeftButton)
{
emit mousePressed();
m_bMouseDown = true;
m_bDragged = false;
m_mousePos = event->pos();
if (m_bUndoEnabled && !CUndo::IsRecording())
{
GetIEditor()->BeginUndo();
}
emit dragStarted();
grabMouse();
}
QDoubleSpinBox::mousePressEvent(event);
}
void QNumberCtrl::mouseReleaseEvent(QMouseEvent* event)
{
QDoubleSpinBox::mouseReleaseEvent(event);
if (event->button() == Qt::LeftButton)
{
m_bMouseDown = m_bDragged = false;
emit valueUpdated();
emit valueChanged();
if (m_bUndoEnabled && CUndo::IsRecording())
{
GetIEditor()->AcceptUndo(m_undoText);
}
emit dragFinished();
releaseMouse();
m_prevValue = value();
emit mouseReleased();
}
}
void QNumberCtrl::mouseMoveEvent(QMouseEvent* event)
{
QDoubleSpinBox::mousePressEvent(event);
if (m_bMouseDown)
{
m_bDragged = true;
int dy = event->pos().y() - m_mousePos.y();
setValue(value() - singleStep() * dy);
emit valueUpdated();
m_mousePos = event->pos();
}
}
void QNumberCtrl::EnableUndo(const QString& undoText)
{
m_undoText = undoText;
m_bUndoEnabled = true;
}
void QNumberCtrl::focusInEvent(QFocusEvent* event)
{
m_prevValue = value();
QDoubleSpinBox::focusInEvent(event);
}
void QNumberCtrl::onEditingFinished()
{
bool undo = m_bUndoEnabled && !CUndo::IsRecording() && m_prevValue != value();
if (undo)
{
GetIEditor()->BeginUndo();
}
emit valueUpdated();
emit valueChanged();
if (undo)
{
GetIEditor()->AcceptUndo(m_undoText);
}
m_prevValue = value();
}
#include <Controls/moc_NumberCtrl.cpp>

@ -1,64 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H
#define CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H
#pragma once
// NumberCtrl.h : header file
//
#if !defined(Q_MOC_RUN)
#include <QDoubleSpinBox>
#endif
class QNumberCtrl
: public QDoubleSpinBox
{
Q_OBJECT
public:
QNumberCtrl(QWidget* parent = nullptr);
bool IsDragging() const { return m_bDragged; }
//! If called will enable undo with given text when control is modified.
void EnableUndo(const QString& undoText);
void SetRange(double newMin, double maxRange);
Q_SIGNALS:
void dragStarted();
void dragFinished();
void valueUpdated();
void valueChanged();
void mouseReleased();
void mousePressed();
protected:
void changeEvent(QEvent* event) override;
void focusInEvent(QFocusEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
private:
void onEditingFinished();
void onValueChanged(double d);
bool m_bMouseDown;
bool m_bDragged;
QPoint m_mousePos;
bool m_bUndoEnabled;
double m_prevValue;
QString m_undoText;
};
#endif // CRYINCLUDE_EDITOR_CONTROLS_NUMBERCTRL_H

@ -1,93 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "TextEditorCtrl.h"
// CTextEditorCtrl
CTextEditorCtrl::CTextEditorCtrl(QWidget* pParent)
: QTextEdit(pParent)
{
m_bModified = true;
QFont font;
font.setFamily("Courier New");
font.setFixedPitch(true);
font.setPointSize(10);
setFont(font);
setLineWrapMode(NoWrap);
connect(this, &QTextEdit::textChanged, this, &CTextEditorCtrl::OnChange);
}
CTextEditorCtrl::~CTextEditorCtrl()
{
}
// CTextEditorCtrl message handlers
void CTextEditorCtrl::LoadFile(const QString& sFileName)
{
if (m_filename == sFileName)
{
return;
}
m_filename = sFileName;
clear();
CCryFile file(sFileName.toUtf8().data(), "rb");
if (file.Open(sFileName.toUtf8().data(), "rb"))
{
size_t length = file.GetLength();
QByteArray text;
text.resize(static_cast<int>(length));
file.ReadRaw(text.data(), length);
setPlainText(text);
}
m_bModified = false;
}
//////////////////////////////////////////////////////////////////////////
void CTextEditorCtrl::SaveFile(const QString& sFileName)
{
if (sFileName.isEmpty())
{
return;
}
if (!CFileUtil::OverwriteFile(sFileName.toUtf8().data()))
{
return;
}
QFile file(sFileName);
file.open(QFile::WriteOnly);
file.write(toPlainText().toUtf8());
m_bModified = false;
}
//////////////////////////////////////////////////////////////////////////
void CTextEditorCtrl::OnChange()
{
m_bModified = true;
}
#include <Controls/moc_TextEditorCtrl.cpp>

@ -1,42 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H
#define CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H
#pragma once
// CTextEditorCtrl
#if !defined(Q_MOC_RUN)
#include <QTextEdit>
#endif
class CTextEditorCtrl
: public QTextEdit
{
Q_OBJECT
public:
CTextEditorCtrl(QWidget* pParent = nullptr);
virtual ~CTextEditorCtrl();
void LoadFile(const QString& sFileName);
void SaveFile(const QString& sFileName);
QString GetFilename() const { return m_filename; }
bool IsModified() const { return m_bModified; }
//! Must be called after OnChange message.
void OnChange();
protected:
QString m_filename;
bool m_bModified;
};
#endif // CRYINCLUDE_EDITOR_CONTROLS_TEXTEDITORCTRL_H

@ -1,322 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H
#define CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H
#pragma once
#include <iterator>
namespace TreeCtrlUtils
{
template <typename P>
class TreeItemIterator
: public P
{
public:
typedef P Traits;
//iterator traits, required by STL
typedef ptrdiff_t difference_type;
typedef HTREEITEM value_type;
typedef HTREEITEM* pointer;
typedef HTREEITEM& reference;
typedef std::forward_iterator_tag iterator_category;
TreeItemIterator()
: pCtrl(0)
, hItem(0) {}
explicit TreeItemIterator(const P& traits)
: P(traits)
, pCtrl(0)
, hItem(0) {}
TreeItemIterator(const TreeItemIterator& other)
: P(other)
, pCtrl(other.pCtrl)
, hItem(other.hItem) {}
TreeItemIterator(CTreeCtrl* pCtrl, HTREEITEM hItem)
: pCtrl(pCtrl)
, hItem(hItem) {}
TreeItemIterator(CTreeCtrl* pCtrl, HTREEITEM hItem, const P& traits)
: P(traits)
, pCtrl(pCtrl)
, hItem(hItem) {}
HTREEITEM operator*() {return hItem; }
bool operator==(const TreeItemIterator& other) const {return pCtrl == other.pCtrl && hItem == other.hItem; }
bool operator!=(const TreeItemIterator& other) const {return pCtrl != other.pCtrl || hItem != other.hItem; }
TreeItemIterator& operator++()
{
HTREEITEM hNextItem = 0;
if (RecurseToChildren(hItem))
{
hNextItem = (pCtrl ? pCtrl->GetChildItem(hItem) : 0);
}
while (pCtrl && hItem && !hNextItem)
{
hNextItem = pCtrl->GetNextSiblingItem(hItem);
if (!hNextItem)
{
hItem = pCtrl->GetParentItem(hItem);
}
}
hItem = hNextItem;
return *this;
}
TreeItemIterator operator++(int) {TreeItemIterator old = *this; ++(*this); return old; }
CTreeCtrl* pCtrl;
HTREEITEM hItem;
};
class NonRecursiveTreeItemIteratorTraits
{
public:
bool RecurseToChildren(HTREEITEM hItem) {return false; }
};
typedef TreeItemIterator<NonRecursiveTreeItemIteratorTraits> NonRecursiveTreeItemIterator;
class RecursiveTreeItemIteratorTraits
{
public:
bool RecurseToChildren(HTREEITEM hItem) {return true; }
};
typedef TreeItemIterator<RecursiveTreeItemIteratorTraits> RecursiveTreeItemIterator;
inline RecursiveTreeItemIterator BeginTreeItemsRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
if (hItem == 0)
{
hItem = (pCtrl ? pCtrl->GetRootItem() : 0);
}
return RecursiveTreeItemIterator(pCtrl, hItem);
}
inline RecursiveTreeItemIterator EndTreeItemsRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
HTREEITEM hEndItem = 0;
HTREEITEM hParent = hItem;
do
{
if (hParent)
{
hEndItem = pCtrl->GetNextSiblingItem(hParent);
}
hParent = (pCtrl && hParent ? pCtrl->GetParentItem(hParent) : 0);
}
while (hParent && !hEndItem);
return RecursiveTreeItemIterator(pCtrl, hEndItem);
}
inline NonRecursiveTreeItemIterator BeginTreeItemsNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
if (hItem == 0)
{
hItem = (pCtrl ? pCtrl->GetRootItem() : 0);
}
if (hItem)
{
hItem = pCtrl->GetChildItem(hItem);
}
return NonRecursiveTreeItemIterator(pCtrl, hItem);
}
inline NonRecursiveTreeItemIterator EndTreeItemsNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
HTREEITEM hEndItem = 0;
HTREEITEM hParent = 0;
while (hParent && !hEndItem)
{
hParent = (pCtrl && hItem ? pCtrl->GetParentItem(hItem) : 0);
if (hParent)
{
hEndItem = pCtrl->GetNextSiblingItem(hParent);
}
}
return NonRecursiveTreeItemIterator(pCtrl, hEndItem);
}
template <typename T, typename P>
class TreeItemDataIterator
{
public:
typedef T Type;
typedef TreeItemIterator<P> InternalIterator;
//iterator traits, required by STL
typedef ptrdiff_t difference_type;
typedef Type* value_type;
typedef Type** pointer;
typedef Type*& reference;
typedef std::forward_iterator_tag iterator_category;
TreeItemDataIterator() {}
TreeItemDataIterator(const TreeItemDataIterator& other)
: iterator(other.iterator) {AdvanceToValidIterator(); }
explicit TreeItemDataIterator(const InternalIterator& iterator)
: iterator(iterator) {AdvanceToValidIterator(); }
Type* operator*() {return reinterpret_cast<Type*>(iterator.pCtrl->GetItemData(iterator.hItem)); }
bool operator==(const TreeItemDataIterator& other) const {return iterator == other.iterator; }
bool operator!=(const TreeItemDataIterator& other) const {return iterator != other.iterator; }
HTREEITEM GetTreeItem() {return iterator.hItem; }
TreeItemDataIterator& operator++()
{
++iterator;
AdvanceToValidIterator();
return *this;
}
TreeItemDataIterator operator++(int) {TreeItemDataIterator old = *this; ++(*this); return old; }
private:
void AdvanceToValidIterator()
{
while (iterator.pCtrl && iterator.hItem && !iterator.pCtrl->GetItemData(iterator.hItem))
{
++iterator;
}
}
InternalIterator iterator;
};
template <typename T>
class RecursiveItemDataIteratorType
{
public: typedef TreeItemDataIterator<T, RecursiveTreeItemIteratorTraits> type;
};
template <typename T>
inline TreeItemDataIterator<T, RecursiveTreeItemIteratorTraits> BeginTreeItemDataRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
return TreeItemDataIterator<T, RecursiveTreeItemIteratorTraits>(BeginTreeItemsRecursive(pCtrl, hItem));
}
template <typename T>
inline TreeItemDataIterator<T, RecursiveTreeItemIteratorTraits> EndTreeItemDataRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
return TreeItemDataIterator<T, RecursiveTreeItemIteratorTraits>(EndTreeItemsRecursive(pCtrl, hItem));
}
template <typename T>
class NonRecursiveItemDataIteratorType
{
typedef TreeItemDataIterator<T, NonRecursiveTreeItemIteratorTraits> type;
};
template <typename T>
inline TreeItemDataIterator<T, NonRecursiveTreeItemIteratorTraits> BeginTreeItemDataNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
return TreeItemDataIterator<T, NonRecursiveTreeItemIteratorTraits>(BeginTreeItemsNonRecursive(pCtrl, hItem));
}
template <typename T>
inline TreeItemDataIterator<T, NonRecursiveTreeItemIteratorTraits> EndTreeItemDataNonRecursive(CTreeCtrl* pCtrl, HTREEITEM hItem = 0)
{
return TreeItemDataIterator<T, NonRecursiveTreeItemIteratorTraits>(EndTreeItemsNonRecursive(pCtrl, hItem));
}
class SelectedTreeItemIterator
{
public:
SelectedTreeItemIterator()
: pCtrl(0)
, hItem(0) {}
SelectedTreeItemIterator(const SelectedTreeItemIterator& other)
: pCtrl(other.pCtrl)
, hItem(other.hItem) {}
SelectedTreeItemIterator(CXTTreeCtrl* pCtrl, HTREEITEM hItem)
: pCtrl(pCtrl)
, hItem(hItem) {}
HTREEITEM operator*() {return hItem; }
bool operator==(const SelectedTreeItemIterator& other) const {return pCtrl == other.pCtrl && hItem == other.hItem; }
bool operator!=(const SelectedTreeItemIterator& other) const {return pCtrl != other.pCtrl || hItem != other.hItem; }
SelectedTreeItemIterator& operator++()
{
hItem = (pCtrl ? pCtrl->GetNextSelectedItem(hItem) : 0);
return *this;
}
SelectedTreeItemIterator operator++(int) {SelectedTreeItemIterator old = *this; ++(*this); return old; }
CXTTreeCtrl* pCtrl;
HTREEITEM hItem;
};
SelectedTreeItemIterator BeginSelectedTreeItems(CXTTreeCtrl* pCtrl)
{
return SelectedTreeItemIterator(pCtrl, (pCtrl ? pCtrl->GetFirstSelectedItem() : 0));
}
SelectedTreeItemIterator EndSelectedTreeItems(CXTTreeCtrl* pCtrl)
{
return SelectedTreeItemIterator(pCtrl, 0);
}
template <typename T>
class SelectedTreeItemDataIterator
{
public:
typedef T Type;
typedef SelectedTreeItemIterator InternalIterator;
SelectedTreeItemDataIterator() {}
SelectedTreeItemDataIterator(const SelectedTreeItemDataIterator& other)
: iterator(other.iterator) {AdvanceToValidIterator(); }
explicit SelectedTreeItemDataIterator(const InternalIterator& iterator)
: iterator(iterator) {AdvanceToValidIterator(); }
Type* operator*() {return reinterpret_cast<Type*>(iterator.pCtrl->GetItemData(iterator.hItem)); }
bool operator==(const SelectedTreeItemDataIterator& other) const {return iterator == other.iterator; }
bool operator!=(const SelectedTreeItemDataIterator& other) const {return iterator != other.iterator; }
HTREEITEM GetTreeItem() {return iterator.hItem; }
SelectedTreeItemDataIterator& operator++()
{
++iterator;
AdvanceToValidIterator();
return *this;
}
SelectedTreeItemDataIterator operator++(int) {SelectedTreeItemDataIterator old = *this; ++(*this); return old; }
private:
void AdvanceToValidIterator()
{
while (iterator.pCtrl && iterator.hItem && !iterator.pCtrl->GetItemData(iterator.hItem))
{
++iterator;
}
}
InternalIterator iterator;
};
template <typename T>
SelectedTreeItemDataIterator<T> BeginSelectedTreeItemData(CXTTreeCtrl* pCtrl)
{
return SelectedTreeItemDataIterator<T>(BeginSelectedTreeItems(pCtrl));
}
template <typename T>
SelectedTreeItemDataIterator<T> EndSelectedTreeItemData(CXTTreeCtrl* pCtrl)
{
return SelectedTreeItemDataIterator<T>(EndSelectedTreeItems(pCtrl));
}
}
#endif // CRYINCLUDE_EDITOR_CONTROLS_TREECTRLUTILS_H

@ -104,6 +104,11 @@ namespace
}
}
// Currently (December 13, 2021), this function is only used by slice editor code.
// When the slice editor is not enabled, there are no references to the
// HideActionWhileEntitiesDeselected function, causing a compiler warning and
// subsequently a build error.
#ifdef ENABLE_SLICE_EDITOR
void HideActionWhileEntitiesDeselected(QAction* action, EEditorNotifyEvent editorNotifyEvent)
{
if (action == nullptr)
@ -127,6 +132,7 @@ namespace
break;
}
}
#endif
void DisableActionWhileInSimMode(QAction* action, EEditorNotifyEvent editorNotifyEvent)
{
@ -374,7 +380,6 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu()
{
DisableActionWhileLevelChanges(fileOpenSlice, e);
}));
#endif
// Save Selected Slice
auto saveSelectedSlice = fileMenu.AddAction(ID_FILE_SAVE_SELECTED_SLICE);
@ -391,7 +396,7 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu()
{
HideActionWhileEntitiesDeselected(saveSliceToRoot, e);
}));
#endif
// Open Recent
m_mostRecentLevelsMenu = fileMenu.AddMenu(tr("Open Recent"));
connect(m_mostRecentLevelsMenu, &QMenu::aboutToShow, this, &LevelEditorMenuHandler::UpdateMRUFiles);
@ -439,9 +444,10 @@ QMenu* LevelEditorMenuHandler::CreateFileMenu()
// Show Log File
fileMenu.AddAction(ID_FILE_EDITLOGFILE);
#ifdef ENABLE_SLICE_EDITOR
fileMenu.AddSeparator();
fileMenu.AddAction(ID_FILE_RESAVESLICES);
#endif
fileMenu.AddSeparator();

@ -380,13 +380,13 @@ void CCryEditApp::RegisterActionHandlers()
ON_COMMAND(ID_IMPORT_ASSET, OnOpenAssetImporter)
ON_COMMAND(ID_EDIT_LEVELDATA, OnEditLevelData)
ON_COMMAND(ID_FILE_EDITLOGFILE, OnFileEditLogFile)
ON_COMMAND(ID_FILE_RESAVESLICES, OnFileResaveSlices)
ON_COMMAND(ID_FILE_EDITEDITORINI, OnFileEditEditorini)
ON_COMMAND(ID_PREFERENCES, OnPreferences)
ON_COMMAND(ID_REDO, OnRedo)
ON_COMMAND(ID_TOOLBAR_WIDGET_REDO, OnRedo)
ON_COMMAND(ID_FILE_OPEN_LEVEL, OnOpenLevel)
#ifdef ENABLE_SLICE_EDITOR
ON_COMMAND(ID_FILE_RESAVESLICES, OnFileResaveSlices)
ON_COMMAND(ID_FILE_NEW_SLICE, OnCreateSlice)
ON_COMMAND(ID_FILE_OPEN_SLICE, OnOpenSlice)
#endif
@ -2629,6 +2629,7 @@ void CCryEditApp::OnFileEditLogFile()
CFileUtil::EditTextFile(CLogFile::GetLogFileName(), 0, IFileUtil::FILE_TYPE_SCRIPT);
}
#ifdef ENABLE_SLICE_EDITOR
void CCryEditApp::OnFileResaveSlices()
{
AZStd::vector<AZ::Data::AssetInfo> sliceAssetInfos;
@ -2759,6 +2760,7 @@ void CCryEditApp::OnFileResaveSlices()
}
}
#endif
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::OnFileEditEditorini()

@ -1,138 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "DeepSelection.h"
// Editor
#include "Objects/BaseObject.h"
//! Functor for sorting selected objects on deep selection mode.
struct NearDistance
{
NearDistance(){}
bool operator()(const CDeepSelection::RayHitObject& lhs, const CDeepSelection::RayHitObject& rhs) const
{
return lhs.distance < rhs.distance;
}
};
//-----------------------------------------------------------------------------
CDeepSelection::CDeepSelection()
: m_Mode(DSM_NONE)
, m_previousMode(DSM_NONE)
, m_CandidateObjectCount(0)
, m_CurrentSelectedPos(-1)
{
m_LastPickPoint = QPoint(-1, -1);
}
//-----------------------------------------------------------------------------
CDeepSelection::~CDeepSelection()
{
}
//-----------------------------------------------------------------------------
void CDeepSelection::Reset(bool bResetLastPick)
{
for (int i = 0; i < m_CandidateObjectCount; ++i)
{
m_RayHitObjects[i].object->ClearFlags(OBJFLAG_NO_HITTEST);
}
m_CandidateObjectCount = 0;
m_CurrentSelectedPos = -1;
m_RayHitObjects.clear();
if (bResetLastPick)
{
m_LastPickPoint = QPoint(-1, -1);
}
}
//-----------------------------------------------------------------------------
void CDeepSelection::AddObject(float distance, CBaseObject* pObj)
{
m_RayHitObjects.push_back(RayHitObject(distance, pObj));
}
//-----------------------------------------------------------------------------
bool CDeepSelection::OnCycling (const QPoint& pt)
{
QPoint diff = m_LastPickPoint - pt;
LONG epsilon = 2;
m_LastPickPoint = pt;
if (abs(diff.x()) < epsilon && abs(diff.y()) < epsilon)
{
return true;
}
else
{
return false;
}
}
//-----------------------------------------------------------------------------
void CDeepSelection::ExcludeHitTest(int except)
{
int nExcept = except % m_CandidateObjectCount;
for (int i = 0; i < m_CandidateObjectCount; ++i)
{
m_RayHitObjects[i].object->SetFlags(OBJFLAG_NO_HITTEST);
}
m_RayHitObjects[nExcept].object->ClearFlags(OBJFLAG_NO_HITTEST);
}
//-----------------------------------------------------------------------------
int CDeepSelection::CollectCandidate(float fMinDistance, float fRange)
{
m_CandidateObjectCount = 0;
if (!m_RayHitObjects.empty())
{
std::sort(m_RayHitObjects.begin(), m_RayHitObjects.end(), NearDistance());
for (std::vector<CDeepSelection::RayHitObject>::iterator itr = m_RayHitObjects.begin();
itr != m_RayHitObjects.end(); ++itr)
{
if (itr->distance - fMinDistance < fRange)
{
++m_CandidateObjectCount;
}
else
{
break;
}
}
}
return m_CandidateObjectCount;
}
//-----------------------------------------------------------------------------
CBaseObject* CDeepSelection::GetCandidateObject(int index)
{
m_CurrentSelectedPos = index % m_CandidateObjectCount;
return m_RayHitObjects[m_CurrentSelectedPos].object;
}
//-----------------------------------------------------------------------------
//!
void CDeepSelection::SetMode(EDeepSelectionMode mode)
{
m_previousMode = m_Mode;
m_Mode = mode;
}

@ -1,87 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Description : Deep Selection Header
#ifndef CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H
#define CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H
#pragma once
class CBaseObject;
//! Deep Selection
//! Additional output information of HitContext on using "deep selection mode".
//! At the deep selection mode, it supports second selection pass for easy
//! selection on crowded area with two different method.
//! One is to show pop menu of candidate objects list. Another is the cyclic
//! selection on pick clicking.
class CDeepSelection
: public _i_reference_target_t
{
public:
//! Deep Selection Mode Definition
enum EDeepSelectionMode
{
DSM_NONE = 0, // Not using deep selection.
DSM_POP = 1, // Deep selection mode with pop context menu.
DSM_CYCLE = 2 // Deep selection mode with cyclic selection on each clinking same point.
};
//! Subclass for container of the selected object with hit distance.
struct RayHitObject
{
RayHitObject(float dist, CBaseObject* pObj)
: distance(dist)
, object(pObj)
{
}
float distance;
CBaseObject* object;
};
//! Constructor
CDeepSelection();
virtual ~CDeepSelection();
void Reset(bool bResetLastPick = false);
void AddObject(float distance, CBaseObject* pObj);
//! Check if clicking point is same position with last position,
//! to decide whether to continue cycling mode.
bool OnCycling (const QPoint& pt);
//! All objects in list are excluded for hitting test except one, current selection.
void ExcludeHitTest(int except);
void SetMode(EDeepSelectionMode mode);
inline EDeepSelectionMode GetMode() const { return m_Mode; }
inline EDeepSelectionMode GetPreviousMode() const { return m_previousMode; }
//! Collect object in the deep selection range. The distance from the minimum
//! distance is less than deep selection range.
int CollectCandidate(float fMinDistance, float fRange);
//! Return the candidate object in index position, then it is to be current
//! selection position.
CBaseObject* GetCandidateObject(int index);
//! Return the current selection position that is update in "GetCandidateObject"
//! function call.
inline int GetCurrentSelectPos() const { return m_CurrentSelectedPos; }
//! Return the number of objects in the deep selection range.
inline int GetCandidateObjectCount() const { return m_CandidateObjectCount; }
private:
//! Current mode
EDeepSelectionMode m_Mode;
EDeepSelectionMode m_previousMode;
//! Last picking point to check whether cyclic selection continue.
QPoint m_LastPickPoint;
//! List of the selected objects with ray hitting
std::vector<RayHitObject> m_RayHitObjects;
int m_CandidateObjectCount;
int m_CurrentSelectedPos;
};
#endif // CRYINCLUDE_EDITOR_EDITMODE_DEEPSELECTION_H

@ -1,542 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "EditorPanelUtils.h"
#include <AzCore/Utils/Utils.h>
// Qt
#include <QInputDialog>
#include <QFileDialog>
#include <QXmlStreamReader>
// Editor
#include "IEditorPanelUtils.h"
#include "Objects/EntityObject.h"
#include "CryEditDoc.h"
#include "ViewManager.h"
#include "Controls/QToolTipWidget.h"
#include "Objects/SelectionGroup.h"
#ifndef PI
#define PI 3.14159265358979323f
#endif
struct ToolTip
{
bool isValid;
QString title;
QString content;
QString specialContent;
QString disabledContent;
};
// internal implementation for better compile times - should also never be used externally, use IParticleEditorUtils interface for that.
class CEditorPanelUtils_Impl
: public IEditorPanelUtils
{
public:
void SetViewportDragOperation(void(* dropCallback)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) override
{
for (int i = 0; i < GetIEditor()->GetViewManager()->GetViewCount(); i++)
{
GetIEditor()->GetViewManager()->GetView(i)->SetGlobalDropCallback(dropCallback, custom);
}
}
public:
int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) override
{
CRY_ASSERT(settings);
return settings->GetDebugFlags();
}
void PreviewWindow_SetDisplaySettingsDebugFlags(CDisplaySettings* settings, int flags) override
{
CRY_ASSERT(settings);
settings->SetDebugFlags(flags);
}
protected:
QVector<HotKey> hotkeys;
bool m_hotkeysAreEnabled;
public:
bool HotKey_Import() override
{
QVector<QPair<QString, QString> > keys;
QString filepath = QFileDialog::getOpenFileName(nullptr, "Select shortcut configuration to load",
QString(), "HotKey Config Files (*.hkxml)");
QFile file(filepath);
if (!file.open(QIODevice::ReadOnly))
{
return false;
}
QXmlStreamReader stream(&file);
bool result = true;
while (!stream.isEndDocument())
{
if (stream.isStartElement())
{
if (stream.name() == "HotKey")
{
QPair<QString, QString> key;
QXmlStreamAttributes att = stream.attributes();
for (QXmlStreamAttribute attr : att)
{
if (attr.name().compare(QLatin1String("path"), Qt::CaseInsensitive) == 0)
{
key.first = attr.value().toString();
}
if (attr.name().compare(QLatin1String("sequence"), Qt::CaseInsensitive) == 0)
{
key.second = attr.value().toString();
}
}
if (!key.first.isEmpty())
{
keys.push_back(key); // we allow blank key sequences for unassigned shortcuts
}
else
{
result = false; //but not blank paths!
}
}
}
stream.readNext();
}
file.close();
if (result)
{
HotKey_BuildDefaults();
for (QPair<QString, QString> key : keys)
{
for (int j = 0; j < hotkeys.count(); j++)
{
if (hotkeys[j].path.compare(key.first, Qt::CaseInsensitive) == 0)
{
hotkeys[j].SetPath(key.first.toStdString().c_str());
hotkeys[j].SetSequenceFromString(key.second.toStdString().c_str());
}
}
}
}
return result;
}
void HotKey_Export() override
{
auto settingDir = AZ::IO::FixedMaxPath(AZ::Utils::GetEnginePath()) / "Editor" / "Plugins" / "ParticleEditorPlugin" / "settings";
QString filepath = QFileDialog::getSaveFileName(nullptr, "Select shortcut configuration to load", settingDir.c_str(), "HotKey Config Files (*.hkxml)");
QFile file(filepath);
if (!file.open(QIODevice::WriteOnly))
{
return;
}
QXmlStreamWriter stream(&file);
stream.setAutoFormatting(true);
stream.writeStartDocument();
stream.writeStartElement("HotKeys");
for (HotKey key : hotkeys)
{
stream.writeStartElement("HotKey");
stream.writeAttribute("path", key.path);
stream.writeAttribute("sequence", key.sequence.toString());
stream.writeEndElement();
}
stream.writeEndElement();
stream.writeEndDocument();
file.close();
}
QKeySequence HotKey_GetShortcut(const char* path) override
{
for (HotKey combo : hotkeys)
{
if (combo.IsMatch(path))
{
return combo.sequence;
}
}
return QKeySequence();
}
bool HotKey_IsPressed(const QKeyEvent* event, const char* path) override
{
if (!m_hotkeysAreEnabled)
{
return false;
}
unsigned int keyInt = 0;
//Capture any modifiers
Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers();
if (modifiers & Qt::ShiftModifier)
{
keyInt += Qt::SHIFT;
}
if (modifiers & Qt::ControlModifier)
{
keyInt += Qt::CTRL;
}
if (modifiers & Qt::AltModifier)
{
keyInt += Qt::ALT;
}
if (modifiers & Qt::MetaModifier)
{
keyInt += Qt::META;
}
//Capture any key
keyInt += event->key();
QString t0 = QKeySequence(keyInt).toString();
QString t1 = HotKey_GetShortcut(path).toString();
//if strings match then shortcut is pressed
if (t1.compare(t0, Qt::CaseInsensitive) == 0)
{
return true;
}
return false;
}
bool HotKey_IsPressed(const QShortcutEvent* event, const char* path) override
{
if (!m_hotkeysAreEnabled)
{
return false;
}
QString t0 = event->key().toString();
QString t1 = HotKey_GetShortcut(path).toString();
//if strings match then shortcut is pressed
if (t1.compare(t0, Qt::CaseInsensitive) == 0)
{
return true;
}
return false;
}
bool HotKey_LoadExisting() override
{
QSettings settings("O3DE", "O3DE");
QString group = "Hotkeys/";
HotKey_BuildDefaults();
int size = settings.beginReadArray(group);
for (int i = 0; i < size; i++)
{
settings.setArrayIndex(i);
QPair<QString, QString> hotkey;
hotkey.first = settings.value("name").toString();
hotkey.second = settings.value("keySequence").toString();
if (!hotkey.first.isEmpty())
{
for (int j = 0; j < hotkeys.count(); j++)
{
if (hotkeys[j].path.compare(hotkey.first, Qt::CaseInsensitive) == 0)
{
hotkeys[j].SetPath(hotkey.first.toStdString().c_str());
hotkeys[j].SetSequenceFromString(hotkey.second.toStdString().c_str());
}
}
}
}
settings.endArray();
if (hotkeys.isEmpty())
{
return false;
}
return true;
}
void HotKey_SaveCurrent() override
{
QSettings settings("O3DE", "O3DE");
QString group = "Hotkeys/";
settings.remove("Hotkeys/");
settings.sync();
settings.beginWriteArray(group);
int saveIndex = 0;
for (HotKey key : hotkeys)
{
if (!key.path.isEmpty())
{
settings.setArrayIndex(saveIndex++);
settings.setValue("name", key.path);
settings.setValue("keySequence", key.sequence.toString());
}
}
settings.endArray();
settings.sync();
}
void HotKey_BuildDefaults() override
{
m_hotkeysAreEnabled = true;
QVector<QPair<QString, QString> > keys;
while (hotkeys.count() > 0)
{
hotkeys.takeAt(0);
}
//MENU SELECTION SHORTCUTS////////////////////////////////////////////////
keys.push_back(QPair<QString, QString>("Menus.File Menu", "Alt+F"));
keys.push_back(QPair<QString, QString>("Menus.Edit Menu", "Alt+E"));
keys.push_back(QPair<QString, QString>("Menus.View Menu", "Alt+V"));
//FILE MENU SHORTCUTS/////////////////////////////////////////////////////
keys.push_back(QPair<QString, QString>("File Menu.Create new emitter", "Ctrl+N"));
keys.push_back(QPair<QString, QString>("File Menu.Create new library", "Ctrl+Shift+N"));
keys.push_back(QPair<QString, QString>("File Menu.Create new folder", ""));
keys.push_back(QPair<QString, QString>("File Menu.Import", "Ctrl+I"));
keys.push_back(QPair<QString, QString>("File Menu.Import level library", "Ctrl+Shift+I"));
keys.push_back(QPair<QString, QString>("File Menu.Save", "Ctrl+S"));
keys.push_back(QPair<QString, QString>("File Menu.Close", "Ctrl+Q"));
//EDIT MENU SHORTCUTS/////////////////////////////////////////////////////
keys.push_back(QPair<QString, QString>("Edit Menu.Copy", "Ctrl+C"));
keys.push_back(QPair<QString, QString>("Edit Menu.Paste", "Ctrl+V"));
keys.push_back(QPair<QString, QString>("Edit Menu.Duplicate", "Ctrl+D"));
keys.push_back(QPair<QString, QString>("Edit Menu.Undo", "Ctrl+Z"));
keys.push_back(QPair<QString, QString>("Edit Menu.Redo", "Ctrl+Shift+Z"));
keys.push_back(QPair<QString, QString>("Edit Menu.Group", "Ctrl+G"));
keys.push_back(QPair<QString, QString>("Edit Menu.Ungroup", "Ctrl+Shift+G"));
keys.push_back(QPair<QString, QString>("Edit Menu.Rename", "Ctrl+R"));
keys.push_back(QPair<QString, QString>("Edit Menu.Reset", ""));
keys.push_back(QPair<QString, QString>("Edit Menu.Edit Hotkeys", ""));
keys.push_back(QPair<QString, QString>("Edit Menu.Assign to selected", "Ctrl+Space"));
keys.push_back(QPair<QString, QString>("Edit Menu.Insert Comment", "Ctrl+Alt+M"));
keys.push_back(QPair<QString, QString>("Edit Menu.Enable/Disable Emitter", "Ctrl+E"));
keys.push_back(QPair<QString, QString>("File Menu.Enable All", ""));
keys.push_back(QPair<QString, QString>("File Menu.Disable All", ""));
keys.push_back(QPair<QString, QString>("Edit Menu.Delete", "Del"));
//VIEW MENU SHORTCUTS/////////////////////////////////////////////////////
keys.push_back(QPair<QString, QString>("View Menu.Reset Layout", ""));
//PLAYBACK CONTROL////////////////////////////////////////////////////////
keys.push_back(QPair<QString, QString>("Previewer.Play/Pause Toggle", "Space"));
keys.push_back(QPair<QString, QString>("Previewer.Step forward through time", "c"));
keys.push_back(QPair<QString, QString>("Previewer.Loop Toggle", "z"));
keys.push_back(QPair<QString, QString>("Previewer.Reset Playback", "x"));
keys.push_back(QPair<QString, QString>("Previewer.Focus", "Ctrl+F"));
keys.push_back(QPair<QString, QString>("Previewer.Zoom In", "w"));
keys.push_back(QPair<QString, QString>("Previewer.Zoom Out", "s"));
keys.push_back(QPair<QString, QString>("Previewer.Pan Left", "a"));
keys.push_back(QPair<QString, QString>("Previewer.Pan Right", "d"));
for (QPair<QString, QString> key : keys)
{
unsigned int index = hotkeys.count();
hotkeys.push_back(HotKey());
hotkeys[index].SetPath(key.first.toStdString().c_str());
hotkeys[index].SetSequenceFromString(key.second.toStdString().c_str());
}
}
void HotKey_SetKeys(QVector<HotKey> keys) override
{
hotkeys = keys;
}
QVector<HotKey> HotKey_GetKeys() override
{
return hotkeys;
}
QString HotKey_GetPressedHotkey(const QKeyEvent* event) override
{
if (!m_hotkeysAreEnabled)
{
return "";
}
for (HotKey key : hotkeys)
{
if (HotKey_IsPressed(event, key.path.toUtf8()))
{
return key.path;
}
}
return "";
}
QString HotKey_GetPressedHotkey(const QShortcutEvent* event) override
{
if (!m_hotkeysAreEnabled)
{
return "";
}
for (HotKey key : hotkeys)
{
if (HotKey_IsPressed(event, key.path.toUtf8()))
{
return key.path;
}
}
return "";
}
//building the default hotkey list re-enables hotkeys
//do not use this when rebuilding the default list is a possibility.
void HotKey_SetEnabled(bool val) override
{
m_hotkeysAreEnabled = val;
}
bool HotKey_IsEnabled() const override
{
return m_hotkeysAreEnabled;
}
protected:
QMap<QString, ToolTip> m_tooltips;
void ToolTip_ParseNode(XmlNodeRef node)
{
if (QString(node->getTag()).compare("tooltip", Qt::CaseInsensitive) != 0)
{
unsigned int childCount = node->getChildCount();
for (unsigned int i = 0; i < childCount; i++)
{
ToolTip_ParseNode(node->getChild(i));
}
}
QString title = node->getAttr("title");
QString content = node->getAttr("content");
QString specialContent = node->getAttr("special_content");
QString disabledContent = node->getAttr("disabled_content");
QMap<QString, ToolTip>::iterator itr = m_tooltips.insert(node->getAttr("path"), ToolTip());
itr->isValid = true;
itr->title = title;
itr->content = content;
itr->specialContent = specialContent;
itr->disabledContent = disabledContent;
unsigned int childCount = node->getChildCount();
for (unsigned int i = 0; i < childCount; i++)
{
ToolTip_ParseNode(node->getChild(i));
}
}
ToolTip GetToolTip(QString path)
{
if (m_tooltips.contains(path))
{
return m_tooltips[path];
}
ToolTip temp;
temp.isValid = false;
return temp;
}
public:
void ToolTip_LoadConfigXML(QString filepath) override
{
XmlNodeRef node = GetIEditor()->GetSystem()->LoadXmlFromFile(filepath.toStdString().c_str());
ToolTip_ParseNode(node);
}
void ToolTip_BuildFromConfig(IQToolTip* tooltip, QString path, QString option, QString optionalData = "", bool isEnabled = true) override
{
AZ_Assert(tooltip, "tooltip cannot be null");
QString title = ToolTip_GetTitle(path, option);
QString content = ToolTip_GetContent(path, option);
QString specialContent = ToolTip_GetSpecialContentType(path, option);
QString disabledContent = ToolTip_GetDisabledContent(path, option);
// Even if these items are empty, we set them anyway to clear out any data that was left over from when the tooltip was used for a different object.
tooltip->SetTitle(title);
tooltip->SetContent(content);
//this only handles simple creation...if you need complex call this then add specials separate
if (!specialContent.contains("::"))
{
tooltip->AddSpecialContent(specialContent, optionalData);
}
if (!isEnabled) // If disabled, add disabled value
{
tooltip->AppendContent(disabledContent);
}
}
QString ToolTip_GetTitle(QString path, QString option) override
{
if (!option.isEmpty() && GetToolTip(path + "." + option).isValid)
{
return GetToolTip(path + "." + option).title;
}
if (!option.isEmpty() && GetToolTip("Options." + option).isValid)
{
return GetToolTip("Options." + option).title;
}
return GetToolTip(path).title;
}
QString ToolTip_GetContent(QString path, QString option) override
{
if (!option.isEmpty() && GetToolTip(path + "." + option).isValid)
{
return GetToolTip(path + "." + option).content;
}
if (!option.isEmpty() && GetToolTip("Options." + option).isValid)
{
return GetToolTip("Options." + option).content;
}
return GetToolTip(path).content;
}
QString ToolTip_GetSpecialContentType(QString path, QString option) override
{
if (!option.isEmpty() && GetToolTip(path + "." + option).isValid)
{
return GetToolTip(path + "." + option).specialContent;
}
if (!option.isEmpty() && GetToolTip("Options." + option).isValid)
{
return GetToolTip("Options." + option).specialContent;
}
return GetToolTip(path).specialContent;
}
QString ToolTip_GetDisabledContent(QString path, QString option) override
{
if (!option.isEmpty() && GetToolTip(path + "." + option).isValid)
{
return GetToolTip(path + "." + option).disabledContent;
}
if (!option.isEmpty() && GetToolTip("Options." + option).isValid)
{
return GetToolTip("Options." + option).disabledContent;
}
return GetToolTip(path).disabledContent;
}
};
IEditorPanelUtils* CreateEditorPanelUtils()
{
return new CEditorPanelUtils_Impl();
}

@ -1,16 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#ifndef CRYINCLUDE_CRYEDITOR_EDITORPANELUTILS_H
#define CRYINCLUDE_CRYEDITOR_EDITORPANELUTILS_H
#pragma once
struct IEditorPanelUtils;
IEditorPanelUtils* CreateEditorPanelUtils();
#endif

@ -28,7 +28,7 @@ void CEditorPreferencesPage_AWS::Reflect(AZ::SerializeContext& serialize)
if (editContext)
{
editContext->Class<UsageOptions>("Options", "")
->DataElement(AZ::Edit::UIHandlers::CheckBox, &UsageOptions::m_awsAttributionEnabled, "Allow O3DE to send information about your use of AWS Core Gem to AWS",
->DataElement(AZ::Edit::UIHandlers::CheckBox, &UsageOptions::m_awsAttributionEnabled, "Allow <a href=\"https://aws.amazon.com/privacy/\">O3DE</a> to send information about your use of AWS Core Gem to AWS",
"");
editContext->Class<CEditorPreferencesPage_AWS>("AWS Preferences", "AWS Preferences")

@ -454,9 +454,6 @@ void EditorViewportWidget::Update()
// Render
{
// TODO: Move out this logic to a controller and refactor to work with Atom
ProcessRenderLisneters(m_displayContext);
m_displayContext.Flush2D();
// Post Render Callback

@ -7,7 +7,6 @@
*/
#include "EditorDefs.h"
#include "ErrorRecorder.h"
#include "BaseLibraryItem.h"
#include "Include/IErrorReport.h"

@ -14,6 +14,8 @@
#define CRYINCLUDE_EDITOR_CORE_ERRORRECORDER_H
#pragma once
#include "Include/EditorCoreAPI.h"
//////////////////////////////////////////////////////////////////////////
//! Automatic class to record and display error.
class EDITOR_CORE_API CErrorsRecorder

@ -67,24 +67,6 @@ QString CErrorRecord::GetErrorText() const
{
str += QString("\t ");
}
if (pItem)
{
switch (pItem->GetType())
{
case EDB_TYPE_MATERIAL:
str += QString("\t Material=\"");
break;
case EDB_TYPE_PARTICLE:
str += QString("\t Particle=\"");
break;
case EDB_TYPE_MUSIC:
str += QString("\t Music=\"");
break;
default:
str += QString("\t Item=\"");
}
str += pItem->GetFullName() + "\"";
}
if (pObject)
{
str += QString("\t Object=\"") + pObject->GetName() + "\"";
@ -101,7 +83,6 @@ CErrorReport::CErrorReport()
m_bImmediateMode = true;
m_bShowErrors = true;
m_pObject = nullptr;
m_pItem = nullptr;
m_pParticle = nullptr;
}
@ -140,10 +121,6 @@ void CErrorReport::ReportError(CErrorRecord& err)
{
err.pObject = m_pObject;
}
else if (err.pItem == nullptr && m_pItem != nullptr)
{
err.pItem = m_pItem;
}
m_errors.push_back(err);
}
bNoRecurse = false;
@ -255,12 +232,6 @@ void CErrorReport::SetCurrentValidatorObject(CBaseObject* pObject)
m_pObject = pObject;
}
//////////////////////////////////////////////////////////////////////////
void CErrorReport::SetCurrentValidatorItem(CBaseLibraryItem* pItem)
{
m_pItem = pItem;
}
//////////////////////////////////////////////////////////////////////////
void CErrorReport::SetCurrentFile(const QString& file)
{

@ -17,8 +17,11 @@
// forward declarations.
class CParticleItem;
#include "BaseLibraryItem.h"
#include <CryCommon/IValidator.h>
#include <CryCommon/smartptr.h>
#include "Objects/BaseObject.h"
#include "Include/EditorCoreAPI.h"
#include "Include/IErrorReport.h"
#include "ErrorRecorder.h"
@ -56,16 +59,13 @@ public:
int count;
//! Object that caused this error.
_smart_ptr<CBaseObject> pObject;
//! Library Item that caused this error.
_smart_ptr<CBaseLibraryItem> pItem;
int flags;
CErrorRecord(CBaseObject* object, ESeverity _severity, const QString& _error, int _flags = 0, int _count = 0,
CBaseLibraryItem* item = 0, EValidatorModule _module = VALIDATOR_MODULE_EDITOR)
EValidatorModule _module = VALIDATOR_MODULE_EDITOR)
: severity(_severity)
, module(_module)
, pObject(object)
, pItem(item)
, flags(_flags)
, count(_count)
, error(_error)
@ -77,7 +77,6 @@ public:
severity = ESEVERITY_WARNING;
module = VALIDATOR_MODULE_EDITOR;
pObject = 0;
pItem = 0;
flags = 0;
count = 0;
}
@ -116,8 +115,6 @@ public:
//! Assign current Object to which new reported warnings are assigned.
void SetCurrentValidatorObject(CBaseObject* pObject);
//! Assign current Item to which new reported warnings are assigned.
void SetCurrentValidatorItem(CBaseLibraryItem* pItem);
//! Assign current filename.
void SetCurrentFile(const QString& file);
@ -127,7 +124,6 @@ private:
bool m_bImmediateMode;
bool m_bShowErrors;
_smart_ptr<CBaseObject> m_pObject;
_smart_ptr<CBaseLibraryItem> m_pItem;
CParticleItem* m_pParticle;
QString m_currentFilename;
};

@ -362,10 +362,6 @@ void CErrorReportDialog::CopyToClipboard()
{
str += QString::fromLatin1(" [Object: %1]").arg(pRecord->pObject->GetName());
}
if (pRecord->pItem)
{
str += QString::fromLatin1(" [Material: %1]").arg(pRecord->pItem->GetName());
}
str += QString::fromLatin1("\r\n");
}
}

@ -149,11 +149,7 @@ QVariant CErrorReportTableModel::data(const CErrorRecord& record, int column, in
case ColumnFile:
return record.file;
case ColumnObject:
if (record.pItem)
{
return record.pItem->GetFullName();
}
else if (record.pObject)
if (record.pObject)
{
return record.pObject->GetName();
}

@ -1,587 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include "EditorDefs.h"
#include "TriMesh.h"
// Editor
#include "Util/fastlib.h"
#include "Objects/SubObjSelection.h"
//////////////////////////////////////////////////////////////////////////
CTriMesh::CTriMesh()
{
pFaces = nullptr;
pVertices = nullptr;
pWSVertices = nullptr;
pUV = nullptr;
pColors = nullptr;
pEdges = nullptr;
pWeights = nullptr;
nFacesCount = 0;
nVertCount = 0;
nUVCount = 0;
nEdgeCount = 0;
selectionType = SO_ELEM_NONE;
memset(m_streamSize, 0, sizeof(m_streamSize));
memset(m_streamSel, 0, sizeof(m_streamSel));
streamSelMask = 0;
m_streamSel[VERTICES] = &vertSel;
m_streamSel[EDGES] = &edgeSel;
m_streamSel[FACES] = &faceSel;
}
//////////////////////////////////////////////////////////////////////////
CTriMesh::~CTriMesh()
{
free(pFaces);
free(pEdges);
free(pVertices);
free(pUV);
free(pColors);
free(pWSVertices);
free(pWeights);
}
// Set stream size.
void CTriMesh::ReallocStream(int stream, int nNewCount)
{
assert(stream >= 0 && stream < LAST_STREAM);
if (stream < 0 || stream >= LAST_STREAM)
{
return;
}
if (m_streamSize[stream] == nNewCount)
{
return; // Stream already have required size.
}
void* pStream = nullptr;
int nElementSize = 0;
GetStreamInfo(stream, pStream, nElementSize);
pStream = ReAllocElements(pStream, nNewCount, nElementSize);
m_streamSize[stream] = nNewCount;
switch (stream)
{
case VERTICES:
pVertices = (CTriVertex*)pStream;
nVertCount = nNewCount;
vertSel.resize(nNewCount);
break;
case FACES:
pFaces = (CTriFace*)pStream;
nFacesCount = nNewCount;
faceSel.resize(nNewCount);
break;
case EDGES:
pEdges = (CTriEdge*)pStream;
nEdgeCount = nNewCount;
edgeSel.resize(nNewCount);
break;
case TEXCOORDS:
pUV = (SMeshTexCoord*)pStream;
nUVCount = nNewCount;
break;
case COLORS:
pColors = (SMeshColor*)pStream;
break;
case WEIGHTS:
pWeights = (float*)pStream;
break;
case LINES:
pLines = (CTriLine*)pStream;
break;
case WS_POSITIONS:
pWSVertices = (Vec3*)pStream;
break;
default:
assert(0); // unknown stream.
}
m_streamSize[stream] = nNewCount;
}
// Set stream size.
void CTriMesh::GetStreamInfo(int stream, void*& pStream, int& nElementSize) const
{
assert(stream >= 0 && stream < LAST_STREAM);
switch (stream)
{
case VERTICES:
pStream = pVertices;
nElementSize = sizeof(CTriVertex);
break;
case FACES:
pStream = pFaces;
nElementSize = sizeof(CTriFace);
break;
case EDGES:
pStream = pEdges;
nElementSize = sizeof(CTriEdge);
break;
case TEXCOORDS:
pStream = pUV;
nElementSize = sizeof(SMeshTexCoord);
break;
case COLORS:
pStream = pColors;
nElementSize = sizeof(SMeshColor);
break;
case WEIGHTS:
pStream = pWeights;
nElementSize = sizeof(float);
break;
case LINES:
pStream = pLines;
nElementSize = sizeof(CTriLine);
break;
case WS_POSITIONS:
pStream = pWSVertices;
nElementSize = sizeof(Vec3);
break;
default:
assert(0); // unknown stream.
}
}
//////////////////////////////////////////////////////////////////////////
void* CTriMesh::ReAllocElements(void* old_ptr, int new_elem_num, int size_of_element)
{
return realloc(old_ptr, new_elem_num * size_of_element);
}
/////////////////////////////////////////////////////////////////////////////////////
inline int FindVertexInHash(const Vec3& vPosToFind, const CTriVertex* pVectors, std::vector<int>& hash, float fEpsilon)
{
for (uint32 i = 0; i < hash.size(); i++)
{
const Vec3& v0 = pVectors[hash[i]].pos;
const Vec3& v1 = vPosToFind;
if (fabsf(v0.y - v1.y) < fEpsilon && fabsf(v0.x - v1.x) < fEpsilon && fabsf(v0.z - v1.z) < fEpsilon)
{
return hash[i];
}
}
return -1;
}
/////////////////////////////////////////////////////////////////////////////////////
inline int FindTexCoordInHash(const SMeshTexCoord& coordToFind, const SMeshTexCoord* pCoords, std::vector<int>& hash, float fEpsilon)
{
for (uint32 i = 0; i < hash.size(); i++)
{
const SMeshTexCoord& t0 = pCoords[hash[i]];
const SMeshTexCoord& t1 = coordToFind;
if (t0.IsEquivalent(t1, fEpsilon))
{
return hash[i];
}
}
return -1;
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::SharePositions()
{
float fEpsilon = 0.0001f;
float fHashScale = 256.0f / MAX(bbox.GetSize().GetLength(), fEpsilon);
std::vector<int> arrHashTable[256];
CTriVertex* pNewVerts = new CTriVertex[GetVertexCount()];
SMeshColor* pNewColors = nullptr;
if (pColors)
{
pNewColors = new SMeshColor[GetVertexCount()];
}
int nLastIndex = 0;
for (int f = 0; f < GetFacesCount(); f++)
{
CTriFace& face = pFaces[f];
for (int i = 0; i < 3; i++)
{
const Vec3& v = pVertices[face.v[i]].pos;
uint8 nHash = static_cast<uint8>(RoundFloatToInt((v.x + v.y + v.z) * fHashScale));
int find = FindVertexInHash(v, pNewVerts, arrHashTable[nHash], fEpsilon);
if (find < 0)
{
pNewVerts[nLastIndex] = pVertices[face.v[i]];
if (pColors)
{
pNewColors[nLastIndex] = pColors[face.v[i]];
}
face.v[i] = nLastIndex;
// Reserve some space already.
arrHashTable[nHash].reserve(100);
arrHashTable[nHash].push_back(nLastIndex);
nLastIndex++;
}
else
{
face.v[i] = find;
}
}
}
SetVertexCount(nLastIndex);
memcpy(pVertices, pNewVerts, nLastIndex * sizeof(CTriVertex));
delete []pNewVerts;
if (pColors)
{
SetColorsCount(nLastIndex);
memcpy(pColors, pNewColors, nLastIndex * sizeof(SMeshColor));
delete []pNewColors;
}
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::ShareUV()
{
float fEpsilon = 0.0001f;
float fHashScale = 256.0f;
std::vector<int> arrHashTable[256];
SMeshTexCoord* pNewUV = new SMeshTexCoord[GetUVCount()];
int nLastIndex = 0;
for (int f = 0; f < GetFacesCount(); f++)
{
CTriFace& face = pFaces[f];
for (int i = 0; i < 3; i++)
{
const Vec2 uv = pUV[face.uv[i]].GetUV();
uint8 nHash = static_cast<uint8>(RoundFloatToInt((uv.x + uv.y) * fHashScale));
int find = FindTexCoordInHash(pUV[face.uv[i]], pNewUV, arrHashTable[nHash], fEpsilon);
if (find < 0)
{
pNewUV[nLastIndex] = pUV[face.uv[i]];
face.uv[i] = nLastIndex;
arrHashTable[nHash].reserve(100);
arrHashTable[nHash].push_back(nLastIndex);
nLastIndex++;
}
else
{
face.uv[i] = find;
}
}
}
SetUVCount(nLastIndex);
memcpy(pUV, pNewUV, nLastIndex * sizeof(SMeshTexCoord));
delete []pNewUV;
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::CalcFaceNormals()
{
for (int i = 0; i < nFacesCount; i++)
{
CTriFace& face = pFaces[i];
Vec3 p1 = pVertices[face.v[0]].pos;
Vec3 p2 = pVertices[face.v[1]].pos;
Vec3 p3 = pVertices[face.v[2]].pos;
face.normal = (p2 - p1).Cross(p3 - p1);
face.normal.Normalize();
}
}
#define TEX_EPS 0.001f
#define VER_EPS 0.001f
//////////////////////////////////////////////////////////////////////////
void CTriMesh::CopyStream(CTriMesh& fromMesh, int stream)
{
void* pTrgStream = nullptr;
void* pSrcStream = nullptr;
int nElemSize = 0;
fromMesh.GetStreamInfo(stream, pSrcStream, nElemSize);
if (pSrcStream)
{
ReallocStream(stream, fromMesh.GetStreamSize(stream));
GetStreamInfo(stream, pTrgStream, nElemSize);
memcpy(pTrgStream, pSrcStream, nElemSize * fromMesh.GetStreamSize(stream));
}
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::Copy(CTriMesh& fromMesh, int nCopyFlags)
{
streamSelMask = fromMesh.streamSelMask;
if (nCopyFlags & COPY_VERTICES)
{
CopyStream(fromMesh, VERTICES);
}
if (nCopyFlags & COPY_FACES)
{
CopyStream(fromMesh, FACES);
}
if (nCopyFlags & COPY_EDGES)
{
CopyStream(fromMesh, EDGES);
}
if (nCopyFlags & COPY_TEXCOORDS)
{
CopyStream(fromMesh, TEXCOORDS);
}
if (nCopyFlags & COPY_COLORS)
{
CopyStream(fromMesh, COLORS);
}
if (nCopyFlags & COPY_WEIGHTS)
{
CopyStream(fromMesh, WEIGHTS);
}
if (nCopyFlags & COPY_LINES)
{
CopyStream(fromMesh, LINES);
}
if (nCopyFlags & COPY_VERT_SEL)
{
vertSel = fromMesh.vertSel;
}
if (nCopyFlags & COPY_EDGE_SEL)
{
edgeSel = fromMesh.edgeSel;
}
if (nCopyFlags & COPY_FACE_SEL)
{
faceSel = fromMesh.faceSel;
}
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::UpdateEdges()
{
SetEdgeCount(GetFacesCount() * 3);
std::map<CTriEdge, int> edgemap;
int nEdges = 0;
for (int i = 0; i < GetFacesCount(); i++)
{
CTriFace& face = pFaces[i];
for (int j = 0; j < 3; j++)
{
int v0 = j;
int v1 = (j != 2) ? j + 1 : 0;
CTriEdge edge;
edge.flags = 0;
// First vertex index must always be smaller.
if (face.v[v0] < face.v[v1])
{
edge.v[0] = face.v[v0];
edge.v[1] = face.v[v1];
}
else
{
edge.v[0] = face.v[v1];
edge.v[1] = face.v[v0];
}
edge.face[0] = i;
edge.face[1] = -1;
int nedge = stl::find_in_map(edgemap, edge, -1);
if (nedge >= 0)
{
// Assign this face as a second member of the edge.
if (pEdges[nedge].face[1] < 0)
{
pEdges[nedge].face[1] = i;
}
face.edge[j] = nedge;
}
else
{
edgemap[edge] = nEdges;
pEdges[nEdges] = edge;
face.edge[j] = nEdges;
nEdges++;
}
}
}
SetEdgeCount(nEdges);
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::SoftSelection(const SSubObjSelOptions& options)
{
int i;
int nVerts = GetVertexCount();
CTriVertex* pVerts = pVertices;
for (i = 0; i < nVerts; i++)
{
if (pWeights[i] == 1.0f)
{
const Vec3& vp = pVerts[i].pos;
for (int j = 0; j < nVerts; j++)
{
if (pWeights[j] != 1.0f)
{
if (vp.IsEquivalent(pVerts[j].pos, options.fSoftSelFalloff))
{
float fDist = vp.GetDistance(pVerts[j].pos);
if (fDist < options.fSoftSelFalloff)
{
float fWeight = 1.0f - (fDist / options.fSoftSelFalloff);
if (fWeight > pWeights[j])
{
pWeights[j] = fWeight;
}
}
}
}
}
}
}
}
//////////////////////////////////////////////////////////////////////////
bool CTriMesh::UpdateSelection()
{
bool bAnySelected = false;
if (selectionType == SO_ELEM_VERTEX)
{
for (int i = 0; i < GetVertexCount(); i++)
{
if (vertSel[i])
{
bAnySelected = true;
pWeights[i] = 1.0f;
}
else
{
pWeights[i] = 0;
}
}
}
if (selectionType == SO_ELEM_EDGE)
{
// Clear weights.
for (int i = 0; i < GetVertexCount(); i++)
{
pWeights[i] = 0;
}
for (int i = 0; i < GetEdgeCount(); i++)
{
if (edgeSel[i])
{
bAnySelected = true;
CTriEdge& edge = pEdges[i];
for (int j = 0; j < 2; j++)
{
pWeights[edge.v[j]] = 1.0f;
}
}
}
}
else if (selectionType == SO_ELEM_FACE)
{
// Clear weights.
for (int i = 0; i < GetVertexCount(); i++)
{
pWeights[i] = 0;
}
for (int i = 0; i < GetFacesCount(); i++)
{
if (faceSel[i])
{
bAnySelected = true;
CTriFace& face = pFaces[i];
for (int j = 0; j < 3; j++)
{
pWeights[face.v[j]] = 1.0f;
}
}
}
}
return bAnySelected;
}
//////////////////////////////////////////////////////////////////////////
bool CTriMesh::ClearSelection()
{
bool bWasSelected = false;
// Remove all selections.
int i;
for (i = 0; i < GetVertexCount(); i++)
{
pWeights[i] = 0;
}
streamSelMask = 0;
for (int ii = 0; ii < LAST_STREAM; ii++)
{
if (m_streamSel[ii] && !m_streamSel[ii]->is_zero())
{
bWasSelected = true;
m_streamSel[ii]->clear();
}
}
return bWasSelected;
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::GetEdgesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outEdges)
{
// Brute force algorithm using binary search.
// for every edge check if edge vertex is inside inVertices array.
std::sort(inVertices.begin(), inVertices.end());
for (int i = 0; i < GetEdgeCount(); i++)
{
if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pEdges[i].v[0])) != inVertices.end())
{
outEdges.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pEdges[i].v[1])) != inVertices.end())
{
outEdges.push_back(i);
}
}
}
//////////////////////////////////////////////////////////////////////////
void CTriMesh::GetFacesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outFaces)
{
// Brute force algorithm using binary search.
// for every face check if face vertex is inside inVertices array.
std::sort(inVertices.begin(), inVertices.end());
for (int i = 0; i < GetFacesCount(); i++)
{
if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[0])) != inVertices.end())
{
outFaces.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[1])) != inVertices.end())
{
outFaces.push_back(i);
}
else if (stl::binary_find(inVertices.begin(), inVertices.end(), static_cast<int>(pFaces[i].v[2])) != inVertices.end())
{
outFaces.push_back(i);
}
}
}

@ -1,238 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H
#define CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H
#pragma once
#include <IIndexedMesh.h>
#include "Util/bitarray.h"
struct SSubObjSelOptions;
typedef std::vector<int> MeshElementsArray;
//////////////////////////////////////////////////////////////////////////
// Vertex used in the TriMesh.
//////////////////////////////////////////////////////////////////////////
struct CTriVertex
{
Vec3 pos;
//float weight; // Selection weight in 0-1 range.
};
//////////////////////////////////////////////////////////////////////////
// Triangle face used by the Triangle mesh.
//////////////////////////////////////////////////////////////////////////
struct CTriFace
{
uint32 v[3]; // Indices to vertices array.
uint32 uv[3]; // Indices to texture coordinates array.
Vec3 n[3]; // Vertex normals at face vertices.
Vec3 normal; // Face normal.
uint32 edge[3]; // Indices to the face edges.
unsigned char MatID; // Index of face sub material.
unsigned char flags; // see ETriMeshFlags
};
//////////////////////////////////////////////////////////////////////////
// Mesh edge.
//////////////////////////////////////////////////////////////////////////
struct CTriEdge
{
uint32 v[2]; // Indices to edge vertices.
int face[2]; // Indices to edge faces (-1 if no face).
uint32 flags; // see ETriMeshFlags
CTriEdge() {}
bool operator==(const CTriEdge& edge) const
{
if ((v[0] == edge.v[0] && v[1] == edge.v[1]) ||
(v[0] == edge.v[1] && v[1] == edge.v[0]))
{
return true;
}
return false;
}
bool operator!=(const CTriEdge& edge) const { return !(*this == edge); }
bool operator<(const CTriEdge& edge) const { return (*(uint64*)v < *(uint64*)edge.v); }
bool operator>(const CTriEdge& edge) const { return (*(uint64*)v > *(uint64*)edge.v); }
};
//////////////////////////////////////////////////////////////////////////
// Mesh line.
//////////////////////////////////////////////////////////////////////////
struct CTriLine
{
uint32 v[2]; // Indices to edge vertices.
CTriLine() {}
bool operator==(const CTriLine& edge) const
{
if ((v[0] == edge.v[0] && v[1] == edge.v[1]) ||
(v[0] == edge.v[1] && v[1] == edge.v[0]))
{
return true;
}
return false;
}
bool operator!=(const CTriLine& edge) const { return !(*this == edge); }
bool operator<(const CTriLine& edge) const { return (*(uint64*)v < *(uint64*)edge.v); }
bool operator>(const CTriLine& edge) const { return (*(uint64*)v > *(uint64*)edge.v); }
};
//////////////////////////////////////////////////////////////////////////
struct CTriMeshPoly
{
std::vector<uint32> v; // Indices to vertices array.
std::vector<uint32> uv; // Indices to texture coordinates array.
std::vector<Vec3> n; // Vertex normals at face vertices.
Vec3 normal; // Polygon normal.
uint32 edge[3]; // Indices to the face edges.
unsigned char MatID; // Index of face sub material.
unsigned char flags; // optional flags.
};
//////////////////////////////////////////////////////////////////////////
// CTriMesh is used in the Editor as a general purpose editable triangle mesh.
//////////////////////////////////////////////////////////////////////////
class CTriMesh
{
public:
enum EStream
{
VERTICES,
FACES,
EDGES,
TEXCOORDS,
COLORS,
WEIGHTS,
LINES,
WS_POSITIONS,
LAST_STREAM,
};
enum ECopyFlags
{
COPY_VERTICES = BIT(1),
COPY_FACES = BIT(2),
COPY_EDGES = BIT(3),
COPY_TEXCOORDS = BIT(4),
COPY_COLORS = BIT(5),
COPY_VERT_SEL = BIT(6),
COPY_EDGE_SEL = BIT(7),
COPY_FACE_SEL = BIT(8),
COPY_WEIGHTS = BIT(9),
COPY_LINES = BIT(10),
COPY_ALL = 0xFFFF,
};
// geometry data
CTriFace* pFaces;
CTriEdge* pEdges;
CTriVertex* pVertices;
SMeshTexCoord* pUV;
SMeshColor* pColors; // If allocated same size as pVerts array.
Vec3* pWSVertices; // World space vertices.
float* pWeights;
CTriLine* pLines;
int nFacesCount;
int nVertCount;
int nUVCount;
int nEdgeCount;
int nLinesCount;
AABB bbox;
//////////////////////////////////////////////////////////////////////////
// Selections.
//////////////////////////////////////////////////////////////////////////
CBitArray vertSel;
CBitArray edgeSel;
CBitArray faceSel;
// Every bit of the selection mask correspond to a stream, if bit is set this stream have some elements selected
int streamSelMask;
// Selection element type.
// see ESubObjElementType
int selectionType;
//////////////////////////////////////////////////////////////////////////
// Vertices of the front facing triangles.
CBitArray frontFacingVerts;
//////////////////////////////////////////////////////////////////////////
// Functions.
//////////////////////////////////////////////////////////////////////////
CTriMesh();
~CTriMesh();
int GetFacesCount() const { return nFacesCount; }
int GetVertexCount() const { return nVertCount; }
int GetUVCount() const { return nUVCount; }
int GetEdgeCount() const { return nEdgeCount; }
int GetLinesCount() const { return nLinesCount; }
//////////////////////////////////////////////////////////////////////////
void SetFacesCount(int nNewCount) { ReallocStream(FACES, nNewCount); }
void SetVertexCount(int nNewCount)
{
ReallocStream(VERTICES, nNewCount);
if (pColors)
{
ReallocStream(COLORS, nNewCount);
}
ReallocStream(WEIGHTS, nNewCount);
}
void SetColorsCount(int nNewCount) { ReallocStream(COLORS, nNewCount); }
void SetUVCount(int nNewCount) { ReallocStream(TEXCOORDS, nNewCount); }
void SetEdgeCount(int nNewCount) { ReallocStream(EDGES, nNewCount); }
void SetLinesCount(int nNewCount) { ReallocStream(LINES, nNewCount); }
void ReallocStream(int stream, int nNewCount);
void GetStreamInfo(int stream, void*& pStream, int& nElementSize) const;
int GetStreamSize(int stream) const { return m_streamSize[stream]; };
// Calculate per face normal.
void CalcFaceNormals();
//////////////////////////////////////////////////////////////////////////
// Welding functions.
//////////////////////////////////////////////////////////////////////////
void SharePositions();
void ShareUV();
//////////////////////////////////////////////////////////////////////////
// Recreate edges of the mesh.
void UpdateEdges();
void Copy(CTriMesh& fromMesh, int nCopyFlags = COPY_ALL);
//////////////////////////////////////////////////////////////////////////
// Sub-object selection specific methods.
//////////////////////////////////////////////////////////////////////////
// Return true if something is selected.
bool UpdateSelection();
// Clear all selections, return true if something was selected.
bool ClearSelection();
void SoftSelection(const SSubObjSelOptions& options);
CBitArray* GetStreamSelection(int nStream) { return m_streamSel[nStream]; };
// Returns true if specified stream have any selected elements.
bool StreamHaveSelection(int nStream) { return streamSelMask & (1 << nStream); }
void GetEdgesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outEdges);
void GetFacesByVertex(MeshElementsArray& inVertices, MeshElementsArray& outFaces);
private:
void* ReAllocElements(void* old_ptr, int new_elem_num, int size_of_element);
void CopyStream(CTriMesh& fromMesh, int stream);
// For internal use.
int m_streamSize[LAST_STREAM];
CBitArray* m_streamSel[LAST_STREAM];
};
#endif // CRYINCLUDE_EDITOR_GEOMETRY_TRIMESH_H

@ -44,7 +44,6 @@ class CMusicManager;
struct IEditorParticleManager;
class CEAXPresetManager;
class CErrorReport;
class CBaseLibraryItem;
class ICommandManager;
class CEditorCommandManager;
class CHyperGraphManager;
@ -52,10 +51,7 @@ class CConsoleSynchronization;
class CUIEnumsDatabase;
struct ISourceControl;
struct IEditorClassFactory;
struct IDataBaseItem;
struct ITransformManipulator;
struct IDataBaseManager;
class IFacialEditor;
class CDialog;
#if defined(AZ_PLATFORM_WINDOWS)
class C3DConnexionDriver;
@ -69,7 +65,6 @@ class CSelectionTreeManager;
struct SEditorSettings;
class CGameExporter;
class IAWSResourceManager;
struct IEditorPanelUtils;
namespace WinWidget
{
@ -83,8 +78,6 @@ struct IEventLoopHook;
struct IErrorReport; // Vladimir@conffx
struct IFileUtil; // Vladimir@conffx
struct IEditorLog; // Vladimir@conffx
struct IEditorMaterialManager; // Vladimir@conffx
struct IBaseLibraryManager; // Vladimir@conffx
struct IImageUtil; // Vladimir@conffx
struct IEditorParticleUtils; // Leroy@conffx
struct ILogFile; // Vladimir@conffx
@ -520,14 +513,8 @@ struct IEditor
//! Get access to object manager.
virtual struct IObjectManager* GetObjectManager() = 0;
virtual CSettingsManager* GetSettingsManager() = 0;
//! Get DB manager that own items of specified type.
virtual IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) = 0;
virtual IBaseLibraryManager* GetMaterialManagerLibrary() = 0; // Vladimir@conffx
virtual IEditorMaterialManager* GetIEditorMaterialManager() = 0; // Vladimir@Conffx
//! Returns IconManager.
virtual IIconManager* GetIconManager() = 0;
//! Get Panel Editor Utilities
virtual IEditorPanelUtils* GetEditorPanelUtils() = 0;
//! Get Music Manager.
virtual CMusicManager* GetMusicManager() = 0;
virtual float GetTerrainElevation(float x, float y) = 0;

@ -81,9 +81,6 @@ AZ_POP_DISABLE_WARNING
// AWSNativeSDK
#include <AWSNativeSDKInit/AWSNativeSDKInit.h>
#include "IEditorPanelUtils.h"
#include "EditorPanelUtils.h"
#include "Core/QtEditorApplication.h" // for Editor::EditorQtApplication
static CCryEditDoc * theDocument;
@ -143,7 +140,6 @@ CEditorImpl::CEditorImpl()
, m_QtApplication(static_cast<Editor::EditorQtApplication*>(qApp))
, m_pImageUtil(nullptr)
, m_pLogFile(nullptr)
, m_panelEditorUtils(nullptr)
{
// note that this is a call into EditorCore.dll, which stores the g_pEditorPointer for all shared modules that share EditorCore.dll
// this means that they don't need to do SetIEditor(...) themselves and its available immediately
@ -167,8 +163,6 @@ CEditorImpl::CEditorImpl()
m_pDisplaySettings->LoadRegistry();
m_pPluginManager = new CPluginManager;
m_panelEditorUtils = CreateEditorPanelUtils();
m_pObjectManager = new CObjectManager;
m_pViewManager = new CViewManager;
m_pIconManager = new CIconManager;
@ -301,8 +295,6 @@ CEditorImpl::~CEditorImpl()
SAFE_DELETE(m_pViewManager)
SAFE_DELETE(m_pObjectManager) // relies on prefab manager
SAFE_DELETE(m_panelEditorUtils);
// some plugins may be exporter - this must be above plugin manager delete.
SAFE_DELETE(m_pExportManager);
@ -900,11 +892,6 @@ void CEditorImpl::CloseView(const GUID& classId)
}
}
IDataBaseManager* CEditorImpl::GetDBItemManager([[maybe_unused]] EDataBaseItemType itemType)
{
return nullptr;
}
bool CEditorImpl::SelectColor(QColor& color, QWidget* parent)
{
const AZ::Color c = AzQtComponents::fromQColor(color);
@ -1632,18 +1619,6 @@ SEditorSettings* CEditorImpl::GetEditorSettings()
return &gSettings;
}
// Vladimir@Conffx
IBaseLibraryManager* CEditorImpl::GetMaterialManagerLibrary()
{
return nullptr;
}
// Vladimir@Conffx
IEditorMaterialManager* CEditorImpl::GetIEditorMaterialManager()
{
return nullptr;
}
IImageUtil* CEditorImpl::GetImageUtil()
{
return m_pImageUtil;
@ -1658,8 +1633,3 @@ void CEditorImpl::DestroyQMimeData(QMimeData* data) const
{
delete data;
}
IEditorPanelUtils* CEditorImpl::GetEditorPanelUtils()
{
return m_panelEditorUtils;
}

@ -157,7 +157,6 @@ public:
void LockSelection(bool bLock) override;
bool IsSelectionLocked() override;
IDataBaseManager* GetDBItemManager(EDataBaseItemType itemType) override;
CMusicManager* GetMusicManager() override { return m_pMusicManager; };
IEditorFileMonitor* GetFileMonitor() override;
@ -294,11 +293,8 @@ public:
void RegisterObjectContextMenuExtension(TContextMenuExtensionFunc func) override;
SSystemGlobalEnvironment* GetEnv() override;
IBaseLibraryManager* GetMaterialManagerLibrary() override; // Vladimir@Conffx
IEditorMaterialManager* GetIEditorMaterialManager() override; // Vladimir@Conffx
IImageUtil* GetImageUtil() override; // Vladimir@conffx
SEditorSettings* GetEditorSettings() override;
IEditorPanelUtils* GetEditorPanelUtils() override;
ILogFile* GetLogFile() override { return m_pLogFile; }
void UnloadPlugins() override;
@ -356,7 +352,6 @@ protected:
CErrorsDlg* m_pErrorsDlg;
//! Source control interface.
ISourceControl* m_pSourceControl;
IEditorPanelUtils* m_panelEditorUtils;
CSelectionTreeManager* m_pSelectionTreeManager;

@ -1,131 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*/
#ifndef CRYINCLUDE_CRYEDITOR_IPANELEDITORUTILS_H
#define CRYINCLUDE_CRYEDITOR_IPANELEDITORUTILS_H
#pragma once
#include "Cry_Vector3.h"
#include "DisplaySettings.h"
#include "Include/IDisplayViewport.h"
#include "Include/IIconManager.h"
#include <qstringlist.h>
#include <qkeysequence.h>
#include <qevent.h>
#include <QShortcutEvent>
class CBaseObject;
class CViewport;
class IQToolTip;
struct HotKey
{
HotKey()
: path("")
, sequence(QKeySequence())
{
}
void CopyFrom(const HotKey& other)
{
path = other.path;
sequence = other.sequence;
}
void SetPath(const char* _path)
{
path = QString(_path);
}
void SetSequenceFromString(const char* _sequence)
{
sequence = QKeySequence::fromString(_sequence);
}
void SetSequence(const QKeySequence& other)
{
sequence = other;
}
bool IsMatch(QString _path)
{
return path.compare(_path, Qt::CaseInsensitive) == 0;
}
bool IsMatch(QKeySequence _sequence)
{
return sequence.matches(_sequence);
}
bool operator < (const HotKey& other) const
{
//split the paths into lists compare per level
QStringList m_categories = path.split('.');
QStringList o_categories = other.path.split('.');
int m_catSize = m_categories.size();
int o_catSize = o_categories.size();
int size = (m_catSize < o_catSize) ? m_catSize : o_catSize;
//sort categories to keep them together
for (int i = 0; i < size; i++)
{
if (m_categories[i] < o_categories[i])
{
return true;
}
if (m_categories[i] > o_categories[i])
{
return false;
}
}
//if comparing a category and a item in that category the category is < item
return m_catSize > o_catSize;
}
QKeySequence sequence;
QString path;
};
struct IEditorPanelUtils
{
virtual ~IEditorPanelUtils() {}
virtual void SetViewportDragOperation(void(*)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) = 0;
//PREVIEW WINDOW UTILS////////////////////////////////////////////////////
virtual int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) = 0;
virtual void PreviewWindow_SetDisplaySettingsDebugFlags(CDisplaySettings* settings, int flags) = 0;
//HOTKEY UTILS////////////////////////////////////////////////////////////
virtual bool HotKey_Import() = 0;
virtual void HotKey_Export() = 0;
virtual QKeySequence HotKey_GetShortcut(const char* path) = 0;
virtual bool HotKey_IsPressed(const QKeyEvent* event, const char* path) = 0;
virtual bool HotKey_IsPressed(const QShortcutEvent* event, const char* path) = 0;
virtual bool HotKey_LoadExisting() = 0;
virtual void HotKey_SaveCurrent() = 0;
virtual void HotKey_BuildDefaults() = 0;
virtual void HotKey_SetKeys(QVector<HotKey> keys) = 0;
virtual QVector<HotKey> HotKey_GetKeys() = 0;
virtual QString HotKey_GetPressedHotkey(const QKeyEvent* event) = 0;
virtual QString HotKey_GetPressedHotkey(const QShortcutEvent* event) = 0;
virtual void HotKey_SetEnabled(bool val) = 0;
virtual bool HotKey_IsEnabled() const = 0;
//TOOLTIP UTILS///////////////////////////////////////////////////////////
//! Loads a table of tooltip configuration data from an xml file.
virtual void ToolTip_LoadConfigXML(QString filepath) = 0;
//! Initializes a QToolTipWidget from loaded configuration data (see ToolTip_LoadConfigXML())
//! \param tooltip Will be initialized using loaded configuration data
//! \param path Variable serialization path. Will be used as the key for looking up data in the configuration table. (ex: "Rotation.Rotation_Rate_X")
//! \param option Name of a sub-option of the variable specified by "path". (ex: "Emitter_Strength" will look up the tooltip data for "Rotation.Rotation_Rate_X.Emitter_Strength")
//! \param optionalData The argument to be used with "special_content" feature. See ToolTip_GetSpecialContentType() and QToolTipWidget::AddSpecialContent().
//! \param isEnabled If false, the tooltip will indicate the reason why the widget is disabled.
virtual void ToolTip_BuildFromConfig(IQToolTip* tooltip, QString path, QString option, QString optionalData = "", bool isEnabled = true) = 0;
virtual QString ToolTip_GetTitle(QString path, QString option = "") = 0;
virtual QString ToolTip_GetContent(QString path, QString option = "") = 0;
virtual QString ToolTip_GetSpecialContentType(QString path, QString option = "") = 0;
virtual QString ToolTip_GetDisabledContent(QString path, QString option = "") = 0;
};
#endif

@ -17,7 +17,6 @@
class CGizmo;
class CBaseObject;
struct IDisplayViewport;
class CDeepSelection;
struct AABB;
#include <QRect>
@ -105,8 +104,6 @@ struct HitContext
CBaseObject* object;
//! gizmo object that have been hit.
CGizmo* gizmo;
//! for deep selection mode
CDeepSelection* pDeepSelection;
//! For linking tool
const char* name;
//! true if this hit was from the object icon
@ -131,7 +128,6 @@ struct HitContext
bIgnoreAxis = false;
bOnlyGizmo = false;
bUseSelectionHelpers = false;
pDeepSelection = 0;
name = nullptr;
iconHit = false;
}

@ -1,20 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H
#define CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H
#pragma once
struct IAnimationCompressionManager
{
virtual bool IsEnabled() const = 0;
virtual void UpdateLocalAnimations() = 0;
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IANIMATIONCOMPRESSIONMANAGER_H

@ -1,433 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Description : Standard interface for asset display in the asset browser,
// this header should be used to create plugins.
// The method Release of this interface should NOT be called.
// Instead, the FreeData from the database (from IAssetItemDatabase) should
// be used as it will safely release all the items from the database.
// It is still possible to call the release method, but this is not the
// recomended method, specially for usage outside of the plugins because there
// is no guarantee that a the asset will be properly removed from the database
// manager.
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H
#define CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H
#pragma once
struct IAssetItemDatabase;
namespace AssetViewer
{
// Used in GetAssetFieldValue for each asset type to check if field name is the right one
inline bool IsFieldName(const char* pIncomingFieldName, const char* pFieldName)
{
return !strncmp(pIncomingFieldName, pFieldName, strlen(pIncomingFieldName));
}
}
// Description:
// This interface allows the programmer to extend asset display types visible in the asset browser.
struct IAssetItem
: public IUnknown
{
DEFINE_UUID(0x04F20346, 0x2EC3, 0x43f2, 0xBD, 0xA1, 0x2C, 0x0B, 0x97, 0x76, 0xF3, 0x84);
// The supported asset flags
enum EAssetFlags
{
// asset is visible in the database for filtering and sorting (not asset view control related)
eFlag_Visible = BIT(0),
// the asset is loaded
eFlag_Loaded = BIT(1),
// the asset is loaded
eFlag_Cached = BIT(2),
// the asset is selected in a selection set
eFlag_Selected = BIT(3),
// this asset is invalid, no thumb is shown/available
eFlag_Invalid = BIT(4),
// this asset has some errors/warnings, in the asset browser it will show some blinking/red elements
// and the user can check out the errors. Error text will be fetched using GetAssetFieldValue( "errors", &someStringVar )
eFlag_HasErrors = BIT(5),
// this flag is set when the asset is rendering its contents using GDI, and not the engine's rendering capabilities
// (this flags is used as hint for the preview tool, which will use a double-buffer canvas if this flag is set,
// and send a memory HDC to the OnBeginPreview method, for drawing of the asset)
eFlag_UseGdiRendering = BIT(6),
// set if this asset is draggable into the render viewports, and can be created there
eFlag_CanBeDraggedInViewports = BIT(7),
// set if this asset can be moved after creation, otherwise the asset instance will just be created where user clicked
eFlag_CanBeMovedAfterDroppedIntoViewport = BIT(8),
// the asset thumbnail image is loaded
eFlag_ThumbnailLoaded = BIT(9),
// the asset thumbnail image is loaded
eFlag_UsedInLevel = BIT(10)
};
// Asset field name and field values map
typedef std::map < QString/*fieldName*/, QString/*value*/ > TAssetFieldValuesMap;
// Dependency category names and corresponding files map, example: "Textures"=>{ "foam.dds","water.dds","normal.dds" }
typedef std::map < QString/*dependencyCategory*/, std::set<QString>/*dependency filenames*/ > TAssetDependenciesMap;
virtual ~IAssetItem() {
}
// Description:
// Get the hash number/key used for database thumbnail and info records management
virtual uint32 GetHash() const = 0;
// Description:
// Set the hash number/key used for database thumbnail and info records management
virtual void SetHash(uint32 hash) = 0;
// Description:
// Get the owner database for this asset
// Return Value:
// The owner database for this asset
// See Also:
// SetOwnerDatabase()
virtual IAssetItemDatabase* GetOwnerDatabase() const = 0;
// Description:
// Set the owner database for this asset
// Arguments:
// piOwnerDisplayDatabase - the owner database
// See Also:
// GetOwnerDatabase()
virtual void SetOwnerDatabase(IAssetItemDatabase* pOwnerDisplayDatabase) = 0;
// Description:
// Get the asset's dependency files / objects
// Return Value:
// The vector with filenames which this asset is dependent upon, ex.: ["Textures"].(vector of textures)
virtual const TAssetDependenciesMap& GetDependencies() const = 0;
// Description:
// Set the file size of this asset in bytes
// Arguments:
// aSize - size of the file in bytes
// See Also:
// GetFileSize()
virtual void SetFileSize(quint64 aSize) = 0;
// Description:
// Get the file size of this asset in bytes
// Return Value:
// The file size of this asset in bytes
// See Also:
// SetFileSize()
virtual quint64 GetFileSize() const = 0;
// Description:
// Set asset filename (extension included and no path)
// Arguments:
// pName - the asset filename (extension included and no path)
// See Also:
// GetFilename()
virtual void SetFilename(const char* pName) = 0;
// Description:
// Get asset filename (extension included and no path)
// Return Value:
// The asset filename (extension included and no path)
// See Also:
// SetFilename()
virtual QString GetFilename() const = 0;
// Description:
// Set the asset's relative path
// Arguments:
// pName - file's relative path
// See Also:
// GetRelativePath()
virtual void SetRelativePath(const char* pName) = 0;
// Description:
// Get the asset's relative path
// Return Value:
// The asset's relative path
// See Also:
// SetRelativePath()
virtual QString GetRelativePath() const = 0;
// Description:
// Set the file extension ( dot(s) must be included )
// Arguments:
// pExt - the file's extension
// See Also:
// GetFileExtension()
virtual void SetFileExtension(const char* pExt) = 0;
// Description:
// Get the file extension ( dot(s) included )
// Return Value:
// The file extension ( dot(s) included )
// See Also:
// SetFileExtension()
virtual QString GetFileExtension() const = 0;
// Description:
// Get the asset flags, with values from IAssetItem::EAssetFlags
// Return Value:
// The asset flags, with values from IAssetItem::EAssetFlags
// See Also:
// SetFlags(), SetFlag(), IsFlagSet()
virtual UINT GetFlags() const = 0;
// Description:
// Set the asset flags
// Arguments:
// aFlags - flags, OR-ed values from IAssetItem::EAssetFlags
// See Also:
// GetFlags(), SetFlag(), IsFlagSet()
virtual void SetFlags(UINT aFlags) = 0;
// Description:
// Set/clear a single flag bit for the asset
// Arguments:
// aFlag - the flag to set/clear, with values from IAssetItem::EAssetFlags
// See Also:
// GetFlags(), SetFlags(), IsFlagSet()
virtual void SetFlag(EAssetFlags aFlag, bool bSet = true) = 0;
// Description:
// Check if a specified flag is set
// Arguments:
// aFlag - the flag to check, with values from IAssetItem::EAssetFlags
// Return Value:
// True if the flag is set
// See Also:
// GetFlags(), SetFlags(), SetFlag()
virtual bool IsFlagSet(EAssetFlags aFlag) const = 0;
// Description:
// Set this asset's index; used in sorting, selections, and to know where an asset is in the current list
// Arguments:
// aIndex - the asset's index
// See Also:
// GetIndex()
virtual void SetIndex(UINT aIndex) = 0;
// Description:
// Get the asset's index in the current list
// Return Value:
// The asset's index in the current list
// See Also:
// SetIndex()
virtual UINT GetIndex() const = 0;
// Description:
// Get the asset's field raw data value into a user location, you must check the field's type ( from asset item's owner database )
// before using this function and send the correct pointer to destination according to the type ( int8, float32, string, etc. )
// Arguments:
// pFieldName - the asset field name to query the value for
// pDest - the destination variable address, must be the same type as the field type
// Return Value:
// True if the asset field name is found and the value is returned correctly
// See Also:
// SetAssetFieldValue()
virtual QVariant GetAssetFieldValue(const char* pFieldName) const = 0;
// Description:
// Set the asset's field raw data value from a user location, you must check the field's type ( from asset item's owner database )
// before using this function and send the correct pointer to source according to the type ( int8, float32, string, etc. )
// Arguments:
// pFieldName - the asset field name to set the value for
// pSrc - the source variable address, must be the same type as the field type
// Return Value:
// True if the asset field name is found and the value is set correctly
// See Also:
// GetAssetFieldValue()
virtual bool SetAssetFieldValue(const char* pFieldName, void* pSrc) = 0;
// Description:
// Get the drawing rectangle for the asset's thumb ( absolute viewer canvas location )
// Arguments:
// rstDrawingRectangle - destination location to set with the asset's thumbnail rectangle location
// See Also:
// SetDrawingRectangle()
virtual void GetDrawingRectangle(QRect& rstDrawingRectangle) const = 0;
// Description:
// Set the drawing rectangle for the asset's thumb ( absolute viewer canvas location )
// Arguments:
// crstDrawingRectangle - source to set the asset's thumbnail rectangle
// See Also:
// GetDrawingRectangle()
virtual void SetDrawingRectangle(const QRect& crstDrawingRectangle) = 0;
// Description:
// Checks if the given 2D point is inside the asset's thumb rectangle
// Arguments:
// nX - mouse pointer position on X axis, relative to the asset viewer control
// nY - mouse pointer position on Y axis, relative to the asset viewer control
// Return Value:
// True if the given 2D point is inside the asset's thumb rectangle
// See Also:
// HitTest(CRect)
virtual bool HitTest(int nX, int nY) const = 0;
// Description:
// Checks if the given rectangle intersects the asset thumb's rectangle
// Arguments:
// nX - mouse pointer position on X axis, relative to the asset viewer control
// nY - mouse pointer position on Y axis, relative to the asset viewer control
// Return Value:
// True if the given rectangle intersects the asset thumb's rectangle
// See Also:
// HitTest(int nX,int nY)
virtual bool HitTest(const QRect& roTestRect) const = 0;
// Description:
// When user drags this asset item into a viewport, this method is called when the dragging operation ends
// and the mouse button is released, for the asset to return an instance of the asset object to be placed in the level
// Arguments:
// aX - instance's X position component in world coordinates
// aY - instance's Y position component in world coordinates
// aZ - instance's Z position component in world coordinates
// Return Value:
// The newly created asset instance (Example: BrushObject*)
// See Also:
// MoveInstanceInViewport()
virtual void* CreateInstanceInViewport(float aX, float aY, float aZ) = 0;
// Description:
// When the mouse button is released after level object creation, the user now can move the mouse
// and move the asset instance in the 3D world
// Arguments:
// pDraggedObject - the actual entity or brush object (CBaseObject* usually) to be moved around with the mouse
// returned by the CreateInstanceInViewport()
// aNewX - the new X world coordinates of the asset instance
// aNewY - the new Y world coordinates of the asset instance
// aNewZ - the new Z world coordinates of the asset instance
// Return Value:
// True if asset instance was moved properly
// See Also:
// CreateInstanceInViewport()
virtual bool MoveInstanceInViewport(const void* pDraggedObject, float aNewX, float aNewY, float aNewZ) = 0;
// Description:
// This will be called when the user presses ESCAPE key when dragging the asset in the viewport, you must delete the given object
// because the creation was aborted
// Arguments:
// pDraggedObject - the asset instance to be deleted ( you must cast to the needed type, and delete it properly )
// See Also:
// CreateInstanceInViewport()
virtual void AbortCreateInstanceInViewport(const void* pDraggedObject) = 0;
// Description:
// This method is used to cache/load asset's data, so it can be previewed/rendered
// Return Value:
// True if the asset was successfully cached
// See Also:
// UnCache()
virtual bool Cache() = 0;
// Description:
// This method is used to force cache/load asset's data, so it can be previewed/rendered
// Return Value:
// True if the asset was successfully forced cached
// See Also:
// UnCache(), Cache()
virtual bool ForceCache() = 0;
// Description:
// This method is used to load the thumbnail image of the asset
// Return Value:
// True if thumb loaded ok
// See Also:
// UnloadThumbnail()
virtual bool LoadThumbnail() = 0;
// Description:
// This method is used to unload the thumbnail image of the asset
// See Also:
// LoadThumbnail()
virtual void UnloadThumbnail() = 0;
// Description:
// This is called when the asset starts to be previewed in full detail, so here you can load the whole asset, in fine detail
// ( textures are fully loaded, models etc. ). It is called once, when the Preview dialog is shown
// Arguments:
// hPreviewWnd - the window handle of the quick preview dialog
// hMemDC - the memory DC used to render assets that can render themselves in the DC, otherwise they will render in the dialog's HWND
// See Also:
// OnEndPreview(), GetCustomPreviewPanelHeader()
virtual void OnBeginPreview(QWidget* hPreviewWnd) = 0;
// Description:
// Called when the Preview dialog is closed, you may release the detail asset data here
// See Also:
// OnBeginPreview(), GetCustomPreviewPanelHeader()
virtual void OnEndPreview() = 0;
// Description:
// If the asset has a special preview panel with utility controls, to be placed at the top of the Preview window, it can return an child dialog window
// otherwise it can return nullptr, if no panel is available
// Arguments:
// pParentWnd - a valid CDialog*, or nullptr
// Return Value:
// A valid child dialog window handle, if this asset wants to have a custom panel in the top side of the Asset Preview window,
// otherwise it can return nullptr, if no panel is available
// See Also:
// OnBeginPreview(), OnEndPreview()
virtual QWidget* GetCustomPreviewPanelHeader(QWidget* pParentWnd) = 0;
virtual QWidget* GetCustomPreviewPanelFooter(QWidget* pParentWnd) = 0;
// Description:
// Used when dragging/rotate/zoom a model, or other asset that can support preview
// Arguments:
// hRenderWindow - the rendering window handle
// rstViewport - the viewport rectangle
// aMouseX - the render window relative mouse pointer X coordinate
// aMouseY - the render window relative mouse pointer Y coordinate
// aMouseDeltaX - the X coordinate delta between two mouse movements
// aMouseDeltaY - the Y coordinate delta between two mouse movements
// aMouseWheelDelta - the mouse wheel scroll delta/step
// aKeyFlags - the key flags, see WM_LBUTTONUP
// See Also:
// OnPreviewRenderKeyEvent()
virtual void PreviewRender(
QWidget* hRenderWindow,
const QRect& rstViewport,
int aMouseX = 0, int aMouseY = 0,
int aMouseDeltaX = 0, int aMouseDeltaY = 0,
int aMouseWheelDelta = 0, UINT aKeyFlags = 0) = 0;
// Description:
// This is called when the user manipulates the assets in interactive render and a key is pressed ( with down or up state )
// Arguments:
// bKeyDown - true if this is a WM_KEYDOWN event, else it is a WM_KEYUP event
// aChar - the char/key code pressed/released
// aKeyFlags - the key flags, compatible with WM_KEYDOWN/UP events
// See Also:
// InteractiveRender()
virtual void OnPreviewRenderKeyEvent(bool bKeyDown, UINT aChar, UINT aKeyFlags) = 0;
// Description:
// Called when user clicked once on the thumb image
// Arguments:
// point - mouse coordinates relative to the thumbnail rectangle
// aKeyFlags - the key flags, see WM_LBUTTONDOWN
// See Also:
// OnThumbDblClick()
virtual void OnThumbClick(const QPoint& point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) = 0;
// Description:
// Called when user double clicked on the thumb image
// Arguments:
// point - mouse coordinates relative to the thumbnail rectangle
// aKeyFlags - the key flags, see WM_LBUTTONDOWN
// See Also:
// OnThumbClick()
//! called when user clicked twice on the thumb image
virtual void OnThumbDblClick(const QPoint& point, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) = 0;
// Description:
// Draw the cached thumb bitmap only, if any, no other kind of rendering
// Arguments:
// hDC - the destination DC, where to draw the thumb
// rRect - the destination rectangle
// Return Value:
// True if drawing of the thumbnail was done OK
// See Also:
// Render()
virtual bool DrawThumbImage(QPainter* painter, const QRect& rRect) = 0;
// Description:
// Writes asset info to a XML node.
// This is needed to save cached info as a persistent XML file for the next run of the editor.
// Arguments:
// node - An XML node to contain the info
// See Also:
// FromXML()
virtual void ToXML(XmlNodeRef& node) const = 0;
// Description:
// Gets asset info from a XML node.
// This is needed to get the asset info from previous runs of the editor without re-caching it.
// Arguments:
// node - An XML node that contains info for this asset
// See Also:
// ToXML()
virtual void FromXML(const XmlNodeRef& node) = 0;
// From IUnknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface([[maybe_unused]] const IID& riid, [[maybe_unused]] void** ppvObject)
{
return E_NOINTERFACE;
};
virtual ULONG STDMETHODCALLTYPE AddRef()
{
return 0;
};
virtual ULONG STDMETHODCALLTYPE Release()
{
return 0;
};
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETITEM_H

@ -1,259 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Description : Standard interface for asset database creators used to
// create an asset plugin for the asset browser
// The category of the plugin must be Asset Item DB
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H
#define CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H
#pragma once
struct IAssetItem;
struct IAssetViewer;
class QString;
class QStringList;
// Description:
// This struct keeps the info, filter and sorting settings for an asset field
struct SAssetField
{
// the condition for the current filter on the field
enum EAssetFilterCondition
{
eCondition_Any = 0,
// string conditions
// this also supports '*' and '?' as wildcards inside text
eCondition_Contains,
// this filter will search the target for at least one of the words specified
// ( ex: filter: "water car moon" , field value : "the_great_moon.dds", this will pass the test
// it also supports '*' and '?' as wildcards inside words text
eCondition_ContainsOneOfTheWords,
eCondition_StartsWith,
eCondition_EndsWith,
// string & numerical conditions
eCondition_Equal,
eCondition_Greater,
eCondition_Less,
eCondition_GreaterOrEqual,
eCondition_LessOrEqual,
eCondition_Not,
eCondition_InsideRange
};
// the asset field type
enum EAssetFieldType
{
eType_None = 0,
eType_Bool,
eType_Int8,
eType_Int16,
eType_Int32,
eType_Int64,
eType_Float,
eType_Double,
eType_String
};
// used when a field can have different specific values
typedef QStringList TFieldEnumValues;
SAssetField(
const char* pFieldName = "",
const char* pDisplayName = "Unnamed field",
EAssetFieldType aFieldType = eType_None,
UINT aColumnWidth = 50,
bool bVisibleInUI = true,
bool bReadOnly = true)
{
m_fieldName = pFieldName;
m_displayName = pDisplayName;
m_fieldType = aFieldType;
m_filterCondition = eCondition_Equal;
m_bUseEnumValues = false;
m_bReadOnly = bReadOnly;
m_listColumnWidth = aColumnWidth;
m_bFieldVisibleInUI = bVisibleInUI;
m_bPostFilter = false;
SetupEnumValues();
}
void SetupEnumValues()
{
m_bUseEnumValues = true;
if (m_fieldType == eType_Bool)
{
m_enumValues.clear();
m_enumValues.push_back("Yes");
m_enumValues.push_back("No");
}
}
// the field's display name, used in UI
QString m_displayName,
// the field internal name, used in C++ code
m_fieldName,
// the current filter value, if its empty "" then no filter is applied
m_filterValue,
// the field's max value, valid when the field's filter condition is eAssertFilterCondition_InsideRange
m_maxFilterValue,
// the name of the database holding this field, used in Asset Browser preset editor, if its "" then the field
// is common to all current databases
m_parentDatabaseName;
// is this field visible in the UI ?
bool m_bFieldVisibleInUI,
// if true, then you cannot modify this field of an asset item, only use it
m_bReadOnly,
// this field filter is applied after the other filters
m_bPostFilter;
// the field data type
EAssetFieldType m_fieldType;
// the filter's condition
EAssetFilterCondition m_filterCondition;
// use the enum list values to choose a value for the field ?
bool m_bUseEnumValues;
// this map is used when asset field has m_bUseEnumValues on true,
// choose a value for the field from this list in the UI
TFieldEnumValues m_enumValues;
// recommended list column width
unsigned int m_listColumnWidth;
};
struct SFieldFiltersPreset
{
QString presetName2;
QStringList checkedDatabaseNames;
bool bUsedInLevel;
std::vector<SAssetField> fields;
};
// Description:
// This interface allows the programmer to extend asset display types
// visible in the asset browser.
struct IAssetItemDatabase
: public IUnknown
{
DEFINE_UUID(0xFB09B039, 0x1D9D, 0x4057, 0xA5, 0xF0, 0xAA, 0x3C, 0x7B, 0x97, 0xAE, 0xA8)
typedef std::vector<SAssetField> TAssetFields;
typedef std::map < QString/*field name*/, SAssetField > TAssetFieldFiltersMap;
typedef std::map < QString/*asset filename*/, IAssetItem* > TFilenameAssetMap;
typedef AZStd::function<bool(const IAssetItem*)> MetaDataChangeListener;
// Description:
// Refresh the database by scanning the folders/paks for files, does not load the files, only filename and filesize are fetched
virtual void Refresh() = 0;
// Description:
// Fills the asset meta data from the loaded xml meta data DB.
// Arguments:
// db - the database XML node from where to cache the info
virtual void PrecacheFieldsInfoFromFileDB(const XmlNodeRef& db) = 0;
// Description:
// Return all assets loaded/scanned by this database
// Return Value:
// The assets map reference (filename-asset)
virtual TFilenameAssetMap& GetAssets() = 0;
// Description:
// Get an asset item by its filename
// Return Value:
// A single asset from the database given the filename
virtual IAssetItem* GetAsset(const char* pAssetFilename) = 0;
// Description:
// Return the asset fields this database's items support
// Return Value:
// The asset fields vector reference
virtual TAssetFields& GetAssetFields() = 0;
// Description:
// Return an asset field object pointer by the field internal name
// Arguments:
// pFieldName - the internal field's name (ex: "filename", "relativepath")
// Return Value:
// The asset field object pointer
virtual SAssetField* GetAssetFieldByName(const char* pFieldName) = 0;
// Description:
// Get the database name
// Return Value:
// Returns the database name, ex: "Textures"
virtual const char* GetDatabaseName() const = 0;
// Description:
// Get the database supported file name extension(s)
// Return Value:
// Returns the supported extensions, separated by comma, ex: "tga,bmp,dds"
virtual const char* GetSupportedExtensions() const = 0;
// Description:
// Free the database internal data structures
virtual void FreeData() = 0;
// Description:
// Apply filters to this database which will set/unset the IAssetItem::eAssetFlag_Visible of each asset, based
// on the given field filters
// Arguments:
// rFieldFilters - a reference to the field filters map (fieldname-field)
// See Also:
// ClearFilters()
virtual void ApplyFilters(const TAssetFieldFiltersMap& rFieldFilters) = 0;
// Description:
// Clear the current filters, by setting the IAssetItem::eAssetFlag_Visible of each asset to true
// See Also:
// ApplyFilters()
virtual void ClearFilters() = 0;
virtual QWidget* CreateDbFilterDialog(QWidget* pParent, IAssetViewer* pViewerCtrl) = 0;
virtual void UpdateDbFilterDialogUI(QWidget* pDlg) = 0;
virtual void OnAssetBrowserOpen() = 0;
virtual void OnAssetBrowserClose() = 0;
// Description:
// Gets the filename for saving new cached asset info.
// Return Value:
// A file name to save new transactions to the persistent asset info DB
// See Also:
// CAssetInfoFileDB, IAssetItem::ToXML(), IAssetItem::FromXML()
virtual const char* GetTransactionFilename() const = 0;
// Description:
// Adds a callback to be called when the meta data of this asset changed.
// Arguments:
// callBack - A functor to be added
// Return Value:
// True if successful, false otherwise.
// See Also:
// RemoveMetaDataChangeListener()
virtual bool AddMetaDataChangeListener(MetaDataChangeListener callBack) = 0;
// Description:
// Removes a callback from the list of meta data change listeners.
// Arguments:
// callBack - A functor to be removed
// Return Value:
// True if successful, false otherwise.
// See Also:
// AddMetaDataCHangeListener()
virtual bool RemoveMetaDataChangeListener(MetaDataChangeListener callBack) = 0;
// Description:
// The method that should be called when the meta data of an asset item changes to notify all listeners
// Arguments:
// pAssetItem - An asset item whose meta data have changed
// See Also:
// AddMetaDataCHangeListener(), RemoveMetaDataChangeListener()
virtual void OnMetaDataChange(const IAssetItem* pAssetItem) = 0;
//! from IUnknown
virtual HRESULT STDMETHODCALLTYPE QueryInterface([[maybe_unused]] REFIID riid, [[maybe_unused]] void** ppvObject)
{
return E_NOINTERFACE;
};
virtual ULONG STDMETHODCALLTYPE AddRef()
{
return 0;
};
virtual ULONG STDMETHODCALLTYPE Release()
{
return 0;
};
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETITEMDATABASE_H

@ -1,46 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
// Description : This file declares a control which objective is to display
// multiple assets allowing selection and preview of such things
// It also handles scrolling and changes in the thumbnail display size
#ifndef CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H
#define CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H
#pragma once
#include "IObservable.h"
#include "IAssetItemDatabase.h"
struct IAssetItem;
struct IAssetItemDatabase;
// Description:
// Observer for the asset viewer events
struct IAssetViewerObserver
{
virtual void OnChangeStatusBarInfo(UINT nSelectedItems, UINT nVisibleItems, UINT nTotalItems) {};
virtual void OnSelectionChanged() {};
virtual void OnChangedPreviewedAsset(IAssetItem* pAsset) {};
virtual void OnAssetDblClick(IAssetItem* pAsset) {};
virtual void OnAssetFilterChanged() {};
};
// Description:
// The asset viewer interface for the asset database plugins to use
struct IAssetViewer
{
DEFINE_OBSERVABLE_PURE_METHODS(IAssetViewerObserver);
virtual HWND GetRenderWindow() = 0;
virtual void ApplyFilters(const IAssetItemDatabase::TAssetFieldFiltersMap& rFieldFilters) = 0;
virtual const IAssetItemDatabase::TAssetFieldFiltersMap& GetCurrentFilters() = 0;
virtual void ClearFilters() = 0;
};
#endif // CRYINCLUDE_EDITOR_INCLUDE_IASSETVIEWER_H

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save