Merge branch 'ly-as-sdk/LYN-2948' of https://github.com/aws-lumberyard-dev/o3de into ly-as-sdk/LYN-2948
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce="es3:2,ios:2,osx_gl:0,pc:0,provo:0"
|
||||
/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce="android:2,ios:2,mac:0,pc:0,provo:0"
|
||||
@@ -1 +1 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce="es3:3,ios:3,osx_gl:0,pc:0,provo:0"
|
||||
/autooptimizefile=0 /preset=Albedo /reduce="android:3,ios:3,mac:0,pc:0,provo:0"
|
||||
@@ -31,13 +31,13 @@ class TestPythonAssetProcessing(object):
|
||||
unexpected_lines = []
|
||||
expected_lines = [
|
||||
'Mock asset exists',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel) found'
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative.azmodel) found',
|
||||
'Expected subId for asset (gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel) found'
|
||||
]
|
||||
timeout = 180
|
||||
halt_on_unexpected = False
|
||||
|
||||
@@ -38,16 +38,16 @@ def test_azmodel_product(generatedModelAssetPath, expectedSubId):
|
||||
assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False)
|
||||
assetIdString = assetId.to_string()
|
||||
if (assetIdString.endswith(':' + expectedSubId) is False):
|
||||
raise_and_stop(f'Asset has unexpected asset ID ({assetIdString}) for ({generatedModelAssetPath})!')
|
||||
raise_and_stop(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString}) for ({generatedModelAssetPath}), expected {expectedSubId}!')
|
||||
else:
|
||||
print(f'Expected subId for asset ({generatedModelAssetPath}) found')
|
||||
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel', '10315ae0')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel', '10661093')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel', '10af8810')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel', '10f8c263')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel', '100ac47f')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel', '105d8e0c')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel', '1002d464')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive.azmodel', '1024be55')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative.azmodel', '1052c94e')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive.azmodel', '10130556')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative.azmodel', '1065724d')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive.azmodel', '10d16e68')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative.azmodel', '10a71973')
|
||||
test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center.azmodel', '10412075')
|
||||
|
||||
azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt')
|
||||
|
||||
+3
-3
@@ -34,10 +34,10 @@ def ap_all_platforms_setup_fixture(request, workspace, ap_setup_fixture) -> Dict
|
||||
|
||||
# Specific platform cache locations
|
||||
resources["pc_cache_location"] = os.path.join(cache_dir, "pc")
|
||||
resources["es3_cache_location"] = os.path.join(cache_dir, "es3")
|
||||
resources["android_cache_location"] = os.path.join(cache_dir, "android")
|
||||
resources["ios_cache_location"] = os.path.join(cache_dir, "ios")
|
||||
resources["osx_gl_cache_location"] = os.path.join(cache_dir, "osx_gl")
|
||||
resources["mac_cache_location"] = os.path.join(cache_dir, "mac")
|
||||
resources["provo_cache_location"] = os.path.join(cache_dir, "provo")
|
||||
resources["all_platforms"] = ["pc", "es3", "ios", "osx_gl", "provo"]
|
||||
resources["all_platforms"] = ["pc", "android", "ios", "mac", "provo"]
|
||||
|
||||
return resources
|
||||
|
||||
+3
-3
@@ -54,7 +54,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
|
||||
platforms = [platform.strip() for platform in platforms.split(",")]
|
||||
else:
|
||||
# No commandline argument provided, default to mac and pc
|
||||
platforms = ["pc", "osx_gl"]
|
||||
platforms = ["pc", "mac"]
|
||||
|
||||
class BundlerBatchFixture:
|
||||
"""
|
||||
@@ -241,11 +241,11 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) ->
|
||||
def get_platform_flag(self, platform_name: str) -> int:
|
||||
if (platform_name == "pc"):
|
||||
return 1
|
||||
elif (platform_name == "es3"):
|
||||
elif (platform_name == "android"):
|
||||
return 2
|
||||
elif (platform_name == "ios"):
|
||||
return 4
|
||||
elif (platform_name == "osx_gl"):
|
||||
elif (platform_name == "mac"):
|
||||
return 8
|
||||
elif (platform_name == "server"):
|
||||
return 128
|
||||
|
||||
+36
-36
@@ -460,9 +460,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
"""
|
||||
helper = bundler_batch_helper
|
||||
# fmt:off
|
||||
assert "pc" in helper["platforms"] and "osx_gl" in helper["platforms"], \
|
||||
assert "pc" in helper["platforms"] and "mac" in helper["platforms"], \
|
||||
"This test requires both PC and MAC platforms to be enabled. " \
|
||||
"Please rerun with commandline option: '--bundle_platforms=pc,osx_gl'"
|
||||
"Please rerun with commandline option: '--bundle_platforms=pc,mac'"
|
||||
# fmt:on
|
||||
|
||||
seed_list = os.path.join(workspace.paths.engine_root(), "Engine", "SeedAssetList.seed") # Engine seed list
|
||||
@@ -502,7 +502,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
for bundle_file in bundle_files.values():
|
||||
assert os.path.isfile(bundle_file)
|
||||
|
||||
# This asset is created on osx_gl platform but not on windows
|
||||
# This asset is created on mac platform but not on windows
|
||||
file_to_check = b"engineassets/shading/defaultprobe_cm.dds.5" # [use byte str because file is in binary]
|
||||
|
||||
# Extract the delta catalog file from pc archive. {file_to_check} SHOULD NOT be present for PC
|
||||
@@ -512,11 +512,11 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
f"{file_to_check} was found in DeltaCatalog.xml in pc bundle file {bundle_files['pc']}"
|
||||
# fmt:on
|
||||
|
||||
# Extract the delta catalog file from osx_gl archive. {file_to_check} SHOULD be present for MAC
|
||||
file_contents = helper.extract_file_content(bundle_files["osx_gl"], "DeltaCatalog.xml")
|
||||
# Extract the delta catalog file from mac archive. {file_to_check} SHOULD be present for MAC
|
||||
file_contents = helper.extract_file_content(bundle_files["mac"], "DeltaCatalog.xml")
|
||||
# fmt:off
|
||||
assert file_to_check in file_contents, \
|
||||
f"{file_to_check} was not found in DeltaCatalog.xml in darwin bundle file {bundle_files['osx_gl']}"
|
||||
f"{file_to_check} was not found in DeltaCatalog.xml in darwin bundle file {bundle_files['mac']}"
|
||||
# fmt:on
|
||||
|
||||
# Gather checksums for first set of bundles
|
||||
@@ -613,7 +613,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
helper.call_seeds(
|
||||
seedListFile=helper["seed_list_file"],
|
||||
addSeed=test_asset,
|
||||
platform="pc,osx_gl",
|
||||
platform="pc,mac",
|
||||
)
|
||||
|
||||
# Validate both mac and pc are activated for seed
|
||||
@@ -626,7 +626,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
helper.call_seeds(
|
||||
seedListFile=helper["seed_list_file"],
|
||||
removePlatformFromSeeds="",
|
||||
platform="osx_gl",
|
||||
platform="mac",
|
||||
)
|
||||
# Validate only pc platform for seed. Save file contents to variable
|
||||
all_lines = check_seed_platform(helper["seed_list_file"], test_asset, helper["platform_values"]["pc"])
|
||||
@@ -646,7 +646,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
helper.call_seeds(
|
||||
seedListFile=helper["seed_list_file"],
|
||||
addPlatformToSeeds="",
|
||||
platform="osx_gl",
|
||||
platform="mac",
|
||||
)
|
||||
# Validate Mac platform was added back on. Save file contents
|
||||
# fmt:off
|
||||
@@ -670,7 +670,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
helper.call_seeds(
|
||||
seedListFile=helper["seed_list_file"],
|
||||
removeSeed=test_asset,
|
||||
platform="pc,osx_gl",
|
||||
platform="pc,mac",
|
||||
)
|
||||
|
||||
# Validate seed was removed from file
|
||||
@@ -697,9 +697,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
env = ap_setup_fixture
|
||||
|
||||
# fmt:off
|
||||
assert "pc" in helper["platforms"] and "osx_gl" in helper["platforms"], \
|
||||
assert "pc" in helper["platforms"] and "mac" in helper["platforms"], \
|
||||
"This test requires both PC and MAC platforms to be enabled. " \
|
||||
"Please rerun with commandline option: '--bundle_platforms=pc,osx_gl'"
|
||||
"Please rerun with commandline option: '--bundle_platforms=pc,mac'"
|
||||
# fmt:on
|
||||
|
||||
# Test assets arranged in common lists: six (0-5) .txt files and .dat files
|
||||
@@ -717,16 +717,16 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
file_platforms = {
|
||||
"txtfile_0.txt": "pc",
|
||||
"txtfile_1.txt": "pc",
|
||||
"txtfile_2.txt": "pc,osx_gl",
|
||||
"txtfile_3.txt": "pc,osx_gl",
|
||||
"txtfile_4.txt": "osx_gl",
|
||||
"txtfile_5.txt": "osx_gl",
|
||||
"txtfile_2.txt": "pc,mac",
|
||||
"txtfile_3.txt": "pc,mac",
|
||||
"txtfile_4.txt": "mac",
|
||||
"txtfile_5.txt": "mac",
|
||||
"datfile_0.dat": "pc",
|
||||
"datfile_1.dat": "pc",
|
||||
"datfile_2.dat": "pc,osx_gl",
|
||||
"datfile_3.dat": "pc,osx_gl",
|
||||
"datfile_4.dat": "osx_gl",
|
||||
"datfile_5.dat": "osx_gl",
|
||||
"datfile_2.dat": "pc,mac",
|
||||
"datfile_3.dat": "pc,mac",
|
||||
"datfile_4.dat": "mac",
|
||||
"datfile_5.dat": "mac",
|
||||
}
|
||||
|
||||
# Comparison rules files and their associated 'comparisonType' flags
|
||||
@@ -741,7 +741,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
|
||||
# Get our test assets ready and processed
|
||||
utils.prepare_test_assets(env["tests_dir"], "C16877178", env["project_test_assets_dir"])
|
||||
asset_processor.batch_process(timeout=timeout, fastscan=False, platforms="pc,osx_gl")
|
||||
asset_processor.batch_process(timeout=timeout, fastscan=False, platforms="pc,mac")
|
||||
|
||||
# *** Some helper functions *** #
|
||||
|
||||
@@ -759,7 +759,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
helper.call_assetLists(
|
||||
assetListFile=os.path.join(helper["test_dir"], asset_list_file_name),
|
||||
seedListFile=os.path.join(helper["test_dir"], seed_file_name),
|
||||
platform="pc,osx_gl",
|
||||
platform="pc,mac",
|
||||
)
|
||||
|
||||
def get_platform_assets(asset_name_list: List[str]) -> Dict[str, List[str]]:
|
||||
@@ -769,7 +769,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
for asset_name in asset_name_list:
|
||||
if "pc" in file_platforms[asset_name]:
|
||||
win_assets.append(asset_name)
|
||||
if "osx_gl" in file_platforms[asset_name]:
|
||||
if "mac" in file_platforms[asset_name]:
|
||||
mac_assets.append(asset_name)
|
||||
return {"win": win_assets, "mac": mac_assets}
|
||||
|
||||
@@ -798,7 +798,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
|
||||
# Get platform result file names
|
||||
win_asset_list_file = helper.platform_file_name(request_file, platforms["pc"])
|
||||
mac_asset_list_file = helper.platform_file_name(request_file, platforms["osx_gl"])
|
||||
mac_asset_list_file = helper.platform_file_name(request_file, platforms["mac"])
|
||||
|
||||
# Get expected platforms for each asset in asset_names
|
||||
platform_files = get_platform_assets(asset_names)
|
||||
@@ -879,14 +879,14 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
# fmt:on
|
||||
# End verify_asset_list_contents()
|
||||
|
||||
def run_compare_command_and_verify(platform_arg: str, expect_pc_output: bool, expect_osx_gl_output: bool) -> None:
|
||||
def run_compare_command_and_verify(platform_arg: str, expect_pc_output: bool, expect_mac_output: bool) -> None:
|
||||
# Expected asset list to equal result of comparison
|
||||
expected_pc_asset_list = None
|
||||
expected_osx_gl_asset_list = None
|
||||
expected_mac_asset_list = None
|
||||
|
||||
# Last output file. Use this for comparison to 'expected'
|
||||
output_pc_asset_list = None
|
||||
output_osx_gl_asset_list = None
|
||||
output_mac_asset_list = None
|
||||
|
||||
# Add the platform to the file name to match what the Bundler will create
|
||||
last_output_arg = output_arg.split(",")[-1]
|
||||
@@ -895,10 +895,10 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
expected_pc_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
|
||||
output_pc_asset_list = helper.platform_file_name(last_output_arg, platform)
|
||||
|
||||
if expect_osx_gl_output:
|
||||
platform = platforms["osx_gl"]
|
||||
expected_osx_gl_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
|
||||
output_osx_gl_asset_list = helper.platform_file_name(last_output_arg, platform)
|
||||
if expect_mac_output:
|
||||
platform = platforms["mac"]
|
||||
expected_mac_asset_list = os.path.join(helper["test_dir"], helper.platform_file_name(expected_asset_list, platform))
|
||||
output_mac_asset_list = helper.platform_file_name(last_output_arg, platform)
|
||||
|
||||
# Build execution command
|
||||
cmd = generate_compare_command(platform_arg)
|
||||
@@ -911,15 +911,15 @@ class TestsAssetBundlerBatch_WindowsAndMac(object):
|
||||
verify_asset_list_contents(expected_pc_asset_list, output_pc_asset_list)
|
||||
fs.delete([output_pc_asset_list], True, True)
|
||||
|
||||
if expect_osx_gl_output:
|
||||
verify_asset_list_contents(expected_osx_gl_asset_list, output_osx_gl_asset_list)
|
||||
fs.delete([output_osx_gl_asset_list], True, True)
|
||||
if expect_mac_output:
|
||||
verify_asset_list_contents(expected_mac_asset_list, output_mac_asset_list)
|
||||
fs.delete([output_mac_asset_list], True, True)
|
||||
# End run_compare_command_and_verify()
|
||||
|
||||
# Generate command, run and validate for each platform
|
||||
run_compare_command_and_verify("pc", True, False)
|
||||
run_compare_command_and_verify("osx_gl", False, True)
|
||||
run_compare_command_and_verify("pc,osx_gl", True, True)
|
||||
run_compare_command_and_verify("mac", False, True)
|
||||
run_compare_command_and_verify("pc,mac", True, True)
|
||||
#run_compare_command_and_verify(None, True, True)
|
||||
|
||||
# End compare_and_check()
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ class TestsAssetProcessorBatch_AllPlatforms(object):
|
||||
def test_RunAPBatch_TwoPlatforms_ExitCodeZero(self, asset_processor):
|
||||
asset_processor.create_temp_asset_root()
|
||||
asset_processor.enable_asset_processor_platform("pc")
|
||||
asset_processor.enable_asset_processor_platform("osx_gl")
|
||||
asset_processor.enable_asset_processor_platform("mac")
|
||||
result, _ = asset_processor.batch_process()
|
||||
assert result, "AP Batch failed"
|
||||
|
||||
|
||||
@@ -39,4 +39,19 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
|
||||
COMPONENT
|
||||
Editor
|
||||
)
|
||||
|
||||
ly_add_pytest(
|
||||
NAME AutomatedTesting::EditorTests_Sandbox
|
||||
TEST_SUITE sandbox
|
||||
TEST_SERIAL
|
||||
PATH ${CMAKE_CURRENT_LIST_DIR}
|
||||
PYTEST_MARKS "SUITE_sandbox"
|
||||
TIMEOUT 1500
|
||||
RUNTIME_DEPENDENCIES
|
||||
Legacy::Editor
|
||||
AZ::AssetProcessor
|
||||
AutomatedTesting.Assets
|
||||
COMPONENT
|
||||
Editor
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -39,7 +39,7 @@ class TestDocking(object):
|
||||
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
|
||||
|
||||
@pytest.mark.test_case_id("C6376081")
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.SUITE_sandbox
|
||||
def test_Docking_BasicDockedTools(self, request, editor, level, launcher_platform):
|
||||
expected_lines = [
|
||||
"The tools are all docked together in a tabbed widget",
|
||||
|
||||
@@ -39,7 +39,7 @@ class TestMenus(object):
|
||||
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
|
||||
|
||||
@pytest.mark.test_case_id("C16780783", "C2174438")
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.SUITE_sandbox
|
||||
def test_Menus_EditMenuOptions_Work(self, request, editor, level, launcher_platform):
|
||||
expected_lines = [
|
||||
"Undo Action triggered",
|
||||
@@ -113,7 +113,7 @@ class TestMenus(object):
|
||||
)
|
||||
|
||||
@pytest.mark.test_case_id("C16780778")
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.SUITE_sandbox
|
||||
def test_Menus_FileMenuOptions_Work(self, request, editor, level, launcher_platform):
|
||||
expected_lines = [
|
||||
"New Level Action triggered",
|
||||
|
||||
@@ -13,22 +13,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
|
||||
|
||||
## DynVeg ##
|
||||
|
||||
# Temporarily moving all tests to periodic suite - SPEC-6553
|
||||
#ly_add_pytest(
|
||||
# NAME AutomatedTesting::DynamicVegetationTests_Main
|
||||
# TEST_SERIAL
|
||||
# TEST_SUITE main
|
||||
# PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
|
||||
# PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
|
||||
# TIMEOUT 1500
|
||||
# RUNTIME_DEPENDENCIES
|
||||
# AZ::AssetProcessor
|
||||
# Legacy::Editor
|
||||
# AutomatedTesting.GameLauncher
|
||||
# AutomatedTesting.Assets
|
||||
# COMPONENT
|
||||
# LargeWorlds
|
||||
#)
|
||||
ly_add_pytest(
|
||||
NAME AutomatedTesting::DynamicVegetationTests_Main
|
||||
TEST_SERIAL
|
||||
TEST_SUITE main
|
||||
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
|
||||
PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
|
||||
TIMEOUT 1500
|
||||
RUNTIME_DEPENDENCIES
|
||||
AZ::AssetProcessor
|
||||
Legacy::Editor
|
||||
AutomatedTesting.GameLauncher
|
||||
AutomatedTesting.Assets
|
||||
COMPONENT
|
||||
LargeWorlds
|
||||
)
|
||||
|
||||
|
||||
ly_add_pytest(
|
||||
@@ -137,21 +136,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
|
||||
LargeWorlds
|
||||
)
|
||||
## LandscapeCanvas ##
|
||||
# Temporarily moving all tests to periodic suite - SPEC-6553
|
||||
#ly_add_pytest(
|
||||
# NAME AutomatedTesting::LandscapeCanvasTests_Main
|
||||
# TEST_SERIAL
|
||||
# TEST_SUITE main
|
||||
# PATH ${CMAKE_CURRENT_LIST_DIR}/largeworlds/landscape_canvas
|
||||
# PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
|
||||
# TIMEOUT 1500
|
||||
# RUNTIME_DEPENDENCIES
|
||||
# AZ::AssetProcessor
|
||||
# Legacy::Editor
|
||||
# AutomatedTesting.Assets
|
||||
# COMPONENT
|
||||
# LargeWorlds
|
||||
#)
|
||||
|
||||
ly_add_pytest(
|
||||
NAME AutomatedTesting::LandscapeCanvasTests_Main
|
||||
TEST_SERIAL
|
||||
TEST_SUITE main
|
||||
PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas
|
||||
PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
|
||||
TIMEOUT 1500
|
||||
RUNTIME_DEPENDENCIES
|
||||
AZ::AssetProcessor
|
||||
Legacy::Editor
|
||||
AutomatedTesting.Assets
|
||||
COMPONENT
|
||||
LargeWorlds
|
||||
)
|
||||
|
||||
ly_add_pytest(
|
||||
NAME AutomatedTesting::LandscapeCanvasTests_Periodic
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ class TestDynamicSliceInstanceSpawner(object):
|
||||
return console
|
||||
|
||||
@pytest.mark.test_case_id("C28851763")
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.SUITE_main
|
||||
@pytest.mark.dynveg_area
|
||||
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
|
||||
def test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(self, request, editor, level, workspace, project,
|
||||
|
||||
@@ -37,7 +37,7 @@ class TestEmptyInstanceSpawner(object):
|
||||
file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True)
|
||||
|
||||
@pytest.mark.test_case_id("C28851762")
|
||||
@pytest.mark.SUITE_periodic
|
||||
@pytest.mark.SUITE_main
|
||||
@pytest.mark.dynveg_area
|
||||
def test_EmptyInstanceSpawner_EmptySpawnerWorks(self, request, editor, level, launcher_platform):
|
||||
cfg_args = [level]
|
||||
|
||||
+2
-2
@@ -118,7 +118,7 @@ class TestGraphComponentSync(object):
|
||||
|
||||
@pytest.mark.test_case_id('C15987206')
|
||||
@pytest.mark.SUITE_main
|
||||
def test_LandscapeCanvas_GradientMixerNodeConstruction(self, request, editor, level, launcher_platform):
|
||||
def test_LandscapeCanvas_GradientMixer_NodeConstruction(self, request, editor, level, launcher_platform):
|
||||
"""
|
||||
Verifies a Gradient Mixer can be setup in Landscape Canvas and all references are property set.
|
||||
"""
|
||||
@@ -141,7 +141,7 @@ class TestGraphComponentSync(object):
|
||||
|
||||
@pytest.mark.test_case_id('C21333743')
|
||||
@pytest.mark.SUITE_periodic
|
||||
def test_LandscapeCanvas_LayerBlenderNodeConstruction(self, request, editor, level, launcher_platform):
|
||||
def test_LandscapeCanvas_LayerBlender_NodeConstruction(self, request, editor, level, launcher_platform):
|
||||
"""
|
||||
Verifies a Layer Blender can be setup in Landscape Canvas and all references are property set.
|
||||
"""
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d49aceca5ad4e0b9f46c8127afb5c53b68aa30272950b1abd66fba310977ff0c
|
||||
size 15032
|
||||
@@ -1,6 +0,0 @@
|
||||
<download name="blank2" type="Map">
|
||||
<index src="filelist.xml" dest="filelist.xml"/>
|
||||
<files>
|
||||
<file src="level.pak" dest="level.pak" size="39815" md5="3874c8411da272b96974e24a9fff06e8"/>
|
||||
</files>
|
||||
</download>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5f221acd847ec8a15e1333a5163d6d0fd886b8eda46fa7b133f76ddbf1d11216
|
||||
size 41472
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8e5dcfbe65fd2fd8ea29a38a96e703683c544fd42b9424857b1df3718c7775a
|
||||
size 41472
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0378911c27933302042550d5a031a5f9104296162edc2b21e44893f1b8cff969
|
||||
size 44124
|
||||
@@ -1,14 +0,0 @@
|
||||
<Environment>
|
||||
<Fog ViewDistance="8000" ViewDistanceLowSpec="1000" LDRGlobalDensMult="1.0"/>
|
||||
<Terrain DetailLayersViewDistRatio="1.0" HeightMapAO="0"/>
|
||||
<EnvState WindVector="1,0,0" BreezeGeneration="0" BreezeStrength="1.f" BreezeMovementSpeed="8.f" BreezeVariation="1.f" BreezeLifeTime="15.f" BreezeCount="4" BreezeSpawnRadius="25.f" BreezeSpread="0.f" BreezeRadius="5.f" ConsoleMergedMeshesPool="2750" ShowTerrainSurface="1" SunShadowsMinSpec="1" SunShadowsAdditionalCascadeMinSpec="0" SunShadowsClipPlaneRange="256.0f" SunShadowsClipPlaneRangeShift="0.0f" UseLayersActivation="0" SunLinkedToTOD="1"/>
|
||||
<VolFogShadows Enable="0" EnableForClouds="0"/>
|
||||
<CloudShadows CloudShadowTexture="" CloudShadowSpeed="0,0,0" CloudShadowTiling="1.0" CloudShadowBrightness="1.0" CloudShadowInvert="0"/>
|
||||
<ParticleLighting AmbientMul="1.0" LightsMul="1.0"/>
|
||||
<SkyBox Material="EngineAssets/Materials/Sky/Sky" MaterialLowSpec="EngineAssets/Materials/Sky/Sky" Angle="0" Stretching="0.5"/>
|
||||
<Ocean Material="EngineAssets/Materials/Water/Ocean_default" CausticsDistanceAtten="100.0" CausticDepth="8.0" CausticIntensity="1.0" CausticsTilling="1.0"/>
|
||||
<OceanAnimation WindDirection="1.0" WindSpeed="4.0" WavesAmount="1.5" WavesSize="0.4" WavesSpeed="1.0"/>
|
||||
<Moon Latitude="240.0" Longitude="45.0" Size="0.5" Texture="Textures/Skys/Night/half_moon.dds"/>
|
||||
<DynTexSource Width="256" Height="256"/>
|
||||
<Total_Illumination_v2 Active="0" IntegrationMode="0" InjectionMultiplier="1.0" SkyColorMultiplier="1.0" UseTODSkyColor="0.5" PortalsDeform="0" PortalsInject="0" DiffuseAmplifier="1.0" SpecularAmplifier="0" NumberOfBounces="1" Saturation="0.8" PropagationBooster="1.5" DiffuseBias="0.05" DiffuseConeWidth="24" ConeMaxLength="12.0" UpdateLighting="0" UpdateGeometry="0" MinNodeSize="8.0" SkipNonGILights="0" LowSpecMode="0" HalfresKernel="0" UseLightProbes="0" VoxelizaionLODRatio="1.8" VoxelPoolResolution="128" SSAOAmount="0.7" ObjectsMaxViewDistance="64" SunRSMInject="0" SSDepthTrace="0"/>
|
||||
</Environment>
|
||||
@@ -1,7 +0,0 @@
|
||||
<TerrainTexture TileCountX="1" TileCountY="1" TileResolution="512">
|
||||
<RGBLayer>
|
||||
<Tiles>
|
||||
<tile />
|
||||
</Tiles>
|
||||
</RGBLayer>
|
||||
</TerrainTexture>
|
||||
@@ -1,356 +0,0 @@
|
||||
<TimeOfDay Time="12" TimeStart="12" TimeEnd="12" TimeAnimSpeed="0">
|
||||
<Variable Name="Sun color" Color="0.94730699,0.74540401,0.57758099">
|
||||
<Spline Keys="-0.000628322:(0.783538:0.89627:0.930341):36,0:(0.783538:0.887923:0.921582):36,0.229167:(0.783538:0.879623:0.921582):36,0.25:(0.947307:0.745404:0.577581):36,0.5:(0.947307:0.745404:0.577581):262180,0.75:(0.947307:0.745404:0.577581):36,0.770833:(0.783538:0.879623:0.921582):36,1:(0.783538:0.89627:0.930556):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun intensity" Value="120000">
|
||||
<Spline Keys="0:1000:36,0.229167:1000:36,0.5:120000:36,0.770833:1000:65572,0.999306:1000:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun specular multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color" Color="0.27049801,0.47353199,0.83077002">
|
||||
<Spline Keys="0:(0.00651209:0.00972122:0.0137021):36,0.229167:(0.00604883:0.00972122:0.0137021):36,0.25:(0.270498:0.473532:0.83077):36,0.5:(0.270498:0.473532:0.83077):458788,0.75:(0.270498:0.473532:0.83077):36,0.770833:(0.00604883:0.00972122:0.0137021):36,1:(0.00651209:0.00972122:0.0137021):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color multiplier" Value="1">
|
||||
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.25:1:36,0.5:1:36,0.75:1:36,0.770833:0.5:36,1:0.5:65572,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog height (bottom)" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog layer density (bottom)" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:36,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (top)" Color="0.597202,0.72305501,0.91309899">
|
||||
<Spline Keys="0:(0.00699541:0.00972122:0.0122865):36,0.229167:(0.00699541:0.00972122:0.0122865):36,0.25:(0.597202:0.723055:0.913099):36,0.5:(0.597202:0.723055:0.913099):458788,0.75:(0.597202:0.723055:0.913099):36,0.770833:(0.00699541:0.00972122:0.0122865):36,1:(0.00699541:0.00972122:0.0122865):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (top) multiplier" Value="1">
|
||||
<Spline Keys="-4.40702e-06:0.5:36,0.0297507:0.499195:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog height (top)" Value="100">
|
||||
<Spline Keys="0:100:36,0.25:100:36,0.5:100:36,0.75:100:65572,1:100:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog layer density (top)" Value="9.9999997e-05">
|
||||
<Spline Keys="0:0.0001:36,0.25:0.0001:36,0.5:0.0001:65572,0.75:0.0001:36,1:0.0001:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color height offset" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:65572,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (radial)" Color="0.76815099,0.51491803,0.16826899">
|
||||
<Spline Keys="0:(0:0:0):36,0.229167:(0.00439144:0.00367651:0.00334654):36,0.25:(0.838799:0.564712:0.184475):36,0.5:(0.768151:0.514918:0.168269):458788,0.75:(0.838799:0.564712:0.184475):36,0.770833:(0.00402472:0.00334654:0.00303527):36,1:(0:0:0):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog color (radial) multiplier" Value="6">
|
||||
<Spline Keys="0:0:36,0.25:6:36,0.5:6:36,0.75:6:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog radial size" Value="0.85000002">
|
||||
<Spline Keys="0:0:36,0.25:0.85:65572,0.5:0.85:36,0.75:0.85:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Fog radial lobe" Value="0.75">
|
||||
<Spline Keys="0:0:36,0.25:0.75:36,0.5:0.75:36,0.75:0.75:65572,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Final density clamp" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Global density" Value="1.5">
|
||||
<Spline Keys="0:1.5:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp start" Value="25">
|
||||
<Spline Keys="0:25:36,0.25:25:36,0.5:25:65572,0.75:25:36,1:25:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp end" Value="1000">
|
||||
<Spline Keys="0:1000:36,0.25:1000:36,0.5:1000:65572,0.75:1000:36,1:1000:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Ramp influence" Value="0.69999999">
|
||||
<Spline Keys="0:0.7:36,0.25:0.7:36,0.5:0.7:65572,0.75:0.7:36,1:0.7:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening" Value="0.2">
|
||||
<Spline Keys="0:0.2:36,0.25:0.2:36,0.5:0.2:65572,0.75:0.2:36,1:0.2:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening sun" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow darkening ambient" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog: Shadow range" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog height (bottom)" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog layer density (bottom)" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog height (top)" Value="4000">
|
||||
<Spline Keys="0:4000:0,1:4000:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog layer density (top)" Value="9.9999997e-05">
|
||||
<Spline Keys="0:0.0001:0,1:0.0001:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Global fog density" Value="0.10000001">
|
||||
<Spline Keys="0:0.1:0,1:0.1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp start" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Ramp end" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (atmosphere)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (atmosphere)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1:0.6:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (sun radial)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (sun radial)" Value="0.94999993">
|
||||
<Spline Keys="0:0.95:0,1:0.95:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend factor for sun scattering" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Blend mode for sun scattering" Value="0">
|
||||
<Spline Keys="0:0:0,1:0:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Fog albedo color (entities)" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):0,1:(1:1:1):0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Anisotropy factor (entities)" Value="0.60000002">
|
||||
<Spline Keys="0:0.6:0,1:0.6:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Maximum range of ray-marching" Value="64">
|
||||
<Spline Keys="0:64:0,1:64:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: In-scattering factor" Value="1">
|
||||
<Spline Keys="0:1:0,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Extinction factor" Value="0.30000001">
|
||||
<Spline Keys="0:0.3:0,1:0.3:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Analytical volumetric fog visibility" Value="0.5">
|
||||
<Spline Keys="0:0.5:0,1:0.5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Volumetric fog 2: Final density clamp" Value="1">
|
||||
<Spline Keys="0:1:0,0.5:1:36,1:1:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun intensity" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.494381:(1:1:1):65572,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun intensity multiplier" Value="200">
|
||||
<Spline Keys="0:200:36,0.25:200:36,0.5:200:36,0.75:200:36,1:200:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Mie scattering" Value="2">
|
||||
<Spline Keys="0:40:36,0.5:2:36,1:40:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Rayleigh scattering" Value="0.2">
|
||||
<Spline Keys="0:0.2:36,0.229167:0.2:36,0.25:1:36,0.291667:0.2:36,0.5:0.2:36,0.729167:0.2:36,0.75:1:36,0.770833:0.2:36,1:0.2:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Sun anisotropy factor" Value="-0.99989998">
|
||||
<Spline Keys="0:-0.9999:36,0.25:-0.9999:36,0.5:-0.9999:65572,0.75:-0.9999:36,1:-0.9999:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (R)" Value="694">
|
||||
<Spline Keys="0:694:36,0.25:694:36,0.5:694:65572,0.75:694:36,1:694:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (G)" Value="597">
|
||||
<Spline Keys="0:597:36,0.25:597:36,0.5:597:36,0.75:597:36,1:597:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky light: Wavelength (B)" Value="488">
|
||||
<Spline Keys="0:488:36,0.25:488:36,0.5:488:65572,0.75:488:36,1:488:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Horizon color" Color="0.27049801,0.39157301,0.52711499">
|
||||
<Spline Keys="0:(0.270498:0.391573:0.520996):36,0.25:(0.270498:0.391573:0.527115):36,0.5:(0.270498:0.391573:0.527115):262180,0.75:(0.270498:0.391573:0.527115):36,1:(0.270498:0.391573:0.520996):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Horizon color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith color" Color="0.361307,0.434154,0.46778399">
|
||||
<Spline Keys="0:(0.361307:0.434154:0.467784):36,0.25:(0.361307:0.434154:0.467784):36,0.5:(0.361307:0.434154:0.467784):262180,0.75:(0.361307:0.434154:0.467784):36,1:(0.361307:0.434154:0.467784):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith color multiplier" Value="0">
|
||||
<Spline Keys="0:0.02:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.02:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Zenith shift" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Star intensity" Value="0">
|
||||
<Spline Keys="0:3:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:1.03977:36,1:3:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon color" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):458788,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon color multiplier" Value="0">
|
||||
<Spline Keys="0:0.4:36,0.25:0:36,0.5:0:36,0.75:0:65572,1:0.4:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona color" Color="0.904661,1,1">
|
||||
<Spline Keys="0:(0.89627:1:1):36,0.25:(0.904661:1:1):36,0.5:(0.904661:1:1):393252,0.75:(0.904661:1:1):36,0.836647:(0.89627:1:1):36,1:(0.89627:1:1):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon inner corona scale" Value="0">
|
||||
<Spline Keys="0:2:36,0.25:0:36,0.5:0:65572,0.75:0:36,0.836647:0.693178:36,1:2:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona color" Color="0.201556,0.22696599,0.254152">
|
||||
<Spline Keys="0:(0.198069:0.226966:0.250158):36,0.25:(0.201556:0.226966:0.254152):36,0.5:(0.201556:0.226966:0.254152):36,0.75:(0.201556:0.226966:0.254152):36,1:(0.198069:0.226966:0.250158):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona color multiplier" Value="0">
|
||||
<Spline Keys="0:0.1:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Night sky: Moon outer corona scale" Value="0">
|
||||
<Spline Keys="0:0.01:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.01:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun light multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color" Color="0.83077002,0.76815099,0.65837502">
|
||||
<Spline Keys="0:(0.737911:0.737911:0.737911):36,0.25:(0.83077:0.768151:0.658375):36,0.5:(0.83077:0.768151:0.658375):458788,0.75:(0.83077:0.768151:0.658375):36,1:(0.737911:0.737911:0.737911):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color multiplier" Value="1">
|
||||
<Spline Keys="0:0.1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cloud shading: Sun custom color influence" Value="0">
|
||||
<Spline Keys="0:0.5:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun shafts visibility" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays visibility" Value="1.5">
|
||||
<Spline Keys="0:1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays attenuation" Value="1.5">
|
||||
<Spline Keys="0:0.1:36,0.25:1.5:36,0.5:1.5:65572,0.75:1.5:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays suncolor influence" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun rays custom color" Color="0.66538697,0.838799,0.94730699">
|
||||
<Spline Keys="0:(0.665387:0.838799:0.947307):36,0.25:(0.665387:0.838799:0.947307):36,0.5:(0.665387:0.838799:0.947307):458788,0.75:(0.665387:0.838799:0.947307):36,1:(0.665387:0.838799:0.947307):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog color" Color="0.0012141099,0.0091340598,0.017642001">
|
||||
<Spline Keys="0:(0.00121411:0.00913406:0.017642):36,0.25:(0.00121411:0.00913406:0.017642):36,0.5:(0.00121411:0.00913406:0.017642):458788,0.75:(0.00121411:0.00913406:0.017642):36,1:(0.00121411:0.00913406:0.017642):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog color multiplier" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Ocean fog density" Value="0.5">
|
||||
<Spline Keys="0:0.5:36,0.25:0.5:36,0.5:0.5:65572,0.75:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Skybox multiplier" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve shoulder scale" Value="2">
|
||||
<Spline Keys="0:3:36,0.229167:3:36,0.5:2:36,0.770833:3:36,1:3:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve midtones scale" Value="1">
|
||||
<Spline Keys="0:0.5:36,0.229167:0.5:36,0.5:1:36,0.770833:0.5:36,1:0.5:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve toe scale" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Film curve whitepoint" Value="4">
|
||||
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Saturation" Value="1">
|
||||
<Spline Keys="0:0.8:36,0.229167:0.8:36,0.5:1:36,0.751391:1:65572,0.770833:0.8:36,1:0.8:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Color balance" Color="1,1,1">
|
||||
<Spline Keys="0:(1:1:1):36,0.25:(1:1:1):36,0.5:(1:1:1):36,0.75:(1:1:1):36,1:(1:1:1):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Scene key" Value="0.18000001">
|
||||
<Spline Keys="0:0.18:36,0.25:0.18:36,0.5:0.18:65572,0.75:0.18:36,1:0.18:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Min exposure" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Max exposure" Value="2.8">
|
||||
<Spline Keys="0:2:36,0.229167:2:36,0.5:2.8:36,0.770833:2:36,1:2:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Min" Value="4.5">
|
||||
<Spline Keys="0:4.5:0,1:4.5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Max" Value="17">
|
||||
<Spline Keys="0:17:0,1:17:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="EV Auto compensation" Value="1.5">
|
||||
<Spline Keys="0:1.5:0,1:1.5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="Bloom amount" Value="0.1">
|
||||
<Spline Keys="0:1:36,0.229167:1:36,0.5:0.1:36,0.770833:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: grain" Value="0">
|
||||
<Spline Keys="0:0.3:65572,0.229167:0.3:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0.3:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: photofilter color" Color="0,0,0">
|
||||
<Spline Keys="0:(0:0:0):36,0.25:(0:0:0):36,0.5:(0:0:0):458788,0.75:(0:0:0):36,1:(0:0:0):36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Filters: photofilter density" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: focus range" Value="500">
|
||||
<Spline Keys="0:500:36,0.25:500:36,0.5:500:65572,0.75:500:36,1:500:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Dof: blur amount" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 0: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 0: Slope Bias" Value="64">
|
||||
<Spline Keys="0:64:36,0.25:64:36,0.5:64:65572,0.75:64:36,1:64:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 1: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 1: Slope Bias" Value="8">
|
||||
<Spline Keys="0:8:36,0.25:8:36,0.5:8:65572,0.75:8:36,1:8:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 2: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 2: Slope Bias" Value="4">
|
||||
<Spline Keys="0:4:36,0.25:4:36,0.5:4:65572,0.75:4:36,1:4:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 3: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:36,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 3: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:36,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 4: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:65572,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 4: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 5: Bias" Value="0.0099999998">
|
||||
<Spline Keys="0:0.01:0,0.25:0.01:36,0.5:0.01:65572,0.75:0.01:36,1:0.01:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 5: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 6: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 6: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 7: Bias" Value="0.1">
|
||||
<Spline Keys="0:0.1:0,0.25:0.1:36,0.5:0.1:36,0.75:0.1:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Cascade 7: Slope Bias" Value="1">
|
||||
<Spline Keys="0:1:0,0.25:1:36,0.5:1:65572,0.75:1:36,1:1:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Shadow jittering" Value="2.5">
|
||||
<Spline Keys="0:5:36,0.25:2.5:36,0.5:2.5:65572,0.75:2.5:36,1:5:0,"/>
|
||||
</Variable>
|
||||
<Variable Name="HDR dynamic power factor" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:65572,0.75:0:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sky brightening (terrain occlusion)" Value="0">
|
||||
<Spline Keys="0:0:36,0.25:0:36,0.5:0:36,0.75:0:36,1:0:36,"/>
|
||||
</Variable>
|
||||
<Variable Name="Sun color multiplier" Value="10">
|
||||
<Spline Keys="0:0.1:36,0.25:10:36,0.5:10:36,0.75:10:36,1:0.1:36,"/>
|
||||
</Variable>
|
||||
</TimeOfDay>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e6a5435c928079b27796f6b202bbc2623e7e454244ddc099a3cadf33b7cb9e9
|
||||
size 63
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:12ca8f1942331abde4d58724aea22609c8d7951cc415afa6e5f1c550a14e67b0
|
||||
size 363624
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f5b525a410730d84c0b3e97396d392e1e72f4b894742ddef3de4ede5542b0f8e
|
||||
size 86148
|
||||
@@ -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 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8739c76e681f900923b900c9df0ef75cf421d39cabb54650c4b9ad19b6a76d85
|
||||
size 22
|
||||
@@ -1,7 +0,0 @@
|
||||
<Material MtlFlags="2623488" Shader="Watervolume" GenMask="80000013" StringGenMask="" SurfaceType="mat_water" Diffuse="1,1,1,1" Specular="0.27583286,0.27583286,0.27583286,1" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Specular" File="engineassets/textures/water_gloss.dds" Filter="7"/>
|
||||
<Texture Map="Environment" File="nearest_cubemap" TexType="7"/>
|
||||
</Textures>
|
||||
<PublicParams NormalsScale="0.5" GlossMapTilling="1" SoftIntersectionFactor="1" Tilling="0.1" DetailNormalsScale="0.5" GlossMapBias="0" EnvCubeReflMul="16" VertexWaveScale="0.125" DetailTilling="2.5" EnvCubeScale="16" GlossMapScale="1.5" RealtimeReflMul="1" RainTilling="1" WaterFlowSpeed="0.5"/>
|
||||
</Material>
|
||||
@@ -1 +1 @@
|
||||
/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce="es3:1,ios:1,osx_gl:0,pc:0,provo:0"
|
||||
/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce="android:1,ios:1,mac:0,pc:0,provo:0"
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a18fae4040a22d2bb359a8ca642b97bb8f6468eeb52e2826b3b029bd8f1350b6
|
||||
size 5466
|
||||
oid sha256:40949893ed7009eeaa90b7ce6057cb6be9dfaf7b162e3c26ba9dadf985939d7d
|
||||
size 2038
|
||||
|
||||
@@ -114,6 +114,10 @@ endif()
|
||||
# Post-processing
|
||||
################################################################################
|
||||
# The following steps have to be done after all targets are registered:
|
||||
# Defer generation of the StaticModules.inl file which is needed to create the AZ::Module derived class in monolithic
|
||||
# builds until after all the targets are known
|
||||
ly_delayed_generate_static_modules_inl()
|
||||
|
||||
# 1. Add any dependencies registered via ly_enable_gems
|
||||
ly_enable_gems_delayed()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ enum ESystemConfigPlatform
|
||||
{
|
||||
CONFIG_INVALID_PLATFORM = 0,
|
||||
CONFIG_PC = 1,
|
||||
CONFIG_OSX_GL = 2,
|
||||
CONFIG_MAC = 2,
|
||||
CONFIG_OSX_METAL = 3,
|
||||
CONFIG_ANDROID = 4,
|
||||
CONFIG_IOS = 5,
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <IRenderer.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
@@ -84,7 +83,7 @@ public: // types
|
||||
//! If this is not passed then the defaults below are used
|
||||
struct TextOptions
|
||||
{
|
||||
IFFont* font; //!< default is "default"
|
||||
AZStd::string fontName; //!< default is "default"
|
||||
unsigned int effectIndex; //!< default is 0
|
||||
AZ::Vector3 color; //!< default is (1,1,1)
|
||||
HAlign horizontalAlignment; //!< default is HAlign::Left
|
||||
|
||||
@@ -729,7 +729,7 @@ protected: // -------------------------------------------------------------
|
||||
CCmdLine* m_pCmdLine;
|
||||
|
||||
string m_currentLanguageAudio;
|
||||
string m_systemConfigName; // computed from system_(hardwareplatform)_(assetsPlatform) - eg, system_android_es3.cfg or system_android_opengl.cfg or system_windows_pc.cfg
|
||||
string m_systemConfigName; // computed from system_(hardwareplatform)_(assetsPlatform) - eg, system_android_android.cfg or system_windows_pc.cfg
|
||||
|
||||
std::vector< std::pair<CTimeValue, float> > m_updateTimes;
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ public class LumberyardActivity extends NativeActivity
|
||||
boolean useMainObb = GetBooleanResource("use_main_obb");
|
||||
boolean usePatchObb = GetBooleanResource("use_patch_obb");
|
||||
|
||||
if (IsBootstrapInAPK() && (useMainObb || usePatchObb))
|
||||
if (AreAssetsInAPK() && (useMainObb || usePatchObb))
|
||||
{
|
||||
Log.d(TAG, "Using OBB expansion files for game assets");
|
||||
|
||||
@@ -421,12 +421,12 @@ public class LumberyardActivity extends NativeActivity
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
private boolean IsBootstrapInAPK()
|
||||
private boolean AreAssetsInAPK()
|
||||
{
|
||||
try
|
||||
{
|
||||
InputStream bootstrap = getAssets().open("bootstrap.cfg", AssetManager.ACCESS_UNKNOWN);
|
||||
bootstrap.close();
|
||||
InputStream engine = getAssets().open("engine.json", AssetManager.ACCESS_UNKNOWN);
|
||||
engine.close();
|
||||
return true;
|
||||
}
|
||||
catch (IOException exception)
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace AZ
|
||||
}
|
||||
}
|
||||
|
||||
AZ_Assert(false, "Failed to locate the bootstrap.cfg path");
|
||||
AZ_Assert(false, "Failed to locate the engine.json path");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,8 +73,8 @@ namespace AZ
|
||||
//! \return The pointer position of the relative asset path
|
||||
AZ::IO::FixedMaxPath StripApkPrefix(const char* filePath);
|
||||
|
||||
//! Searches application storage and the APK for bootstrap.cfg. Will return nullptr
|
||||
//! if bootstrap.cfg is not found.
|
||||
//! Searches application storage and the APK for engine.json. Will return nullptr
|
||||
//! if engine.json is not found.
|
||||
const char* FindAssetsDirectory();
|
||||
|
||||
//! Calls into Java to show the splash screen on the main UI (Java) thread
|
||||
|
||||
@@ -462,8 +462,6 @@ namespace AZ
|
||||
// for the application root.
|
||||
CalculateAppRoot();
|
||||
|
||||
// Merge the bootstrap.cfg file into the Settings Registry as soon as the OSAllocator has been created.
|
||||
SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(*m_settingsRegistry);
|
||||
SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
|
||||
SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands);
|
||||
SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry);
|
||||
|
||||
@@ -172,78 +172,10 @@ namespace AZ
|
||||
|
||||
//! Rotation modifiers
|
||||
//! @{
|
||||
//! @deprecated Use SetLocalRotation()
|
||||
//! Sets the entity's rotation in the world.
|
||||
//! The origin of the axes is the entity's position in world space.
|
||||
//! @param eulerAnglesRadians A three-dimensional vector, containing Euler angles in radians, to rotate the entity by.
|
||||
virtual void SetRotation([[maybe_unused]] const AZ::Vector3& eulerAnglesRadians) {}
|
||||
|
||||
//! @deprecated Use SetLocalRotation()
|
||||
//! Sets the entity's rotation around the world's X axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The X coordinate Euler angle in radians to use for the entity's rotation.
|
||||
virtual void SetRotationX([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use SetLocalRotation()
|
||||
//! Sets the entity's rotation around the world's Y axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The Y coordinate Euler angle in radians to use for the entity's rotation.
|
||||
virtual void SetRotationY([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use SetLocalRotation()
|
||||
//! Sets the entity's rotation around the world's Z axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The Z coordinate Euler angle in radians to use for the entity's rotation.
|
||||
virtual void SetRotationZ([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use SetLocalRotationQuaternion()
|
||||
//! Sets the entity's rotation in the world in quaternion notation.
|
||||
//! The origin of the axes is the entity's position in world space.
|
||||
//! @param quaternion A quaternion that represents the rotation to use for the entity.
|
||||
virtual void SetRotationQuaternion([[maybe_unused]] const AZ::Quaternion& quaternion) {}
|
||||
|
||||
//! @deprecated Use RotateAroundLocalX()
|
||||
//! Rotates the entity around the world's X axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the X axis.
|
||||
virtual void RotateByX([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use RotateAroundLocalY()
|
||||
//! Rotates the entity around the world's Y axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the Y axis.
|
||||
virtual void RotateByY([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use RotateAroundLocalZ()
|
||||
//! Rotates the entity around the world's Z axis.
|
||||
//! The origin of the axis is the entity's position in world space.
|
||||
//! @param eulerAngleRadians The Euler angle in radians by which to rotate the entity around the Z axis.
|
||||
virtual void RotateByZ([[maybe_unused]] float eulerAngleRadian) {}
|
||||
|
||||
//! @deprecated Use GetLocalRotation()
|
||||
//! Gets the entity's rotation in the world in Euler angles rotation in radians.
|
||||
//! @return A three-dimensional vector, containing Euler angles in radians, that represents the entity's rotation.
|
||||
virtual AZ::Vector3 GetRotationEulerRadians() { return AZ::Vector3(FLT_MAX); }
|
||||
|
||||
//! @deprecated Use GetLocalRotationQuaternion()
|
||||
//! Gets the entity's rotation in the world in quaternion format.
|
||||
//! @return A quaternion that represents the entity's rotation in world space.
|
||||
virtual AZ::Quaternion GetRotationQuaternion() { return AZ::Quaternion::CreateZero(); }
|
||||
|
||||
//! @deprecated Use GetLocalRotation()
|
||||
//! Gets the entity's rotation around the world's X axis.
|
||||
//! @return The Euler angle in radians by which the the entity is rotated around the X axis in world space.
|
||||
virtual float GetRotationX() { return FLT_MAX; }
|
||||
|
||||
//! @deprecated Use GetLocalRotation()
|
||||
//! Gets the entity's rotation around the world's Y axis.
|
||||
//! @return The Euler angle in radians by which the the entity is rotated around the Y axis in world space.
|
||||
virtual float GetRotationY() { return FLT_MAX; }
|
||||
|
||||
//! @deprecated Use GetLocalRotation()
|
||||
//! Gets the entity's rotation around the world's Z axis.
|
||||
//! @return The Euler angle in radians by which the the entity is rotated around the Z axis in world space.
|
||||
virtual float GetRotationZ() { return FLT_MAX; }
|
||||
virtual void SetWorldRotationQuaternion([[maybe_unused]] const AZ::Quaternion& quaternion) {}
|
||||
|
||||
//! Get angles in radian for each principle axis around which the world transform is
|
||||
//! rotated in the order of z-axis and y-axis and then x-axis.
|
||||
|
||||
@@ -126,17 +126,16 @@ namespace AZ
|
||||
m_offsets.fill(1); // Halton sequences start at index 1.
|
||||
m_increments.fill(1); // By default increment by 1 between each number.
|
||||
}
|
||||
|
||||
//! Returns a Halton sequence in an array of N length
|
||||
template<uint32_t N>
|
||||
AZStd::array<AZStd::array<float, Dimensions>, N> GetHaltonSequence()
|
||||
|
||||
//! Fills a provided container from begin to end with a Halton sequence.
|
||||
//! Entries are expected to be, or implicitly converted to, AZStd::array<float, Dimensions>.
|
||||
template<typename Iterator>
|
||||
void FillHaltonSequence(Iterator begin, Iterator end)
|
||||
{
|
||||
AZStd::array<AZStd::array<float, Dimensions>, N> result;
|
||||
|
||||
AZStd::array<uint32_t, Dimensions> indices = m_offsets;
|
||||
|
||||
// Generator that returns the Halton number for all bases for a single entry.
|
||||
auto f = [&] ()
|
||||
auto f = [&]()
|
||||
{
|
||||
AZStd::array<float, Dimensions> item;
|
||||
for (auto d = 0; d < Dimensions; ++d)
|
||||
@@ -147,12 +146,20 @@ namespace AZ
|
||||
return item;
|
||||
};
|
||||
|
||||
AZStd::generate(result.begin(), result.end(), f);
|
||||
AZStd::generate(begin, end, f);
|
||||
}
|
||||
|
||||
//! Returns a Halton sequence in an array of N length.
|
||||
template<uint32_t N>
|
||||
AZStd::array<AZStd::array<float, Dimensions>, N> GetHaltonSequence()
|
||||
{
|
||||
AZStd::array<AZStd::array<float, Dimensions>, N> result;
|
||||
FillHaltonSequence(result.begin(), result.end());
|
||||
return result;
|
||||
}
|
||||
|
||||
//! Sets the offsets per dimension to start generating a sequence from.
|
||||
//! By default, there is no offset (offset of 0 corresponds to starting at index 1)
|
||||
//! By default, there is no offset (offset of 0 corresponds to starting at index 1).
|
||||
void SetOffsets(AZStd::array<uint32_t, Dimensions> offsets)
|
||||
{
|
||||
m_offsets = offsets;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace AZ
|
||||
{
|
||||
inline namespace PlatformDefaults
|
||||
{
|
||||
static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformES3, PlatformIOS, PlatformOSX, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
|
||||
static const char* PlatformNames[PlatformId::NumPlatformIds] = { PlatformPC, PlatformAndroid, PlatformIOS, PlatformMac, PlatformProvo, PlatformSalem, PlatformJasper, PlatformServer, PlatformAll, PlatformAllClient };
|
||||
|
||||
const char* PlatformIdToPalFolder(AZ::PlatformId platform)
|
||||
{
|
||||
@@ -31,11 +31,11 @@ namespace AZ
|
||||
{
|
||||
case AZ::PC:
|
||||
return "PC";
|
||||
case AZ::ES3:
|
||||
case AZ::ANDROID_ID:
|
||||
return "Android";
|
||||
case AZ::IOS:
|
||||
return "iOS";
|
||||
case AZ::OSX:
|
||||
case AZ::MAC:
|
||||
return "Mac";
|
||||
case AZ::PROVO:
|
||||
return "Provo";
|
||||
@@ -66,11 +66,11 @@ namespace AZ
|
||||
}
|
||||
else if (osPlatform == PlatformCodeNameMac)
|
||||
{
|
||||
return PlatformOSX;
|
||||
return PlatformMac;
|
||||
}
|
||||
else if (osPlatform == PlatformCodeNameAndroid)
|
||||
{
|
||||
return PlatformES3;
|
||||
return PlatformAndroid;
|
||||
}
|
||||
else if (osPlatform == PlatformCodeNameiOS)
|
||||
{
|
||||
@@ -207,13 +207,13 @@ namespace AZ
|
||||
platformCodes.emplace_back(PlatformCodeNameWindows);
|
||||
platformCodes.emplace_back(PlatformCodeNameLinux);
|
||||
break;
|
||||
case PlatformId::ES3:
|
||||
case PlatformId::ANDROID_ID:
|
||||
platformCodes.emplace_back(PlatformCodeNameAndroid);
|
||||
break;
|
||||
case PlatformId::IOS:
|
||||
platformCodes.emplace_back(PlatformCodeNameiOS);
|
||||
break;
|
||||
case PlatformId::OSX:
|
||||
case PlatformId::MAC:
|
||||
platformCodes.emplace_back(PlatformCodeNameMac);
|
||||
break;
|
||||
case PlatformId::PROVO:
|
||||
|
||||
@@ -27,9 +27,9 @@ namespace AZ
|
||||
inline namespace PlatformDefaults
|
||||
{
|
||||
constexpr char PlatformPC[] = "pc";
|
||||
constexpr char PlatformES3[] = "es3";
|
||||
constexpr char PlatformAndroid[] = "android";
|
||||
constexpr char PlatformIOS[] = "ios";
|
||||
constexpr char PlatformOSX[] = "osx_gl";
|
||||
constexpr char PlatformMac[] = "mac";
|
||||
constexpr char PlatformProvo[] = "provo";
|
||||
constexpr char PlatformSalem[] = "salem";
|
||||
constexpr char PlatformJasper[] = "jasper";
|
||||
@@ -54,9 +54,9 @@ namespace AZ
|
||||
AZ_ENUM_WITH_UNDERLYING_TYPE(PlatformId, int,
|
||||
(Invalid, -1),
|
||||
PC,
|
||||
ES3,
|
||||
ANDROID_ID,
|
||||
IOS,
|
||||
OSX,
|
||||
MAC,
|
||||
PROVO,
|
||||
SALEM,
|
||||
JASPER,
|
||||
@@ -73,9 +73,9 @@ namespace AZ
|
||||
{
|
||||
Platform_NONE = 0x00,
|
||||
Platform_PC = 1 << PlatformId::PC,
|
||||
Platform_ES3 = 1 << PlatformId::ES3,
|
||||
Platform_ANDROID = 1 << PlatformId::ANDROID_ID,
|
||||
Platform_IOS = 1 << PlatformId::IOS,
|
||||
Platform_OSX = 1 << PlatformId::OSX,
|
||||
Platform_MAC = 1 << PlatformId::MAC,
|
||||
Platform_PROVO = 1 << PlatformId::PROVO,
|
||||
Platform_SALEM = 1 << PlatformId::SALEM,
|
||||
Platform_JASPER = 1 << PlatformId::JASPER,
|
||||
@@ -87,7 +87,7 @@ namespace AZ
|
||||
// A special platform that will always correspond to all non-server platforms, even if new ones are added
|
||||
Platform_ALL_CLIENT = 1ULL << 31,
|
||||
|
||||
AllNamedPlatforms = Platform_PC | Platform_ES3 | Platform_IOS | Platform_OSX | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
|
||||
AllNamedPlatforms = Platform_PC | Platform_ANDROID | Platform_IOS | Platform_MAC | Platform_PROVO | Platform_SALEM | Platform_JASPER | Platform_SERVER,
|
||||
};
|
||||
|
||||
AZ_DEFINE_ENUM_BITWISE_OPERATORS(PlatformFlags);
|
||||
|
||||
@@ -28,8 +28,8 @@ namespace AZ
|
||||
return "Android64";
|
||||
case PlatformID::PLATFORM_APPLE_IOS:
|
||||
return "iOS";
|
||||
case PlatformID::PLATFORM_APPLE_OSX:
|
||||
return "OSX";
|
||||
case PlatformID::PLATFORM_APPLE_MAC:
|
||||
return "Mac";
|
||||
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
|
||||
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
|
||||
case PlatformID::PLATFORM_##PUBLICNAME:\
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace AZ
|
||||
PLATFORM_WINDOWS_64,
|
||||
PLATFORM_LINUX_64,
|
||||
PLATFORM_APPLE_IOS,
|
||||
PLATFORM_APPLE_OSX,
|
||||
PLATFORM_APPLE_MAC,
|
||||
PLATFORM_ANDROID_64, // ARMv8 / 64-bit
|
||||
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
|
||||
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
|
||||
|
||||
@@ -937,7 +937,7 @@ void ScriptSystemComponent::Reflect(ReflectContext* reflection)
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_LINUX_64)>("Linux")
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_ANDROID_64)>("Android64")
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_APPLE_IOS)>("iOS")
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_APPLE_OSX)>("OSX")
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_APPLE_MAC)>("Mac")
|
||||
#if defined(AZ_EXPAND_FOR_RESTRICTED_PLATFORM) || defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
|
||||
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
|
||||
->Enum<static_cast<int>(PlatformID::PLATFORM_##PUBLICNAME)>(#CodeName)
|
||||
|
||||
@@ -523,13 +523,6 @@ namespace AZ::SettingsRegistryMergeUtils
|
||||
return configFileParsed;
|
||||
}
|
||||
|
||||
void MergeSettingsToRegistry_Bootstrap(SettingsRegistryInterface& registry)
|
||||
{
|
||||
ConfigParserSettings parserSettings;
|
||||
parserSettings.m_registryRootPointerPath = BootstrapSettingsRootKey;
|
||||
MergeSettingsToRegistry_ConfigFile(registry, "bootstrap.cfg", parserSettings);
|
||||
}
|
||||
|
||||
void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry)
|
||||
{
|
||||
using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString;
|
||||
|
||||
@@ -172,9 +172,6 @@ namespace AZ::SettingsRegistryMergeUtils
|
||||
bool MergeSettingsToRegistry_ConfigFile(SettingsRegistryInterface& registry, AZStd::string_view filePath,
|
||||
const ConfigParserSettings& configParserSettings);
|
||||
|
||||
//! Loads bootstrap.cfg into the Settings Registry. This file does not support specializations.
|
||||
void MergeSettingsToRegistry_Bootstrap(SettingsRegistryInterface& registry);
|
||||
|
||||
//! Extracts file path information from the environment and bootstrap to calculate the various file paths and adds those
|
||||
//! to the Settings Registry under the FilePathsRootKey.
|
||||
void MergeSettingsToRegistry_AddRuntimeFilePaths(SettingsRegistryInterface& registry);
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace UnitTest
|
||||
EXPECT_FLOAT_EQ(5981.0f / 15625.0f, GetHaltonNumber(4321, 5));
|
||||
}
|
||||
|
||||
TEST(MATH_Random, HaltonSequence)
|
||||
TEST(MATH_Random, HaltonSequenceStandard)
|
||||
{
|
||||
HaltonSequence<3> sequence({ 2, 3, 5 });
|
||||
auto regularSequence = sequence.GetHaltonSequence<5>();
|
||||
@@ -48,7 +48,11 @@ namespace UnitTest
|
||||
EXPECT_FLOAT_EQ(5.0f / 8.0f, regularSequence[4][0]);
|
||||
EXPECT_FLOAT_EQ(7.0f / 9.0f, regularSequence[4][1]);
|
||||
EXPECT_FLOAT_EQ(1.0f / 25.0f, regularSequence[4][2]);
|
||||
|
||||
}
|
||||
|
||||
TEST(MATH_Random, HaltonSequenceOffsets)
|
||||
{
|
||||
HaltonSequence<3> sequence({ 2, 3, 5 });
|
||||
sequence.SetOffsets({ 1, 2, 3 });
|
||||
auto offsetSequence = sequence.GetHaltonSequence<2>();
|
||||
|
||||
@@ -59,10 +63,15 @@ namespace UnitTest
|
||||
EXPECT_FLOAT_EQ(3.0f / 4.0f, offsetSequence[1][0]);
|
||||
EXPECT_FLOAT_EQ(4.0f / 9.0f, offsetSequence[1][1]);
|
||||
EXPECT_FLOAT_EQ(1.0f / 25.0f, offsetSequence[1][2]);
|
||||
|
||||
}
|
||||
|
||||
TEST(MATH_Random, HaltonSequenceIncrements)
|
||||
{
|
||||
HaltonSequence<3> sequence({ 2, 3, 5 });
|
||||
sequence.SetOffsets({ 1, 2, 3 });
|
||||
sequence.SetIncrements({ 1, 2, 3 });
|
||||
auto incrementedSequence = sequence.GetHaltonSequence<2>();
|
||||
|
||||
|
||||
EXPECT_FLOAT_EQ(1.0f / 4.0f, incrementedSequence[0][0]);
|
||||
EXPECT_FLOAT_EQ(1.0f / 9.0f, incrementedSequence[0][1]);
|
||||
EXPECT_FLOAT_EQ(4.0f / 5.0f, incrementedSequence[0][2]);
|
||||
@@ -71,4 +80,35 @@ namespace UnitTest
|
||||
EXPECT_FLOAT_EQ(7.0f / 9.0f, incrementedSequence[1][1]);
|
||||
EXPECT_FLOAT_EQ(11.0f / 25.0f, incrementedSequence[1][2]);
|
||||
}
|
||||
|
||||
TEST(MATH_Random, FillHaltonSequence)
|
||||
{
|
||||
HaltonSequence<3> sequence({ 2, 3, 5 });
|
||||
auto regularSequence = sequence.GetHaltonSequence<5>();
|
||||
|
||||
struct Point
|
||||
{
|
||||
Point() = default;
|
||||
Point(AZStd::array<float, 3> arr)
|
||||
:x(arr[0])
|
||||
,y(arr[1])
|
||||
,z(arr[2])
|
||||
{}
|
||||
|
||||
float x = 0.0f;
|
||||
float y = 0.0f;
|
||||
float z = 0.0f;
|
||||
};
|
||||
|
||||
AZStd::array<Point, 5> ownedContainer;
|
||||
sequence.FillHaltonSequence(ownedContainer.begin(), ownedContainer.end());
|
||||
|
||||
for (size_t i = 0; i < regularSequence.size(); ++i)
|
||||
{
|
||||
EXPECT_FLOAT_EQ(regularSequence[i][0], ownedContainer[i].x);
|
||||
EXPECT_FLOAT_EQ(regularSequence[i][1], ownedContainer[i].y);
|
||||
EXPECT_FLOAT_EQ(regularSequence[i][2], ownedContainer[i].z);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace JsonSerializationTests
|
||||
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
|
||||
AZ::Transform expectedTransform =
|
||||
AZ::Transform::CreateFromQuaternion(AZ::Quaternion(0.25f, 0.5f, 0.75f, 1.0f));
|
||||
expectedTransform.SetScale(AZ::Vector3(5.5f));
|
||||
expectedTransform.SetUniformScale(5.5f);
|
||||
|
||||
rapidjson::Document json;
|
||||
json.Parse(R"({ "Rotation": [ 0.25, 0.5, 0.75, 1.0 ], "Scale": 5.5 })");
|
||||
@@ -128,7 +128,7 @@ namespace JsonSerializationTests
|
||||
{
|
||||
AZ::Transform testTransform = AZ::Transform::CreateIdentity();
|
||||
AZ::Transform expectedTransform = AZ::Transform::CreateTranslation(AZ::Vector3(2.25f, 3.5f, 4.75f));
|
||||
expectedTransform.SetScale(AZ::Vector3(5.5f));
|
||||
expectedTransform.SetUniformScale(5.5f);
|
||||
|
||||
rapidjson::Document json;
|
||||
json.Parse(R"({ "Translation": [ 2.25, 3.5, 4.75 ], "Scale": 5.5 })");
|
||||
|
||||
@@ -372,15 +372,15 @@ mac_remote_filesystem=0
|
||||
-- We need to know this before we establish VFS because different platform assets
|
||||
-- are stored in different root folders in the cache. These correspond to the names
|
||||
-- In the asset processor config file. This value also controls what config file is read
|
||||
-- when you read system_xxxx_xxxx.cfg (for example, system_windows_pc.cfg or system_android_es3.cfg)
|
||||
-- when you read system_xxxx_xxxx.cfg (for example, system_windows_pc.cfg or system_android_android.cfg)
|
||||
-- by default, pc assets (in the 'pc' folder) are used, with RC being fed 'pc' as the platform
|
||||
-- by default on console we use the default assets=pc for better iteration times
|
||||
-- we should turn on console specific assets only when in release and/or testing assets and/or loading performance
|
||||
-- that way most people will not need to have 3 different caches taking up disk space
|
||||
assets = pc
|
||||
android_assets = es3
|
||||
android_assets = android
|
||||
ios_assets = ios
|
||||
mac_assets = osx_gl
|
||||
mac_assets = mac
|
||||
|
||||
-- Add the IP address of your console to the white list that will connect to the asset processor here
|
||||
-- You can list addresses or CIDR's. CIDR's are helpful if you are using DHCP. A CIDR looks like an ip address with
|
||||
@@ -438,9 +438,9 @@ mac_wait_for_connect=0
|
||||
ConfigFileParams::SettingsKeyValuePair{"/ios_remote_filesystem", AZ::s64{0}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/mac_remote_filesystem", AZ::s64{0}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/assets", AZStd::string_view{"pc"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/android_assets", AZStd::string_view{"es3"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/android_assets", AZStd::string_view{"android"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/ios_assets", AZStd::string_view{"ios"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/mac_assets", AZStd::string_view{"osx_gl"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/mac_assets", AZStd::string_view{"mac"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/connect_to_remote", AZ::s64{0}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/windows_connect_to_remote", AZ::s64{1}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/android_connect_to_remote", AZ::s64{0}},
|
||||
@@ -478,20 +478,20 @@ test_asset_processor_tag = test_value
|
||||
[Platform pc]
|
||||
tags=tools,renderer,dx12,vulkan
|
||||
|
||||
[Platform es3]
|
||||
[Platform android]
|
||||
tags=android,mobile,renderer,vulkan ; With Comments at the end
|
||||
|
||||
[Platform ios]
|
||||
tags=mobile,renderer,metal
|
||||
|
||||
[Platform osx_gl]
|
||||
[Platform mac]
|
||||
tags=tools,renderer,metal)"
|
||||
, AZStd::fixed_vector<ConfigFileParams::SettingsKeyValuePair, 20>{
|
||||
ConfigFileParams::SettingsKeyValuePair{"/test_asset_processor_tag", AZStd::string_view{"test_value"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform pc/tags", AZStd::string_view{"tools,renderer,dx12,vulkan"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform es3/tags", AZStd::string_view{"android,mobile,renderer,vulkan"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform android/tags", AZStd::string_view{"android,mobile,renderer,vulkan"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform ios/tags", AZStd::string_view{"mobile,renderer,metal"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform osx_gl/tags", AZStd::string_view{"tools,renderer,metal"}},
|
||||
ConfigFileParams::SettingsKeyValuePair{"/Platform mac/tags", AZStd::string_view{"tools,renderer,metal"}},
|
||||
}}
|
||||
)
|
||||
);
|
||||
|
||||
@@ -679,8 +679,6 @@ namespace AzFramework
|
||||
{
|
||||
auto fileIoBase = m_archiveFileIO.get();
|
||||
// Set up the default file aliases based on the settings registry
|
||||
fileIoBase->SetAlias("@assets@", "");
|
||||
fileIoBase->SetAlias("@root@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@engroot@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@projectroot@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@exefolder@", GetExecutableFolder());
|
||||
@@ -694,8 +692,8 @@ namespace AzFramework
|
||||
pathAliases.clear();
|
||||
if (m_settingsRegistry->Get(pathAliases.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder))
|
||||
{
|
||||
fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@assets@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@root@", pathAliases.c_str()); // Deprecated Use @projectplatformcache@
|
||||
}
|
||||
pathAliases.clear();
|
||||
|
||||
@@ -308,6 +308,56 @@ namespace AzFramework
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
GenerateRelativeSourcePathRequest::GenerateRelativeSourcePathRequest(const AZ::OSString& sourcePath)
|
||||
{
|
||||
AZ_Assert(!sourcePath.empty(), "GenerateRelativeSourcePathRequest: asset path is empty");
|
||||
m_sourcePath = sourcePath;
|
||||
}
|
||||
|
||||
unsigned int GenerateRelativeSourcePathRequest::GetMessageType() const
|
||||
{
|
||||
return MessageType;
|
||||
}
|
||||
|
||||
void GenerateRelativeSourcePathRequest::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
auto serialize = azrtti_cast<AZ::SerializeContext*>(context);
|
||||
if (serialize)
|
||||
{
|
||||
serialize->Class<GenerateRelativeSourcePathRequest, BaseAssetProcessorMessage>()
|
||||
->Version(1)
|
||||
->Field("SourcePath", &GenerateRelativeSourcePathRequest::m_sourcePath);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
GenerateRelativeSourcePathResponse::GenerateRelativeSourcePathResponse(
|
||||
bool resolved, const AZ::OSString& relativeSourcePath, const AZ::OSString& rootFolder)
|
||||
{
|
||||
m_relativeSourcePath = relativeSourcePath;
|
||||
m_resolved = resolved;
|
||||
m_rootFolder = rootFolder;
|
||||
}
|
||||
|
||||
unsigned int GenerateRelativeSourcePathResponse::GetMessageType() const
|
||||
{
|
||||
return GenerateRelativeSourcePathRequest::MessageType;
|
||||
}
|
||||
|
||||
void GenerateRelativeSourcePathResponse::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
auto serialize = azrtti_cast<AZ::SerializeContext*>(context);
|
||||
if (serialize)
|
||||
{
|
||||
serialize->Class<GenerateRelativeSourcePathResponse, BaseAssetProcessorMessage>()
|
||||
->Version(1)
|
||||
->Field("RelativeSourcePath", &GenerateRelativeSourcePathResponse::m_relativeSourcePath)
|
||||
->Field("RootFolder", &GenerateRelativeSourcePathResponse::m_rootFolder)
|
||||
->Field("Resolved", &GenerateRelativeSourcePathResponse::m_resolved);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
GetFullSourcePathFromRelativeProductPathRequest::GetFullSourcePathFromRelativeProductPathRequest(const AZ::OSString& relativeProductPath)
|
||||
{
|
||||
|
||||
@@ -288,6 +288,45 @@ namespace AzFramework
|
||||
bool m_resolved;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class GenerateRelativeSourcePathRequest : public BaseAssetProcessorMessage
|
||||
{
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(GenerateRelativeSourcePathRequest, AZ::OSAllocator, 0);
|
||||
AZ_RTTI(GenerateRelativeSourcePathRequest, "{B3865033-F5A3-4749-8147-7B1AB04D5F6D}",
|
||||
BaseAssetProcessorMessage);
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
// For people that are debugging the network messages and just see MessageType as a value,
|
||||
// the CRC value below is 739777771 (0x2C181CEB)
|
||||
static constexpr unsigned int MessageType =
|
||||
AZ_CRC_CE("AssetSystem::GenerateRelativeSourcePathRequest");
|
||||
|
||||
GenerateRelativeSourcePathRequest() = default;
|
||||
GenerateRelativeSourcePathRequest(const AZ::OSString& sourcePath);
|
||||
unsigned int GetMessageType() const override;
|
||||
|
||||
AZ::OSString m_sourcePath;
|
||||
};
|
||||
|
||||
class GenerateRelativeSourcePathResponse : public BaseAssetProcessorMessage
|
||||
{
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(GenerateRelativeSourcePathResponse, AZ::OSAllocator, 0);
|
||||
AZ_RTTI(GenerateRelativeSourcePathResponse, "{938D33DB-C8F6-4FA4-BC81-2F139A9BE1D7}",
|
||||
BaseAssetProcessorMessage);
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
GenerateRelativeSourcePathResponse() = default;
|
||||
GenerateRelativeSourcePathResponse(
|
||||
bool resolved, const AZ::OSString& relativeSourcePath, const AZ::OSString& rootFolder);
|
||||
unsigned int GetMessageType() const override;
|
||||
|
||||
AZ::OSString m_relativeSourcePath;
|
||||
AZ::OSString m_rootFolder; ///< This is the folder it was found in (the watched/scanned folder, such as gems /assets/ folder)
|
||||
bool m_resolved;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
class GetFullSourcePathFromRelativeProductPathRequest
|
||||
: public BaseAssetProcessorMessage
|
||||
|
||||
@@ -202,6 +202,7 @@ namespace AzFramework
|
||||
// Requests
|
||||
GetUnresolvedDependencyCountsRequest::Reflect(context);
|
||||
GetRelativeProductPathFromFullSourceOrProductPathRequest::Reflect(context);
|
||||
GenerateRelativeSourcePathRequest::Reflect(context);
|
||||
GetFullSourcePathFromRelativeProductPathRequest::Reflect(context);
|
||||
SourceAssetInfoRequest::Reflect(context);
|
||||
AssetInfoRequest::Reflect(context);
|
||||
@@ -234,6 +235,7 @@ namespace AzFramework
|
||||
// Responses
|
||||
GetUnresolvedDependencyCountsResponse::Reflect(context);
|
||||
GetRelativeProductPathFromFullSourceOrProductPathResponse::Reflect(context);
|
||||
GenerateRelativeSourcePathResponse::Reflect(context);
|
||||
GetFullSourcePathFromRelativeProductPathResponse::Reflect(context);
|
||||
SourceAssetInfoResponse::Reflect(context);
|
||||
AssetInfoResponse::Reflect(context);
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/EditContextConstants.inl>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
@@ -64,15 +64,13 @@ namespace AzFramework
|
||||
the EditContext. TController can friend itself to the editor component to make this work if required.
|
||||
*/
|
||||
template<typename TController, typename TConfiguration = AZ::ComponentConfig>
|
||||
class ComponentAdapter
|
||||
: public AZ::Component
|
||||
class ComponentAdapter : public AZ::Component
|
||||
{
|
||||
public:
|
||||
|
||||
AZ_RTTI((ComponentAdapter, "{644A9187-4FDB-42C1-9D59-DD75304B551A}", TController, TConfiguration), AZ::Component);
|
||||
|
||||
ComponentAdapter() = default;
|
||||
ComponentAdapter(const TConfiguration& configuration);
|
||||
explicit ComponentAdapter(const TConfiguration& configuration);
|
||||
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
@@ -85,7 +83,6 @@ namespace AzFramework
|
||||
void Deactivate() override;
|
||||
|
||||
protected:
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
// AZ::Component overrides ...
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/Components/ComponentAdapterHelpers.h>
|
||||
|
||||
@@ -32,10 +32,12 @@ namespace AzFramework
|
||||
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
// clang-format off
|
||||
serializeContext->Class<ComponentAdapter, Component>()
|
||||
->Version(1)
|
||||
->Field("Controller", &ComponentAdapter::m_controller)
|
||||
;
|
||||
// clang-format on
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,9 +68,6 @@ namespace AzFramework
|
||||
GetDependentServicesHelper<TController>(services, typename AZ::HasComponentDependentServices<TController>::type());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// AZ::Component interface implementation
|
||||
|
||||
template<typename TController, typename TConfiguration>
|
||||
void ComponentAdapter<TController, TConfiguration>::Init()
|
||||
{
|
||||
@@ -78,7 +77,7 @@ namespace AzFramework
|
||||
template<typename TController, typename TConfiguration>
|
||||
void ComponentAdapter<TController, TConfiguration>::Activate()
|
||||
{
|
||||
m_controller.Activate(GetEntityId());
|
||||
ComponentActivateHelper<TController>::Activate(m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
|
||||
}
|
||||
|
||||
template<typename TController, typename TConfiguration>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/Component.h>
|
||||
#include <AzCore/Component/EntityBus.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
@@ -27,18 +28,43 @@ namespace AzFramework
|
||||
template<typename T, typename = void>
|
||||
struct ComponentInitHelper
|
||||
{
|
||||
static void Init(T& common)
|
||||
static void Init([[maybe_unused]] T& controller)
|
||||
{
|
||||
AZ_UNUSED(common);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ComponentInitHelper<T, AZStd::void_t<decltype(AZStd::declval<T>().Init())>>
|
||||
{
|
||||
static void Init(T& common)
|
||||
static void Init(T& controller)
|
||||
{
|
||||
common.Init();
|
||||
controller.Init();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T, typename = void>
|
||||
struct ComponentActivateHelper
|
||||
{
|
||||
static void Activate([[maybe_unused]] T& controller, [[maybe_unused]] const AZ::EntityComponentIdPair& entityComponentIdPair)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ComponentActivateHelper<T, AZStd::void_t<decltype(AZStd::declval<T>().Activate(AZ::EntityId()))>>
|
||||
{
|
||||
static void Activate(T& controller, const AZ::EntityComponentIdPair& entityComponentIdPair)
|
||||
{
|
||||
controller.Activate(entityComponentIdPair.GetEntityId());
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ComponentActivateHelper<T, AZStd::void_t<decltype(AZStd::declval<T>().Activate(AZ::EntityComponentIdPair()))>>
|
||||
{
|
||||
static void Activate(T& controller, const AZ::EntityComponentIdPair& entityComponentIdPair)
|
||||
{
|
||||
controller.Activate(entityComponentIdPair);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -327,99 +327,13 @@ namespace AzFramework
|
||||
return localZ;
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotation(const AZ::Vector3& eulerAnglesRadian)
|
||||
void TransformComponent::SetWorldRotationQuaternion(const AZ::Quaternion& quaternion)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetRotation is deprecated, please use SetLocalRotation");
|
||||
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetRotation(AZ::ConvertEulerRadiansToQuaternion(eulerAnglesRadian));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationQuaternion(const AZ::Quaternion& quaternion)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetRotationQuaternion is deprecated, please use SetLocalRotationQuaternion");
|
||||
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetRotation(quaternion);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationX(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetRotationX is deprecated, please use SetLocalRotation");
|
||||
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationX(eulerAngleRadian));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationY(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetRotationY is deprecated, please use SetLocalRotation");
|
||||
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationY(eulerAngleRadian));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationZ(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetRotationZ is deprecated, please use SetLocalRotation");
|
||||
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationZ(eulerAngleRadian));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByX(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "RotateByX is deprecated, please use RotateAroundLocalX");
|
||||
RotateAroundLocalX(eulerAngleRadian);
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByY(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "RotateByY is deprecated, please use RotateAroundLocalY");
|
||||
RotateAroundLocalY(eulerAngleRadian);
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByZ(float eulerAngleRadian)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "RotateByZ is deprecated, please use RotateAroundLocalZ");
|
||||
RotateAroundLocalZ(eulerAngleRadian);
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetRotationEulerRadians()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetRotationEulerRadians is deprecated, please use GetWorldRotation");
|
||||
return m_worldTM.GetRotation().GetEulerRadians();
|
||||
}
|
||||
|
||||
AZ::Quaternion TransformComponent::GetRotationQuaternion()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetRotationQuaternion is deprecated, please use GetWorldRotationQuaternion");
|
||||
return m_worldTM.GetRotation();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationX()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetRotationX is deprecated, please use GetWorldRotation");
|
||||
return GetRotationEulerRadians().GetX();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationY()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetRotationY is deprecated, please use GetWorldRotation");
|
||||
return GetRotationEulerRadians().GetY();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationZ()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetRotationZ is deprecated, please use GetWorldRotation");
|
||||
return GetRotationEulerRadians().GetZ();
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetWorldRotation()
|
||||
{
|
||||
return m_worldTM.GetRotation().GetEulerRadians();
|
||||
@@ -830,45 +744,7 @@ namespace AzFramework
|
||||
->Event("GetLocalX", &AZ::TransformBus::Events::GetLocalX)
|
||||
->Event("GetLocalY", &AZ::TransformBus::Events::GetLocalY)
|
||||
->Event("GetLocalZ", &AZ::TransformBus::Events::GetLocalZ)
|
||||
->Event("RotateByX", &AZ::TransformBus::Events::RotateByX)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("RotateByY", &AZ::TransformBus::Events::RotateByY)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("RotateByZ", &AZ::TransformBus::Events::RotateByZ)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetEulerRotation", &AZ::TransformBus::Events::SetRotation)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetRotationQuaternion", &AZ::TransformBus::Events::SetRotationQuaternion)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetRotationX", &AZ::TransformBus::Events::SetRotationX)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetRotationY", &AZ::TransformBus::Events::SetRotationY)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetRotationZ", &AZ::TransformBus::Events::SetRotationZ)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetEulerRotation", &AZ::TransformBus::Events::GetRotationEulerRadians)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetRotationQuaternion", &AZ::TransformBus::Events::GetRotationQuaternion)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetRotationX", &AZ::TransformBus::Events::GetRotationX)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetRotationY", &AZ::TransformBus::Events::GetRotationY)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetRotationZ", &AZ::TransformBus::Events::GetRotationZ)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetWorldRotationQuaternion", &AZ::TransformBus::Events::SetWorldRotationQuaternion)
|
||||
->Event("GetWorldRotation", &AZ::TransformBus::Events::GetWorldRotation)
|
||||
->Event("GetWorldRotationQuaternion", &AZ::TransformBus::Events::GetWorldRotationQuaternion)
|
||||
->Event("SetLocalRotation", &AZ::TransformBus::Events::SetLocalRotation)
|
||||
|
||||
@@ -112,22 +112,7 @@ namespace AzFramework
|
||||
float GetLocalZ() override;
|
||||
|
||||
// Rotation modifiers
|
||||
void SetRotation(const AZ::Vector3& eulerAnglesRadian) override;
|
||||
void SetRotationQuaternion(const AZ::Quaternion& quaternion) override;
|
||||
void SetRotationX(float eulerAngleRadian) override;
|
||||
void SetRotationY(float eulerAngleRadian) override;
|
||||
void SetRotationZ(float eulerAngleRadian) override;
|
||||
|
||||
void RotateByX(float eulerAngleRadian) override;
|
||||
void RotateByY(float eulerAngleRadian) override;
|
||||
void RotateByZ(float eulerAngleRadian) override;
|
||||
|
||||
AZ::Vector3 GetRotationEulerRadians() override;
|
||||
AZ::Quaternion GetRotationQuaternion() override;
|
||||
|
||||
float GetRotationX() override;
|
||||
float GetRotationY() override;
|
||||
float GetRotationZ() override;
|
||||
void SetWorldRotationQuaternion(const AZ::Quaternion& quaternion) override;
|
||||
|
||||
AZ::Vector3 GetWorldRotation() override;
|
||||
AZ::Quaternion GetWorldRotationQuaternion() override;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
#include <AzCore/Math/Matrix3x4.h>
|
||||
#include <AzCore/std/string/string_view.h>
|
||||
#include <AzFramework/Viewport/ViewportId.h>
|
||||
|
||||
@@ -42,11 +43,15 @@ namespace AzFramework
|
||||
{
|
||||
ViewportId m_drawViewportId = InvalidViewportId; //!< Viewport to draw into
|
||||
AZ::Vector3 m_position; //!< world space position for 3d draws, screen space x,y,depth for 2d.
|
||||
AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
|
||||
AZ::Color m_color = AZ::Colors::White; //!< Color to draw the text
|
||||
unsigned int m_effectIndex = 0; //!< effect index to apply
|
||||
AZ::Vector2 m_scale = AZ::Vector2(1.0f); //!< font scale
|
||||
float m_lineSpacing; //!< Spacing between new lines, as a percentage of m_scale.
|
||||
float m_textSizeFactor = 12.0f; //!< font size in pixels
|
||||
float m_lineSpacing = 1.0f; //!< Spacing between new lines, as a percentage of m_scale.
|
||||
TextHorizontalAlignment m_hAlign = TextHorizontalAlignment::Left; //!< Horizontal text alignment
|
||||
TextVerticalAlignment m_vAlign = TextVerticalAlignment::Top; //!< Vertical text alignment
|
||||
bool m_useTransform = false; //!< Use specified transform
|
||||
AZ::Matrix3x4 m_transform = AZ::Matrix3x4::Identity(); //!< Transform to apply to text quads
|
||||
bool m_monospace = false; //!< disable character proportional spacing
|
||||
bool m_depthTest = false; //!< Test character against the depth buffer
|
||||
bool m_virtual800x600ScreenSize = true; //!< Text placement and size are scaled relative to a virtual 800x600 resolution
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Physics
|
||||
|
||||
/// Is the ragdoll currently simulated?
|
||||
/// @result True in case the ragdoll is simulated, false if not.
|
||||
virtual bool IsSimulated() = 0;
|
||||
virtual bool IsSimulated() const = 0;
|
||||
|
||||
/// Writes the state for all of the bodies in the ragdoll to the provided output.
|
||||
/// The caller owns the output state and can safely manipulate it without affecting the physics simulation.
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace AzFramework::ProjectManager
|
||||
// Store the Command line to the Setting Registry
|
||||
AZ::SettingsRegistryImpl settingsRegistry;
|
||||
AZ::SettingsRegistryMergeUtils::StoreCommandLineToRegistry(settingsRegistry, commandLine);
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(settingsRegistry);
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
|
||||
// Retrieve Command Line from Settings Registry, it may have been updated by the call to FindEngineRoot()
|
||||
// in MergeSettingstoRegistry_ConfigFile
|
||||
|
||||
@@ -19,10 +19,13 @@
|
||||
#include <AzCore/std/smart_ptr/unique_ptr.h>
|
||||
#include <AzFramework/Spawnable/SpawnableMetaData.h>
|
||||
|
||||
namespace AzFramework
|
||||
namespace AZ
|
||||
{
|
||||
class ReflectContext;
|
||||
}
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
class Spawnable final
|
||||
: public AZ::Data::AssetData
|
||||
{
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
//
|
||||
// SpawnableEntityContainerView
|
||||
//
|
||||
|
||||
SpawnableEntityContainerView::SpawnableEntityContainerView(AZ::Entity** begin, size_t length)
|
||||
: m_begin(begin)
|
||||
, m_end(begin + length)
|
||||
@@ -52,6 +56,9 @@ namespace AzFramework
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SpawnableConstEntityContainerView
|
||||
//
|
||||
|
||||
SpawnableConstEntityContainerView::SpawnableConstEntityContainerView(AZ::Entity** begin, size_t length)
|
||||
: m_begin(begin)
|
||||
@@ -91,6 +98,136 @@ namespace AzFramework
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SpawnableIndexEntityPair
|
||||
//
|
||||
|
||||
SpawnableIndexEntityPair::SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator)
|
||||
: m_entity(entityIterator)
|
||||
, m_index(indexIterator)
|
||||
{
|
||||
}
|
||||
|
||||
AZ::Entity* SpawnableIndexEntityPair::GetEntity()
|
||||
{
|
||||
return *m_entity;
|
||||
}
|
||||
|
||||
const AZ::Entity* SpawnableIndexEntityPair::GetEntity() const
|
||||
{
|
||||
return *m_entity;
|
||||
}
|
||||
|
||||
size_t SpawnableIndexEntityPair::GetIndex() const
|
||||
{
|
||||
return *m_index;
|
||||
}
|
||||
|
||||
//
|
||||
// SpawnableIndexEntityIterator
|
||||
//
|
||||
|
||||
SpawnableIndexEntityIterator::SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator)
|
||||
: m_value(entityIterator, indexIterator)
|
||||
{
|
||||
}
|
||||
|
||||
SpawnableIndexEntityIterator& SpawnableIndexEntityIterator::operator++()
|
||||
{
|
||||
++m_value.m_entity;
|
||||
++m_value.m_index;
|
||||
return *this;
|
||||
}
|
||||
|
||||
SpawnableIndexEntityIterator SpawnableIndexEntityIterator::operator++(int)
|
||||
{
|
||||
SpawnableIndexEntityIterator result = *this;
|
||||
++m_value.m_entity;
|
||||
++m_value.m_index;
|
||||
return result;
|
||||
}
|
||||
|
||||
SpawnableIndexEntityIterator& SpawnableIndexEntityIterator::operator--()
|
||||
{
|
||||
--m_value.m_entity;
|
||||
--m_value.m_index;
|
||||
return *this;
|
||||
}
|
||||
|
||||
SpawnableIndexEntityIterator SpawnableIndexEntityIterator::operator--(int)
|
||||
{
|
||||
SpawnableIndexEntityIterator result = *this;
|
||||
--m_value.m_entity;
|
||||
--m_value.m_index;
|
||||
return result;
|
||||
}
|
||||
|
||||
bool SpawnableIndexEntityIterator::operator==(const SpawnableIndexEntityIterator& rhs)
|
||||
{
|
||||
return m_value.m_entity == rhs.m_value.m_entity && m_value.m_index == rhs.m_value.m_index;
|
||||
}
|
||||
|
||||
bool SpawnableIndexEntityIterator::operator!=(const SpawnableIndexEntityIterator& rhs)
|
||||
{
|
||||
return m_value.m_entity != rhs.m_value.m_entity || m_value.m_index != rhs.m_value.m_index;
|
||||
}
|
||||
|
||||
SpawnableIndexEntityPair& SpawnableIndexEntityIterator::operator*()
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityPair& SpawnableIndexEntityIterator::operator*() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
SpawnableIndexEntityPair* SpawnableIndexEntityIterator::operator->()
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityPair* SpawnableIndexEntityIterator::operator->() const
|
||||
{
|
||||
return &m_value;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// SpawnableConstIndexEntityContainerView
|
||||
//
|
||||
|
||||
SpawnableConstIndexEntityContainerView::SpawnableConstIndexEntityContainerView(
|
||||
AZ::Entity** beginEntity, size_t* beginIndices, size_t length)
|
||||
: m_begin(beginEntity, beginIndices)
|
||||
, m_end(beginEntity + length, beginIndices + length)
|
||||
{
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::begin()
|
||||
{
|
||||
return m_begin;
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::end()
|
||||
{
|
||||
return m_end;
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::cbegin()
|
||||
{
|
||||
return m_begin;
|
||||
}
|
||||
|
||||
const SpawnableIndexEntityIterator& SpawnableConstIndexEntityContainerView::cend()
|
||||
{
|
||||
return m_end;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// EntitySpawnTicket
|
||||
//
|
||||
|
||||
EntitySpawnTicket::EntitySpawnTicket(EntitySpawnTicket&& rhs)
|
||||
: m_payload(rhs.m_payload)
|
||||
|
||||
@@ -58,6 +58,72 @@ namespace AzFramework
|
||||
AZ::Entity** m_end;
|
||||
};
|
||||
|
||||
class SpawnableIndexEntityPair
|
||||
{
|
||||
public:
|
||||
friend class SpawnableIndexEntityIterator;
|
||||
|
||||
AZ::Entity* GetEntity();
|
||||
const AZ::Entity* GetEntity() const;
|
||||
size_t GetIndex() const;
|
||||
|
||||
private:
|
||||
SpawnableIndexEntityPair() = default;
|
||||
SpawnableIndexEntityPair(const SpawnableIndexEntityPair&) = default;
|
||||
SpawnableIndexEntityPair(SpawnableIndexEntityPair&&) = default;
|
||||
SpawnableIndexEntityPair(AZ::Entity** entityIterator, size_t* indexIterator);
|
||||
|
||||
SpawnableIndexEntityPair& operator=(const SpawnableIndexEntityPair&) = default;
|
||||
SpawnableIndexEntityPair& operator=(SpawnableIndexEntityPair&&) = default;
|
||||
|
||||
AZ::Entity** m_entity { nullptr };
|
||||
size_t* m_index { nullptr };
|
||||
};
|
||||
|
||||
class SpawnableIndexEntityIterator
|
||||
{
|
||||
public:
|
||||
// Limited to bidirectional iterator as there's no use case for extending it further, but can be extended if a use case is found.
|
||||
using iterator_category = AZStd::bidirectional_iterator_tag;
|
||||
using value_type = SpawnableIndexEntityPair;
|
||||
using difference_type = size_t;
|
||||
using pointer = SpawnableIndexEntityPair*;
|
||||
using reference = SpawnableIndexEntityPair&;
|
||||
|
||||
SpawnableIndexEntityIterator(AZ::Entity** entityIterator, size_t* indexIterator);
|
||||
|
||||
SpawnableIndexEntityIterator& operator++();
|
||||
SpawnableIndexEntityIterator operator++(int);
|
||||
SpawnableIndexEntityIterator& operator--();
|
||||
SpawnableIndexEntityIterator operator--(int);
|
||||
|
||||
bool operator==(const SpawnableIndexEntityIterator& rhs);
|
||||
bool operator!=(const SpawnableIndexEntityIterator& rhs);
|
||||
|
||||
SpawnableIndexEntityPair& operator*();
|
||||
const SpawnableIndexEntityPair& operator*() const;
|
||||
SpawnableIndexEntityPair* operator->();
|
||||
const SpawnableIndexEntityPair* operator->() const;
|
||||
|
||||
private:
|
||||
SpawnableIndexEntityPair m_value;
|
||||
};
|
||||
|
||||
class SpawnableConstIndexEntityContainerView
|
||||
{
|
||||
public:
|
||||
SpawnableConstIndexEntityContainerView(AZ::Entity** beginEntity, size_t* beginIndices, size_t length);
|
||||
|
||||
const SpawnableIndexEntityIterator& begin();
|
||||
const SpawnableIndexEntityIterator& end();
|
||||
const SpawnableIndexEntityIterator& cbegin();
|
||||
const SpawnableIndexEntityIterator& cend();
|
||||
|
||||
private:
|
||||
SpawnableIndexEntityIterator m_begin;
|
||||
SpawnableIndexEntityIterator m_end;
|
||||
};
|
||||
|
||||
//! Requests to the SpawnableEntitiesInterface require a ticket with a valid spawnable that be used as a template. A ticket can
|
||||
//! be reused for multiple calls on the same spawnable and is safe to use by multiple threads at the same time. Entities created
|
||||
//! from the spawnable may be tracked by the ticket and so using the same ticket is needed to despawn the exact entities created
|
||||
@@ -88,6 +154,7 @@ namespace AzFramework
|
||||
using EntityDespawnCallback = AZStd::function<void(EntitySpawnTicket&)>;
|
||||
using ReloadSpawnableCallback = AZStd::function<void(EntitySpawnTicket&, SpawnableConstEntityContainerView)>;
|
||||
using ListEntitiesCallback = AZStd::function<void(EntitySpawnTicket&, SpawnableConstEntityContainerView)>;
|
||||
using ListIndicesEntitiesCallback = AZStd::function<void(EntitySpawnTicket&, SpawnableConstIndexEntityContainerView)>;
|
||||
using ClaimEntitiesCallback = AZStd::function<void(EntitySpawnTicket&, SpawnableEntityContainerView)>;
|
||||
using BarrierCallback = AZStd::function<void(EntitySpawnTicket&)>;
|
||||
|
||||
@@ -140,6 +207,15 @@ namespace AzFramework
|
||||
//! @param ticket Only the entities associated with this ticket will be listed.
|
||||
//! @param listCallback Required callback that will be called to list the entities on.
|
||||
virtual void ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback) = 0;
|
||||
//! List all entities that are spawned using this ticket with their spawnable index.
|
||||
//! Spawnables contain a flat list of entities, which are used as templates to spawn entities from. For every spawned entity
|
||||
//! the index of the entity in the spawnable that was used as a template is stored. This version of ListEntities will return
|
||||
//! both the entities and this index. The index can be used with SpawnEntities to create the same entities again. Note that
|
||||
//! the same index may appear multiple times as there are no restriction on how many instance of a specific entity can be
|
||||
//! created.
|
||||
//! @param ticket Only the entities associated with this ticket will be listed.
|
||||
//! @param listCallback Required callback that will be called to list the entities and indices on.
|
||||
virtual void ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback) = 0;
|
||||
//! Claim all entities that are spawned using this ticket. Ownership of the entities is transferred from the ticket to the
|
||||
//! caller through the callback. After this call the ticket will have no entities associated with it. The caller of
|
||||
//! this function will need to manage the entities after this call.
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace AzFramework
|
||||
void SpawnableEntitiesManager::SpawnAllEntities(EntitySpawnTicket& ticket, EntityPreInsertionCallback preInsertionCallback,
|
||||
EntitySpawnCallback completionCallback)
|
||||
{
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to SpawnAllEntities hasn't been initialized.");
|
||||
|
||||
SpawnAllEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
queueEntry.m_completionCallback = AZStd::move(completionCallback);
|
||||
@@ -40,6 +42,8 @@ namespace AzFramework
|
||||
EntitySpawnTicket& ticket, AZStd::vector<size_t> entityIndices,
|
||||
EntityPreInsertionCallback preInsertionCallback, EntitySpawnCallback completionCallback)
|
||||
{
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to SpawnEntities hasn't been initialized.");
|
||||
|
||||
SpawnEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
queueEntry.m_entityIndices = AZStd::move(entityIndices);
|
||||
@@ -54,6 +58,8 @@ namespace AzFramework
|
||||
|
||||
void SpawnableEntitiesManager::DespawnAllEntities(EntitySpawnTicket& ticket, EntityDespawnCallback completionCallback)
|
||||
{
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to DespawnAllEntities hasn't been initialized.");
|
||||
|
||||
DespawnAllEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
queueEntry.m_completionCallback = AZStd::move(completionCallback);
|
||||
@@ -67,6 +73,8 @@ namespace AzFramework
|
||||
void SpawnableEntitiesManager::ReloadSpawnable(EntitySpawnTicket& ticket, AZ::Data::Asset<Spawnable> spawnable,
|
||||
ReloadSpawnableCallback completionCallback)
|
||||
{
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to ReloadSpawnable hasn't been initialized.");
|
||||
|
||||
ReloadSpawnableCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
queueEntry.m_spawnable = AZStd::move(spawnable);
|
||||
@@ -81,6 +89,7 @@ namespace AzFramework
|
||||
void SpawnableEntitiesManager::ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback)
|
||||
{
|
||||
AZ_Assert(listCallback, "ListEntities called on spawnable entities without a valid callback to use.");
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to ListEntities hasn't been initialized.");
|
||||
|
||||
ListEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
@@ -92,9 +101,25 @@ namespace AzFramework
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnableEntitiesManager::ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback)
|
||||
{
|
||||
AZ_Assert(listCallback, "ListEntities called on spawnable entities without a valid callback to use.");
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to ListEntities hasn't been initialized.");
|
||||
|
||||
ListIndicesEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
queueEntry.m_listCallback = AZStd::move(listCallback);
|
||||
{
|
||||
AZStd::scoped_lock queueLock(m_pendingRequestQueueMutex);
|
||||
queueEntry.m_ticketId = GetTicketPayload<Ticket>(ticket).m_nextTicketId++;
|
||||
m_pendingRequestQueue.push(AZStd::move(queueEntry));
|
||||
}
|
||||
}
|
||||
|
||||
void SpawnableEntitiesManager::ClaimEntities(EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback)
|
||||
{
|
||||
AZ_Assert(listCallback, "ClaimEntities called on spawnable entities without a valid callback to use.");
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to ClaimEntities hasn't been initialized.");
|
||||
|
||||
ClaimEntitiesCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
@@ -109,6 +134,7 @@ namespace AzFramework
|
||||
void SpawnableEntitiesManager::Barrier(EntitySpawnTicket& ticket, BarrierCallback completionCallback)
|
||||
{
|
||||
AZ_Assert(completionCallback, "Barrier on spawnable entities called without a valid callback to use.");
|
||||
AZ_Assert(ticket.IsValid(), "Ticket provided to Barrier hasn't been initialized.");
|
||||
|
||||
BarrierCommand queueEntry;
|
||||
queueEntry.m_ticket = &ticket;
|
||||
@@ -499,6 +525,27 @@ namespace AzFramework
|
||||
}
|
||||
}
|
||||
|
||||
bool SpawnableEntitiesManager::ProcessRequest(ListIndicesEntitiesCommand& request, [[maybe_unused]] AZ::SerializeContext& serializeContext)
|
||||
{
|
||||
Ticket& ticket = GetTicketPayload<Ticket>(*request.m_ticket);
|
||||
if (request.m_ticketId == ticket.m_currentTicketId)
|
||||
{
|
||||
AZ_Assert(
|
||||
ticket.m_spawnedEntities.size() == ticket.m_spawnedEntityIndices.size(),
|
||||
"Entities and indices on spawnable ticket have gone out of sync.");
|
||||
request.m_listCallback(
|
||||
*request.m_ticket,
|
||||
SpawnableConstIndexEntityContainerView(
|
||||
ticket.m_spawnedEntities.begin(), ticket.m_spawnedEntityIndices.begin(), ticket.m_spawnedEntities.size()));
|
||||
ticket.m_currentTicketId++;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool SpawnableEntitiesManager::ProcessRequest(ClaimEntitiesCommand& request, [[maybe_unused]] AZ::SerializeContext& serializeContext)
|
||||
{
|
||||
Ticket& ticket = GetTicketPayload<Ticket>(*request.m_ticket);
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace AzFramework
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(AzFramework::SpawnableEntitiesManager, "{6E14333F-128C-464C-94CA-A63B05A5E51C}");
|
||||
AZ_CLASS_ALLOCATOR(SpawnableEntitiesManager, AZ::SystemAllocator, 0);
|
||||
|
||||
enum class CommandQueueStatus : bool
|
||||
{
|
||||
@@ -58,6 +59,7 @@ namespace AzFramework
|
||||
ReloadSpawnableCallback completionCallback = {}) override;
|
||||
|
||||
void ListEntities(EntitySpawnTicket& ticket, ListEntitiesCallback listCallback) override;
|
||||
void ListIndicesAndEntities(EntitySpawnTicket& ticket, ListIndicesEntitiesCallback listCallback) override;
|
||||
void ClaimEntities(EntitySpawnTicket& ticket, ClaimEntitiesCallback listCallback) override;
|
||||
|
||||
void Barrier(EntitySpawnTicket& spawnInfo, BarrierCallback completionCallback) override;
|
||||
@@ -123,6 +125,12 @@ namespace AzFramework
|
||||
EntitySpawnTicket* m_ticket;
|
||||
uint32_t m_ticketId;
|
||||
};
|
||||
struct ListIndicesEntitiesCommand
|
||||
{
|
||||
ListIndicesEntitiesCallback m_listCallback;
|
||||
EntitySpawnTicket* m_ticket;
|
||||
uint32_t m_ticketId;
|
||||
};
|
||||
struct ClaimEntitiesCommand
|
||||
{
|
||||
ClaimEntitiesCallback m_listCallback;
|
||||
@@ -141,8 +149,9 @@ namespace AzFramework
|
||||
uint32_t m_ticketId;
|
||||
};
|
||||
|
||||
using Requests = AZStd::variant<SpawnAllEntitiesCommand, SpawnEntitiesCommand, DespawnAllEntitiesCommand, ReloadSpawnableCommand,
|
||||
ListEntitiesCommand, ClaimEntitiesCommand, BarrierCommand, DestroyTicketCommand>;
|
||||
using Requests = AZStd::variant<
|
||||
SpawnAllEntitiesCommand, SpawnEntitiesCommand, DespawnAllEntitiesCommand, ReloadSpawnableCommand, ListEntitiesCommand,
|
||||
ListIndicesEntitiesCommand, ClaimEntitiesCommand, BarrierCommand, DestroyTicketCommand>;
|
||||
|
||||
AZ::Entity* SpawnSingleEntity(const AZ::Entity& entityTemplate,
|
||||
AZ::SerializeContext& serializeContext);
|
||||
@@ -155,6 +164,7 @@ namespace AzFramework
|
||||
bool ProcessRequest(DespawnAllEntitiesCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(ReloadSpawnableCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(ListEntitiesCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(ListIndicesEntitiesCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(ClaimEntitiesCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(BarrierCommand& request, AZ::SerializeContext& serializeContext);
|
||||
bool ProcessRequest(DestroyTicketCommand& request, AZ::SerializeContext& serializeContext);
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icon / Local</title>
|
||||
<g id="Icon-/-Local" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>
|
||||
<polygon id="L" fill="#FFFFFF" fill-rule="nonzero" points="16.9658203 19 16.9658203 16.5 11.1748047 16.5 11.1748047 4.72265625 8.14746094 4.72265625 8.14746094 19"></polygon>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 575 B |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icon / Parent</title>
|
||||
<g id="Icon-/-Parent" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M10.5449219,19 L10.5449219,13.921875 L11.84375,13.921875 C13.6145833,13.921875 14.9801432,13.514974 15.9404297,12.7011719 C16.9007161,11.8873698 17.3808594,10.7122396 17.3808594,9.17578125 C17.3808594,7.69791667 16.930013,6.58626302 16.0283203,5.84082031 C15.1266276,5.0953776 13.8098958,4.72265625 12.078125,4.72265625 L12.078125,4.72265625 L7.51757812,4.72265625 L7.51757812,19 L10.5449219,19 Z M11.5410156,11.4414062 L10.5449219,11.4414062 L10.5449219,7.203125 L11.921875,7.203125 C12.7486979,7.203125 13.3557943,7.37239583 13.7431641,7.7109375 C14.1305339,8.04947917 14.3242188,8.57356771 14.3242188,9.28320312 C14.3242188,9.98632812 14.093099,10.5218099 13.6308594,10.8896484 C13.1686198,11.257487 12.4720052,11.4414062 11.5410156,11.4414062 L11.5410156,11.4414062 Z" id="P" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icon / World</title>
|
||||
<g id="Icon-/-World" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<rect id="Rectangle" x="0" y="0" width="24" height="24"></rect>
|
||||
<path d="M9.41210938,19 L11.3359375,11.5195312 C11.4205729,11.1875 11.5410156,10.632487 11.6972656,9.85449219 C11.8535156,9.0764974 11.9511719,8.51171875 11.9902344,8.16015625 C12.016276,8.44661458 12.1155599,9.00813802 12.2880859,9.84472656 C12.460612,10.6813151 12.5826823,11.2330729 12.6542969,11.5 L12.6542969,11.5 L14.5878906,19 L18.0351562,19 L21.6679688,4.72265625 L18.6894531,4.72265625 L16.8730469,12.515625 C16.7558594,12.984375 16.625651,13.5979818 16.4824219,14.3564453 C16.3391927,15.1149089 16.235026,15.7480469 16.1699219,16.2558594 C16.0983073,15.7285156 15.9941406,15.0970052 15.8574219,14.3613281 C15.7207031,13.625651 15.6067708,13.078776 15.515625,12.7207031 L15.515625,12.7207031 L13.4355469,4.72265625 L10.5742188,4.72265625 L8.49414062,12.7207031 C8.37044271,13.1503906 8.23860677,13.7542318 8.09863281,14.5322266 C7.95865885,15.3102214 7.86914062,15.8847656 7.83007812,16.2558594 C7.68684896,15.2011719 7.45572917,13.9544271 7.13671875,12.515625 L7.13671875,12.515625 L5.31054688,4.72265625 L2.33203125,4.72265625 L5.97460938,19 L9.41210938,19 Z" id="W" fill="#FFFFFF" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -354,6 +354,7 @@
|
||||
<file>img/UI20/toolbar/Grid.svg</file>
|
||||
<file>img/UI20/toolbar/Lighting.svg</file>
|
||||
<file>img/UI20/toolbar/Load.svg</file>
|
||||
<file>img/UI20/toolbar/Local.svg</file>
|
||||
<file>img/UI20/toolbar/Locked.svg</file>
|
||||
<file>img/UI20/toolbar/LUA.svg</file>
|
||||
<file>img/UI20/toolbar/Material.svg</file>
|
||||
@@ -362,6 +363,7 @@
|
||||
<file>img/UI20/toolbar/Object_follow_terrain.svg</file>
|
||||
<file>img/UI20/toolbar/Object_height.svg</file>
|
||||
<file>img/UI20/toolbar/Object_list.svg</file>
|
||||
<file>img/UI20/toolbar/Parent.svg</file>
|
||||
<file>img/UI20/toolbar/particle.svg</file>
|
||||
<file>img/UI20/toolbar/Play.svg</file>
|
||||
<file>img/UI20/toolbar/Redo.svg</file>
|
||||
@@ -380,6 +382,7 @@
|
||||
<file>img/UI20/toolbar/undo.svg</file>
|
||||
<file>img/UI20/toolbar/Unlocked.svg</file>
|
||||
<file>img/UI20/toolbar/Vertex_snapping.svg</file>
|
||||
<file>img/UI20/toolbar/World.svg</file>
|
||||
<file>img/UI20/toolbar/X_axis.svg</file>
|
||||
<file>img/UI20/toolbar/Y_axis.svg</file>
|
||||
<file>img/UI20/toolbar/Z_axis.svg</file>
|
||||
|
||||
@@ -60,10 +60,20 @@ namespace AzToolsFramework
|
||||
//! and is generally checked into source control.
|
||||
virtual const char* GetAbsoluteDevRootFolderPath() = 0;
|
||||
|
||||
/// Convert a full source path like "c:\\dev\gamename\\blah\\test.tga" into a relative product path.
|
||||
/// Convert a full source path like "c:\\dev\\gamename\\blah\\test.tga" into a relative product path.
|
||||
/// asset paths never mention their alias and are relative to the asset cache root
|
||||
virtual bool GetRelativeProductPathFromFullSourceOrProductPath(const AZStd::string& fullPath, AZStd::string& relativeProductPath) = 0;
|
||||
|
||||
/** Convert a source path like "c:\\dev\\gamename\\blah\\test.tga" into a relative source path, like "blah/test.tga".
|
||||
* If no valid relative path could be created, the input source path will be returned in relativePath.
|
||||
* @param sourcePath partial or full path to a source file. (The file doesn't need to exist)
|
||||
* @param relativePath the output relative path for the source file, if a valid one could be created
|
||||
* @param rootFilePath the root path that relativePath is relative to
|
||||
* @return true if a valid relative path was created, false if it wasn't
|
||||
*/
|
||||
virtual bool GenerateRelativeSourcePath(
|
||||
const AZStd::string& sourcePath, AZStd::string& relativePath, AZStd::string& rootFilePath) = 0;
|
||||
|
||||
/// Convert a relative asset path like "blah/test.tga" to a full source path path.
|
||||
/// Once the asset processor has finished building, this function is capable of handling even when the extension changes
|
||||
/// or when the source is in a different folder or in a different location (such as inside gems)
|
||||
@@ -110,14 +120,14 @@ namespace AzToolsFramework
|
||||
|
||||
/**
|
||||
* Query to see if a specific asset platform is enabled
|
||||
* @param platform the asset platform to check e.g. es3, ios, etc.
|
||||
* @param platform the asset platform to check e.g. android, ios, etc.
|
||||
* @return true if enabled, false otherwise
|
||||
*/
|
||||
virtual bool IsAssetPlatformEnabled(const char* platform) = 0;
|
||||
|
||||
/**
|
||||
* Get the total number of pending assets left to process for a specific asset platform
|
||||
* @param platform the asset platform to check e.g. es3, ios, etc.
|
||||
* @param platform the asset platform to check e.g. android, ios, etc.
|
||||
* @return -1 if the process fails, a positive number otherwise
|
||||
*/
|
||||
virtual int GetPendingAssetsForPlatform(const char* platform) = 0;
|
||||
@@ -302,7 +312,7 @@ namespace AzToolsFramework
|
||||
inline const char* GetHostAssetPlatform()
|
||||
{
|
||||
#if defined(AZ_PLATFORM_MAC)
|
||||
return "osx_gl";
|
||||
return "mac";
|
||||
#elif defined(AZ_PLATFORM_WINDOWS)
|
||||
return "pc";
|
||||
#elif defined(AZ_PLATFORM_LINUX)
|
||||
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Interface/Interface.h>
|
||||
#include <AzCore/Math/Color.h>
|
||||
|
||||
#include <AzFramework/Viewport/ViewportId.h>
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
//! An interface for loading simple icon assets and rendering them to screen on a per-viewport basis.
|
||||
class EditorViewportIconDisplayInterface
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(EditorViewportIconDisplayInterface, "{D5190B58-2561-4F3F-B793-F1E7D454CDF2}");
|
||||
|
||||
using IconId = AZ::s32;
|
||||
static constexpr IconId InvalidIconId = -1;
|
||||
|
||||
enum class CoordinateSpace : AZ::u8
|
||||
{
|
||||
ScreenSpace,
|
||||
WorldSpace
|
||||
};
|
||||
|
||||
//! These draw parameters control rendering for a single icon to a single viewport.
|
||||
struct DrawParameters
|
||||
{
|
||||
//! The ViewportId to render to.
|
||||
AzFramework::ViewportId m_viewport = AzFramework::InvalidViewportId;
|
||||
//! The icon ID, retrieved from GetOrLoadIconForPath, to render to screen.
|
||||
IconId m_icon = InvalidIconId;
|
||||
//! The color, including opacity, to render the icon with. White will render the icon as opaque in its original color.
|
||||
AZ::Color m_color = AZ::Colors::White;
|
||||
//! The position to render the icon to, in world or screen space depending on m_positionSpace.
|
||||
AZ::Vector3 m_position;
|
||||
//! The coordinate system to use for m_position.
|
||||
//! ScreenSpace will accept m_position in the form of [X, Y, Depth], where X & Y are screen coordinates in
|
||||
//! pixels and Depth is a z-ordering depth value from 0.0f to 1.0f.
|
||||
//! WorldSpace will accept a 3D vector in world space coordinates that will be translated back into screen
|
||||
//! space when the icon is rendered.
|
||||
CoordinateSpace m_positionSpace = CoordinateSpace::ScreenSpace;
|
||||
//! The size to render the icon as, in pixels.
|
||||
AZ::Vector2 m_size;
|
||||
};
|
||||
|
||||
//! The current load status of an icon retrieved by GetOrLoadIconForPath.
|
||||
enum class IconLoadStatus : AZ::u8
|
||||
{
|
||||
Unloaded,
|
||||
Loading,
|
||||
Loaded,
|
||||
Error
|
||||
};
|
||||
|
||||
//! Draws an icon to a viewport given a set of draw parameters.
|
||||
//! Requires an IconId retrieved from GetOrLoadIconForPath.
|
||||
virtual void DrawIcon(const DrawParameters& drawParameters) = 0;
|
||||
//! Retrieves a reusable IconId for an icon at a given path.
|
||||
//! This will load the icon, if it has not already been loaded.
|
||||
//! @param path should be a relative asset path to an icon image asset.
|
||||
//! png and svg icons are currently supported.
|
||||
virtual IconId GetOrLoadIconForPath(AZStd::string_view path) = 0;
|
||||
//! Gets the current load status of an icon retrieved via GetOrLoadIconForPath.
|
||||
virtual IconLoadStatus GetIconLoadStatus(IconId icon) = 0;
|
||||
};
|
||||
|
||||
using EditorViewportIconDisplay = AZ::Interface<EditorViewportIconDisplayInterface>;
|
||||
} //namespace AzToolsFramework
|
||||
@@ -239,6 +239,11 @@ namespace AzToolsFramework
|
||||
*/
|
||||
virtual int RemoveDirtyEntity(AZ::EntityId target) = 0;
|
||||
|
||||
/*!
|
||||
* Clears the dirty entity set.
|
||||
*/
|
||||
virtual void ClearDirtyEntities() = 0;
|
||||
|
||||
/*!
|
||||
* \return true if an undo/redo operation is in progress.
|
||||
*/
|
||||
|
||||
@@ -1354,6 +1354,11 @@ namespace AzToolsFramework
|
||||
return static_cast<int>(m_dirtyEntities.erase(entityId));
|
||||
}
|
||||
|
||||
void ToolsApplication::ClearDirtyEntities()
|
||||
{
|
||||
m_dirtyEntities.clear();
|
||||
}
|
||||
|
||||
void ToolsApplication::UndoPressed()
|
||||
{
|
||||
if (m_undoStack)
|
||||
|
||||
@@ -85,6 +85,7 @@ namespace AzToolsFramework
|
||||
|
||||
void AddDirtyEntity(AZ::EntityId entityId) override;
|
||||
int RemoveDirtyEntity(AZ::EntityId entityId) override;
|
||||
void ClearDirtyEntities() override;
|
||||
bool IsDuringUndoRedo() override { return m_isDuringUndoRedo; }
|
||||
void UndoPressed() override;
|
||||
void RedoPressed() override;
|
||||
|
||||
@@ -265,6 +265,30 @@ namespace AzToolsFramework
|
||||
return response.m_resolved;
|
||||
}
|
||||
|
||||
bool AssetSystemComponent::GenerateRelativeSourcePath(
|
||||
const AZStd::string& sourcePath, AZStd::string& relativePath, AZStd::string& rootFilePath)
|
||||
{
|
||||
AzFramework::SocketConnection* engineConnection = AzFramework::SocketConnection::GetInstance();
|
||||
if (!engineConnection || !engineConnection->IsConnected())
|
||||
{
|
||||
relativePath = sourcePath;
|
||||
return false;
|
||||
}
|
||||
|
||||
AzFramework::AssetSystem::GenerateRelativeSourcePathRequest request(sourcePath);
|
||||
AzFramework::AssetSystem::GenerateRelativeSourcePathResponse response;
|
||||
if (!SendRequest(request, response))
|
||||
{
|
||||
AZ_Error("Editor", false, "Failed to send GenerateRelativeSourcePath request for %s", sourcePath.c_str());
|
||||
relativePath = sourcePath;
|
||||
return false;
|
||||
}
|
||||
|
||||
relativePath = response.m_relativeSourcePath;
|
||||
rootFilePath = response.m_rootFolder;
|
||||
return response.m_resolved;
|
||||
}
|
||||
|
||||
bool AssetSystemComponent::GetFullSourcePathFromRelativeProductPath(const AZStd::string& relPath, AZStd::string& fullPath)
|
||||
{
|
||||
auto foundIt = m_assetSourceRelativePathToFullPathCache.find(relPath);
|
||||
|
||||
@@ -63,6 +63,8 @@ namespace AzToolsFramework
|
||||
const char* GetAbsoluteDevGameFolderPath() override;
|
||||
const char* GetAbsoluteDevRootFolderPath() override;
|
||||
bool GetRelativeProductPathFromFullSourceOrProductPath(const AZStd::string& fullPath, AZStd::string& outputPath) override;
|
||||
bool GenerateRelativeSourcePath(
|
||||
const AZStd::string& sourcePath, AZStd::string& outputPath, AZStd::string& watchFolder) override;
|
||||
bool GetFullSourcePathFromRelativeProductPath(const AZStd::string& relPath, AZStd::string& fullPath) override;
|
||||
bool GetAssetInfoById(const AZ::Data::AssetId& assetId, const AZ::Data::AssetType& assetType, const AZStd::string& platformName, AZ::Data::AssetInfo& assetInfo, AZStd::string& rootFilePath) override;
|
||||
bool GetSourceInfoBySourcePath(const char* sourcePath, AZ::Data::AssetInfo& assetInfo, AZStd::string& watchFolder) override;
|
||||
|
||||
+2
@@ -56,5 +56,7 @@ namespace AzToolsFramework
|
||||
|
||||
virtual void StartPlayInEditor() = 0;
|
||||
virtual void StopPlayInEditor() = 0;
|
||||
|
||||
virtual void CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
+73
-46
@@ -225,50 +225,19 @@ namespace AzToolsFramework
|
||||
|
||||
m_rootInstance->SetTemplateSourcePath(relativePath);
|
||||
|
||||
bool newLevelFromTemplate = false;
|
||||
|
||||
if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
|
||||
{
|
||||
AZStd::string watchFolder;
|
||||
AZ::Data::AssetInfo assetInfo;
|
||||
bool sourceInfoFound = false;
|
||||
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
|
||||
sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, DefaultLevelTemplateName,
|
||||
assetInfo, watchFolder);
|
||||
m_rootInstance->m_containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent());
|
||||
HandleEntitiesAdded({ m_rootInstance->m_containerEntity.get() });
|
||||
|
||||
if (sourceInfoFound)
|
||||
AzToolsFramework::Prefab::PrefabDom dom;
|
||||
bool success = AzToolsFramework::Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(*m_rootInstance, dom);
|
||||
if (!success)
|
||||
{
|
||||
AZStd::string fullPath;
|
||||
AZ::StringFunc::Path::Join(watchFolder.c_str(), assetInfo.m_relativePath.c_str(), fullPath);
|
||||
|
||||
// Get the default prefab and copy the Dom over to the new template being saved
|
||||
Prefab::TemplateId defaultId = m_loaderInterface->LoadTemplateFromFile(fullPath.c_str());
|
||||
Prefab::PrefabDom& dom = m_prefabSystemComponent->FindTemplateDom(defaultId);
|
||||
|
||||
Prefab::PrefabDom levelDefaultDom;
|
||||
levelDefaultDom.CopyFrom(dom, levelDefaultDom.GetAllocator());
|
||||
|
||||
Prefab::PrefabDomPath sourcePath("/Source");
|
||||
sourcePath.Set(levelDefaultDom, relativePath.c_str());
|
||||
|
||||
templateId = m_prefabSystemComponent->AddTemplate(relativePath, std::move(levelDefaultDom));
|
||||
newLevelFromTemplate = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create an empty level since we couldn't find the default template
|
||||
m_rootInstance->m_containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent());
|
||||
HandleEntitiesAdded({ m_rootInstance->m_containerEntity.get() });
|
||||
|
||||
AzToolsFramework::Prefab::PrefabDom dom;
|
||||
bool success = AzToolsFramework::Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(*m_rootInstance, dom);
|
||||
if (!success)
|
||||
{
|
||||
AZ_Error("Prefab", false, "Failed to convert current root instance into a DOM when saving file '%.*s'", AZ_STRING_ARG(filename));
|
||||
return false;
|
||||
}
|
||||
templateId = m_prefabSystemComponent->AddTemplate(relativePath, std::move(dom));
|
||||
AZ_Error("Prefab", false, "Failed to convert current root instance into a DOM when saving file '%.*s'", AZ_STRING_ARG(filename));
|
||||
return false;
|
||||
}
|
||||
templateId = m_prefabSystemComponent->AddTemplate(relativePath, AZStd::move(dom));
|
||||
|
||||
if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
|
||||
{
|
||||
@@ -286,13 +255,6 @@ namespace AzToolsFramework
|
||||
m_prefabSystemComponent->RemoveTemplate(prevTemplateId);
|
||||
}
|
||||
|
||||
// If we have a new level from a template, we need to make sure to propagate the changes here otherwise
|
||||
// the entities from the new template won't show up
|
||||
if (newLevelFromTemplate)
|
||||
{
|
||||
m_prefabSystemComponent->PropagateTemplateChanges(templateId);
|
||||
}
|
||||
|
||||
AZStd::string out;
|
||||
if (m_loaderInterface->SaveTemplateToString(m_rootInstance->GetTemplateId(), out))
|
||||
{
|
||||
@@ -303,6 +265,71 @@ namespace AzToolsFramework
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrefabEditorEntityOwnershipService::CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename)
|
||||
{
|
||||
AZ::IO::Path relativePath = m_loaderInterface->GetRelativePathToProject(filename);
|
||||
AzToolsFramework::Prefab::TemplateId templateId = m_prefabSystemComponent->GetTemplateIdFromFilePath(relativePath);
|
||||
|
||||
m_rootInstance->SetTemplateSourcePath(relativePath);
|
||||
|
||||
AZStd::string watchFolder;
|
||||
AZ::Data::AssetInfo assetInfo;
|
||||
bool sourceInfoFound = false;
|
||||
AzToolsFramework::AssetSystemRequestBus::BroadcastResult(
|
||||
sourceInfoFound, &AzToolsFramework::AssetSystemRequestBus::Events::GetSourceInfoBySourcePath, templateFilename.c_str(),
|
||||
assetInfo, watchFolder);
|
||||
|
||||
if (sourceInfoFound)
|
||||
{
|
||||
AZStd::string fullPath;
|
||||
AZ::StringFunc::Path::Join(watchFolder.c_str(), assetInfo.m_relativePath.c_str(), fullPath);
|
||||
|
||||
// Get the default prefab and copy the Dom over to the new template being saved
|
||||
Prefab::TemplateId defaultId = m_loaderInterface->LoadTemplateFromFile(fullPath.c_str());
|
||||
Prefab::PrefabDom& dom = m_prefabSystemComponent->FindTemplateDom(defaultId);
|
||||
|
||||
Prefab::PrefabDom levelDefaultDom;
|
||||
levelDefaultDom.CopyFrom(dom, levelDefaultDom.GetAllocator());
|
||||
|
||||
Prefab::PrefabDomPath sourcePath("/Source");
|
||||
sourcePath.Set(levelDefaultDom, relativePath.c_str());
|
||||
|
||||
templateId = m_prefabSystemComponent->AddTemplate(relativePath, AZStd::move(levelDefaultDom));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rootInstance->m_containerEntity->AddComponent(aznew Prefab::EditorPrefabComponent());
|
||||
HandleEntitiesAdded({ m_rootInstance->m_containerEntity.get() });
|
||||
|
||||
AzToolsFramework::Prefab::PrefabDom dom;
|
||||
bool success = AzToolsFramework::Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(*m_rootInstance, dom);
|
||||
if (!success)
|
||||
{
|
||||
AZ_Error(
|
||||
"Prefab", false, "Failed to convert current root instance into a DOM when saving file '%.*s'", AZ_STRING_ARG(filename));
|
||||
return;
|
||||
}
|
||||
templateId = m_prefabSystemComponent->AddTemplate(relativePath, std::move(dom));
|
||||
}
|
||||
|
||||
if (templateId == AzToolsFramework::Prefab::InvalidTemplateId)
|
||||
{
|
||||
AZ_Error("Prefab", false, "Couldn't create new template id '%i' when creating new level '%.*s'", templateId, AZ_STRING_ARG(filename));
|
||||
return;
|
||||
}
|
||||
|
||||
Prefab::TemplateId prevTemplateId = m_rootInstance->GetTemplateId();
|
||||
m_rootInstance->SetTemplateId(templateId);
|
||||
|
||||
if (prevTemplateId != Prefab::InvalidTemplateId && templateId != prevTemplateId)
|
||||
{
|
||||
// Make sure we only have one level template loaded at a time
|
||||
m_prefabSystemComponent->RemoveTemplate(prevTemplateId);
|
||||
}
|
||||
|
||||
m_prefabSystemComponent->PropagateTemplateChanges(templateId);
|
||||
}
|
||||
|
||||
Prefab::InstanceOptionalReference PrefabEditorEntityOwnershipService::CreatePrefab(
|
||||
const AZStd::vector<AZ::Entity*>& entities, AZStd::vector<AZStd::unique_ptr<Prefab::Instance>>&& nestedPrefabInstances,
|
||||
AZ::IO::PathView filePath, Prefab::InstanceOptionalReference instanceToParentUnder)
|
||||
|
||||
+2
-2
@@ -170,6 +170,8 @@ namespace AzToolsFramework
|
||||
void StartPlayInEditor() override;
|
||||
void StopPlayInEditor() override;
|
||||
|
||||
void CreateNewLevelPrefab(AZStd::string_view filename, const AZStd::string& templateFilename) override;
|
||||
|
||||
protected:
|
||||
|
||||
AZ::SliceComponent::SliceInstanceAddress GetOwningSlice() override;
|
||||
@@ -216,7 +218,5 @@ namespace AzToolsFramework
|
||||
Prefab::PrefabLoaderInterface* m_loaderInterface;
|
||||
AzFramework::EntityContextId m_entityContextId;
|
||||
AZ::SerializeContext m_serializeContext;
|
||||
|
||||
static inline constexpr const char* DefaultLevelTemplateName = "Prefabs/Default_Level.prefab";
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -614,7 +614,7 @@ namespace AzToolsFramework
|
||||
|
||||
AZ::Quaternion oldEntityRotation;
|
||||
AZ::TransformBus::EventResult(oldEntityRotation, id, &AZ::TransformBus::Events::GetWorldRotationQuaternion);
|
||||
transformComponent->SetRotationQuaternion(oldEntityRotation);
|
||||
transformComponent->SetWorldRotationQuaternion(oldEntityRotation);
|
||||
|
||||
// Ensure the existing hierarchy is maintained
|
||||
AZ::EntityId oldParentEntityId;
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace AzToolsFramework
|
||||
rayProportion, lineSegmentProportion, worldClosestPositionRay, worldClosestPositionLineSegment);
|
||||
|
||||
AZ::Transform worldFromLocalNormalized = worldFromLocal;
|
||||
const AZ::Vector3 scale = worldFromLocalNormalized.ExtractScale() * nonUniformScale;
|
||||
const AZ::Vector3 scale = worldFromLocalNormalized.ExtractUniformScale() * nonUniformScale;
|
||||
const AZ::Transform localFromWorldNormalized = worldFromLocalNormalized.GetInverse();
|
||||
|
||||
return { (localFromWorldNormalized.TransformPoint(worldClosestPositionLineSegment)) / scale };
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace AzToolsFramework
|
||||
? CalculateSnappedOffset(localTransform.GetTranslation(), axis, gridSize * scaleRecip)
|
||||
: AZ::Vector3::CreateZero();
|
||||
|
||||
const AZ::Vector3 localScale = localTransform.GetScale();
|
||||
const AZ::Vector3 localScale = AZ::Vector3(localTransform.GetUniformScale());
|
||||
const AZ::Quaternion localRotation = QuaternionFromTransformNoScaling(localTransform);
|
||||
// calculate scale amount to snap, to align to round scale value
|
||||
const AZ::Vector3 scaleSnapOffset = snapping && !gridSnapAction.m_localSnapping
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace AzToolsFramework
|
||||
/// noise in the value returned when dealing with values far from the origin.
|
||||
inline float ScaleReciprocal(const AZ::Transform& transform)
|
||||
{
|
||||
return Round3(transform.GetScale().GetReciprocal().GetMinElement());
|
||||
return Round3(1.0f / transform.GetUniformScale());
|
||||
}
|
||||
|
||||
/// Find the reciprocal of the non-uniform scale.
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace AzToolsFramework
|
||||
AZ::Transform result;
|
||||
result.SetRotation(m_space.GetRotation() * localTransform.GetRotation());
|
||||
result.SetTranslation(m_space.TransformPoint(m_nonUniformScale * localTransform.GetTranslation()));
|
||||
result.SetScale(m_space.GetScale() * localTransform.GetScale());
|
||||
result.SetScale(m_space.GetScale() * localTransform.GetUniformScale());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace AzToolsFramework
|
||||
inline AZ::Transform TransformNormalizedScale(const AZ::Transform& transform)
|
||||
{
|
||||
AZ::Transform transformNormalizedScale = transform;
|
||||
transformNormalizedScale.SetScale(AZ::Vector3::CreateOne());
|
||||
transformNormalizedScale.SetUniformScale(1.0f);
|
||||
return transformNormalizedScale;
|
||||
}
|
||||
|
||||
|
||||
+8
-12
@@ -276,18 +276,14 @@ namespace AzToolsFramework
|
||||
PrefabDomValueReference linkPatchesReference =
|
||||
PrefabDomUtils::FindPrefabDomValue(linkDom, PrefabDomUtils::PatchesName);
|
||||
|
||||
// This logic only covers addition of patches. If patches already exists, the given list of patches must be appended to them.
|
||||
if (!linkPatchesReference.has_value())
|
||||
{
|
||||
/*
|
||||
If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the
|
||||
linkDom. Since we cannot guarantee the lifecycle of the patch allocators, we are doing a copy of the patches here to
|
||||
associate them with the linkDom's allocator.
|
||||
*/
|
||||
PrefabDom patchesCopy;
|
||||
patchesCopy.CopyFrom(patches, linkDom.GetAllocator());
|
||||
linkDom.AddMember(rapidjson::StringRef(PrefabDomUtils::PatchesName), patchesCopy, linkDom.GetAllocator());
|
||||
}
|
||||
/*
|
||||
If the original allocator the patches were created with gets destroyed, then the patches would become garbage in the
|
||||
linkDom. Since we cannot guarantee the lifecycle of the patch allocators, we are doing a copy of the patches here to
|
||||
associate them with the linkDom's allocator.
|
||||
*/
|
||||
PrefabDom patchesCopy;
|
||||
patchesCopy.CopyFrom(patches, linkDom.GetAllocator());
|
||||
linkDom.AddMember(rapidjson::StringRef(PrefabDomUtils::PatchesName), patchesCopy, linkDom.GetAllocator());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,5 +234,10 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
PrefabDomValueReference Link::GetLinkPatches()
|
||||
{
|
||||
return PrefabDomUtils::FindPrefabDomValue(m_linkDom, PrefabDomUtils::PatchesName);
|
||||
}
|
||||
|
||||
} // namespace Prefab
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
@@ -79,6 +79,8 @@ namespace AzToolsFramework
|
||||
*/
|
||||
void AddLinkIdToInstanceDom(PrefabDomValue& instanceDomValue);
|
||||
|
||||
PrefabDomValueReference GetLinkPatches();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace AzToolsFramework
|
||||
|
||||
[[maybe_unused]] bool result =
|
||||
settingsRegistry->Get(m_projectPathWithOsSeparator.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectPath);
|
||||
AZ_Assert(result, "Couldn't retrieve project root path");
|
||||
AZ_Warning("Prefab", result, "Couldn't retrieve project root path");
|
||||
m_projectPathWithSlashSeparator = AZ::IO::Path(m_projectPathWithOsSeparator.Native(), '/').MakePreferred();
|
||||
|
||||
AZ::Interface<PrefabLoaderInterface>::Register(this);
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzToolsFramework/Prefab/PrefabPublicHandler.h>
|
||||
|
||||
#include <AzCore/Component/TransformBus.h>
|
||||
#include <AzCore/JSON/stringbuffer.h>
|
||||
#include <AzCore/JSON/writer.h>
|
||||
@@ -28,6 +26,7 @@
|
||||
#include <AzToolsFramework/Prefab/Instance/InstanceToTemplateInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabDomUtils.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabLoaderInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabPublicHandler.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabSystemComponentInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabUndo.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabUndoHelpers.h>
|
||||
@@ -98,9 +97,13 @@ namespace AzToolsFramework
|
||||
AZStd::string("Could not create a new prefab out of the entities provided - invalid selection."));
|
||||
}
|
||||
|
||||
AZStd::unordered_map<AZ::EntityId, AZStd::string> oldEntityAliases;
|
||||
|
||||
// Detach the retrieved entities
|
||||
for (AZ::Entity* entity : entities)
|
||||
{
|
||||
AZ::EntityId entityId = entity->GetId();
|
||||
oldEntityAliases.emplace(entityId, commonRootEntityOwningInstance->get().GetEntityAlias(entityId)->get());
|
||||
commonRootEntityOwningInstance->get().DetachEntity(entity->GetId()).release();
|
||||
}
|
||||
|
||||
@@ -110,15 +113,18 @@ namespace AzToolsFramework
|
||||
{
|
||||
AZStd::unique_ptr<Instance> outInstance = commonRootEntityOwningInstance->get().DetachNestedInstance(nestedInstance->GetInstanceAlias());
|
||||
|
||||
auto linkRef = m_prefabSystemComponentInterface->FindLink(nestedInstance->GetLinkId());
|
||||
LinkId detachingInstanceLinkId = nestedInstance->GetLinkId();
|
||||
auto linkRef = m_prefabSystemComponentInterface->FindLink(detachingInstanceLinkId);
|
||||
AZ_Assert(linkRef.has_value(), "Unable to find link with id '%llu' during prefab creation.", detachingInstanceLinkId);
|
||||
|
||||
if (linkRef.has_value())
|
||||
{
|
||||
PrefabDom oldLinkPatches;
|
||||
oldLinkPatches.CopyFrom(linkRef->get().GetLinkDom(), oldLinkPatches.GetAllocator());
|
||||
PrefabDomValueReference linkPatches = linkRef->get().GetLinkPatches();
|
||||
AZ_Assert(
|
||||
linkPatches.has_value(), "Unable to get patches on link with id '%llu' during prefab creation.",
|
||||
detachingInstanceLinkId);
|
||||
|
||||
nestedInstanceLinkPatchesMap.emplace(nestedInstance, AZStd::move(oldLinkPatches));
|
||||
}
|
||||
PrefabDom linkPatchesCopy;
|
||||
linkPatchesCopy.CopyFrom(linkPatches->get(), linkPatchesCopy.GetAllocator());
|
||||
nestedInstanceLinkPatchesMap.emplace(nestedInstance, AZStd::move(linkPatchesCopy));
|
||||
|
||||
RemoveLink(outInstance, commonRootEntityOwningInstance->get().GetTemplateId(), undoBatch.GetUndoBatch());
|
||||
|
||||
@@ -182,6 +188,24 @@ namespace AzToolsFramework
|
||||
if (nestedInstanceLinkPatchesMap.contains(nestedInstance.get()))
|
||||
{
|
||||
previousPatch = AZStd::move(nestedInstanceLinkPatchesMap[nestedInstance.get()]);
|
||||
rapidjson::StringBuffer buffer;
|
||||
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
|
||||
previousPatch.Accept(writer);
|
||||
QString previousPatchString(buffer.GetString());
|
||||
|
||||
for (AZ::Entity* entity : entities)
|
||||
{
|
||||
AZ::EntityId entityId = entity->GetId();
|
||||
AZStd::string oldEntityAlias = oldEntityAliases[entityId];
|
||||
EntityAliasOptionalReference newEntityAlias = instanceToCreate->get().GetEntityAlias(entityId);
|
||||
AZ_Assert(
|
||||
newEntityAlias.has_value(),
|
||||
"Could not fetch entity alias for entity with id '%llu' during prefab creation.",
|
||||
static_cast<AZ::u64>(entityId));
|
||||
ReplaceOldAliases(previousPatchString, oldEntityAlias, newEntityAlias->get());
|
||||
}
|
||||
|
||||
previousPatch.Parse(previousPatchString.toUtf8().constData());
|
||||
}
|
||||
|
||||
// These link creations shouldn't be undone because that would put the template in a non-usable state if a user
|
||||
@@ -203,36 +227,23 @@ namespace AzToolsFramework
|
||||
m_instanceToTemplateInterface->GeneratePatch(reparentPatch, containerEntityDomBefore, containerEntityDomAfter);
|
||||
m_instanceToTemplateInterface->AppendEntityAliasToPatchPaths(reparentPatch, nestedInstanceContainerEntityId);
|
||||
|
||||
// Update the cache - this prevents these changes from being stored in the regular undo/redo nodes as a separate step
|
||||
m_prefabUndoCache.Store(nestedInstanceContainerEntityId, AZStd::move(containerEntityDomAfter));
|
||||
|
||||
// Save these changes as patches to the link
|
||||
PrefabUndoLinkUpdate* linkUpdate = aznew PrefabUndoLinkUpdate(AZStd::to_string(static_cast<AZ::u64>(nestedInstanceContainerEntityId)));
|
||||
linkUpdate->SetParent(undoBatch.GetUndoBatch());
|
||||
linkUpdate->Capture(reparentPatch, nestedInstance->GetLinkId());
|
||||
|
||||
linkUpdate->Redo();
|
||||
// We won't parent this undo node to the undo batch so that the newly created template and link will remain
|
||||
// unaffected by undo actions. This is needed so that any future instantiations of the template will work.
|
||||
PrefabUndoLinkUpdate linkUpdate = PrefabUndoLinkUpdate(AZStd::to_string(static_cast<AZ::u64>(nestedInstanceContainerEntityId)));
|
||||
linkUpdate.Capture(reparentPatch, nestedInstance->GetLinkId());
|
||||
linkUpdate.Redo();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Create a link between the templates of the newly created instance and the instance it's being parented under.
|
||||
CreateLink(
|
||||
instanceToCreate->get(), commonRootEntityOwningInstance->get().GetTemplateId(), undoBatch.GetUndoBatch(),
|
||||
AZStd::move(patch));
|
||||
|
||||
for (AZ::Entity* topLevelEntity : topLevelEntities)
|
||||
{
|
||||
AZ::EntityId topLevelEntityId = topLevelEntity->GetId();
|
||||
if (topLevelEntityId.IsValid())
|
||||
{
|
||||
m_prefabUndoCache.UpdateCache(topLevelEntity->GetId());
|
||||
|
||||
// Parenting entities would mark entities as dirty. But we want to unmark the top level entities as dirty because
|
||||
// if we don't, the template created would be updated and cause issues with undo operation followed by instantiation.
|
||||
ToolsApplicationRequests::Bus::Broadcast(
|
||||
&ToolsApplicationRequests::Bus::Events::RemoveDirtyEntity, topLevelEntity->GetId());
|
||||
}
|
||||
}
|
||||
// This clears any entities marked as dirty due to reparenting of entities during the process of creating a prefab.
|
||||
// We are doing this so that the changes in those enities are not queued up twice for propagation.
|
||||
AzToolsFramework::ToolsApplicationRequestBus::Broadcast(
|
||||
&AzToolsFramework::ToolsApplicationRequestBus::Events::ClearDirtyEntities);
|
||||
|
||||
// Select Container Entity
|
||||
{
|
||||
@@ -824,15 +835,7 @@ namespace AzToolsFramework
|
||||
// This will cover both cases where an alias could be used in a normal entity vs. an instance
|
||||
for (auto aliasMapIter : oldAliasToNewAliasMap)
|
||||
{
|
||||
QString oldAliasQuotes = QString("\"%1\"").arg(aliasMapIter.first.c_str());
|
||||
QString newAliasQuotes = QString("\"%1\"").arg(aliasMapIter.second.c_str());
|
||||
|
||||
newEntityDomString.replace(oldAliasQuotes, newAliasQuotes);
|
||||
|
||||
QString oldAliasPathRef = QString("/%1").arg(aliasMapIter.first.c_str());
|
||||
QString newAliasPathRef = QString("/%1").arg(aliasMapIter.second.c_str());
|
||||
|
||||
newEntityDomString.replace(oldAliasPathRef, newAliasPathRef);
|
||||
ReplaceOldAliases(newEntityDomString, aliasMapIter.first, aliasMapIter.second);
|
||||
}
|
||||
|
||||
// Create the new Entity DOM from parsing the JSON string
|
||||
@@ -1233,5 +1236,18 @@ namespace AzToolsFramework
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void PrefabPublicHandler::ReplaceOldAliases(QString& stringToReplace, AZStd::string_view oldAlias, AZStd::string_view newAlias)
|
||||
{
|
||||
QString oldAliasQuotes = QString("\"%1\"").arg(oldAlias.data());
|
||||
QString newAliasQuotes = QString("\"%1\"").arg(newAlias.data());
|
||||
|
||||
stringToReplace.replace(oldAliasQuotes, newAliasQuotes);
|
||||
|
||||
QString oldAliasPathRef = QString("/%1").arg(oldAlias.data());
|
||||
QString newAliasPathRef = QString("/%1").arg(newAlias.data());
|
||||
|
||||
stringToReplace.replace(oldAliasPathRef, newAliasPathRef);
|
||||
}
|
||||
} // namespace Prefab
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
@@ -14,12 +14,15 @@
|
||||
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzCore/std/string/string_view.h>
|
||||
|
||||
#include <AzToolsFramework/Prefab/Instance/Instance.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabSystemComponentInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabUndoCache.h>
|
||||
|
||||
class QString;
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
using EntityList = AZStd::vector<AZ::Entity*>;
|
||||
@@ -27,7 +30,6 @@ namespace AzToolsFramework
|
||||
namespace Prefab
|
||||
{
|
||||
class Instance;
|
||||
|
||||
class InstanceEntityMapperInterface;
|
||||
class InstanceToTemplateInterface;
|
||||
class PrefabLoaderInterface;
|
||||
@@ -130,6 +132,8 @@ namespace AzToolsFramework
|
||||
bool IsCyclicalDependencyFound(
|
||||
InstanceOptionalConstReference instance, const AZStd::unordered_set<AZ::IO::Path>& templateSourcePaths);
|
||||
|
||||
void ReplaceOldAliases(QString& stringToReplace, AZStd::string_view oldAlias, AZStd::string_view newAlias);
|
||||
|
||||
static Instance* GetParentInstance(Instance* instance);
|
||||
static Instance* GetAncestorOfInstanceThatIsChildOfRoot(const Instance* ancestor, Instance* descendant);
|
||||
static void GenerateContainerEntityTransform(const EntityList& topLevelEntities, AZ::Vector3& translation, AZ::Quaternion& rotation);
|
||||
|
||||
+19
-20
@@ -1,22 +1,22 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/EditContextConstants.inl>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
|
||||
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
@@ -31,7 +31,7 @@ namespace AzToolsFramework
|
||||
To use the EditorComponentAdapter, 3 classes are required:
|
||||
- a class that implements the functions required for TController (see below)
|
||||
- a configuration struct/class which extends AZ::ComponentConfig
|
||||
- A runtime component that will be generated by the editor comoinent on export
|
||||
- A runtime component that will be generated by the editor component on export
|
||||
|
||||
The concrete component extends the adapter and implements behavior which is unique to the component.
|
||||
|
||||
@@ -64,15 +64,15 @@ namespace AzToolsFramework
|
||||
the EditContext. TController can friend itself to the editor component to make this work if required.
|
||||
*/
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration = AZ::ComponentConfig>
|
||||
class EditorComponentAdapter
|
||||
: public EditorComponentBase
|
||||
class EditorComponentAdapter : public EditorComponentBase
|
||||
{
|
||||
public:
|
||||
|
||||
AZ_RTTI((EditorComponentAdapter, "{2F5A3669-FFE9-4CD7-B9E2-7FC8100CF1A2}", TController, TRuntimeComponent, TConfiguration), EditorComponentBase);
|
||||
AZ_RTTI(
|
||||
(EditorComponentAdapter, "{2F5A3669-FFE9-4CD7-B9E2-7FC8100CF1A2}", TController, TRuntimeComponent, TConfiguration),
|
||||
EditorComponentBase);
|
||||
|
||||
EditorComponentAdapter() = default;
|
||||
EditorComponentAdapter(const TConfiguration& configuration);
|
||||
explicit EditorComponentAdapter(const TConfiguration& configuration);
|
||||
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
@@ -86,7 +86,6 @@ namespace AzToolsFramework
|
||||
void BuildGameEntity(AZ::Entity* gameEntity) override;
|
||||
|
||||
protected:
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
// AZ::Component overrides ...
|
||||
|
||||
+39
-30
@@ -1,14 +1,14 @@
|
||||
/*
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
* its licensors.
|
||||
*
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this
|
||||
* distribution (the "License"). All use of this software is governed by the License,
|
||||
* or, if provided, by the license below or the license accompanying this file. Do not
|
||||
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzFramework/Components/ComponentAdapterHelpers.h>
|
||||
|
||||
@@ -28,23 +28,21 @@ namespace AzToolsFramework
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (AZ::SerializeContext* serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<EditorComponentAdapter, EditorComponentBase>()
|
||||
->Version(1)
|
||||
->Field("Controller", &EditorComponentAdapter::m_controller)
|
||||
;
|
||||
serializeContext->Class<EditorComponentAdapter, EditorComponentBase>()->Version(1)->Field(
|
||||
"Controller", &EditorComponentAdapter::m_controller);
|
||||
|
||||
if (AZ::EditContext* editContext = serializeContext->GetEditContext())
|
||||
{
|
||||
editContext->Class<EditorComponentAdapter>(
|
||||
"EditorComponentAdapter", "")
|
||||
// clang-format off
|
||||
editContext->Class<EditorComponentAdapter>("EditorComponentAdapter", "")
|
||||
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, true)
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &EditorComponentAdapter::m_controller, "Controller", "")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
|
||||
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorComponentAdapter::OnConfigurationChanged)
|
||||
;
|
||||
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorComponentAdapter::OnConfigurationChanged);
|
||||
// clang-format on
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -53,27 +51,35 @@ namespace AzToolsFramework
|
||||
// Get*Services functions
|
||||
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetProvidedServices(
|
||||
AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
{
|
||||
AzFramework::Components::GetProvidedServicesHelper<TController>(services, typename AZ::HasComponentProvidedServices<TController>::type());
|
||||
AzFramework::Components::GetProvidedServicesHelper<TController>(
|
||||
services, typename AZ::HasComponentProvidedServices<TController>::type());
|
||||
}
|
||||
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetRequiredServices(
|
||||
AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
{
|
||||
AzFramework::Components::GetRequiredServicesHelper<TController>(services, typename AZ::HasComponentRequiredServices<TController>::type());
|
||||
AzFramework::Components::GetRequiredServicesHelper<TController>(
|
||||
services, typename AZ::HasComponentRequiredServices<TController>::type());
|
||||
}
|
||||
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetIncompatibleServices(
|
||||
AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
{
|
||||
AzFramework::Components::GetIncompatibleServicesHelper<TController>(services, typename AZ::HasComponentIncompatibleServices<TController>::type());
|
||||
AzFramework::Components::GetIncompatibleServicesHelper<TController>(
|
||||
services, typename AZ::HasComponentIncompatibleServices<TController>::type());
|
||||
}
|
||||
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
void EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::GetDependentServices(
|
||||
AZ::ComponentDescriptor::DependencyArrayType& services)
|
||||
{
|
||||
AzFramework::Components::GetDependentServicesHelper<TController>(services, typename AZ::HasComponentDependentServices<TController>::type());
|
||||
AzFramework::Components::GetDependentServicesHelper<TController>(
|
||||
services, typename AZ::HasComponentDependentServices<TController>::type());
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -99,7 +105,8 @@ namespace AzToolsFramework
|
||||
|
||||
if (ShouldActivateController())
|
||||
{
|
||||
m_controller.Activate(GetEntityId());
|
||||
AzFramework::Components::ComponentActivateHelper<TController>::Activate(
|
||||
m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +129,8 @@ namespace AzToolsFramework
|
||||
}
|
||||
|
||||
template<typename TController, typename TRuntimeComponent, typename TConfiguration>
|
||||
bool EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::WriteOutConfig(AZ::ComponentConfig* outBaseConfig) const
|
||||
bool EditorComponentAdapter<TController, TRuntimeComponent, TConfiguration>::WriteOutConfig(
|
||||
AZ::ComponentConfig* outBaseConfig) const
|
||||
{
|
||||
if (auto config = azrtti_cast<TConfiguration*>(outBaseConfig))
|
||||
{
|
||||
@@ -139,7 +147,8 @@ namespace AzToolsFramework
|
||||
|
||||
if (ShouldActivateController())
|
||||
{
|
||||
m_controller.Activate(GetEntityId());
|
||||
AzFramework::Components::ComponentActivateHelper<TController>::Activate(
|
||||
m_controller, AZ::EntityComponentIdPair(GetEntityId(), GetId()));
|
||||
}
|
||||
|
||||
return AZ::Edit::PropertyRefreshLevels::None;
|
||||
|
||||
+2
-2
@@ -17,6 +17,7 @@
|
||||
#include <AzCore/Asset/AssetManagerBus.h>
|
||||
|
||||
#include <AzToolsFramework/API/EditorAssetSystemAPI.h>
|
||||
#include <AzToolsFramework/API/EditorViewportIconDisplayInterface.h>
|
||||
#include <AzToolsFramework/API/ToolsApplicationAPI.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
|
||||
#include <AzToolsFramework/ToolsComponents/GenericComponentWrapper.h>
|
||||
@@ -313,8 +314,7 @@ namespace AzToolsFramework
|
||||
// if we do not yet have a valid texture id, request it using the entity icon path
|
||||
if (m_entityIconTextureId == 0)
|
||||
{
|
||||
EditorRequestBus::BroadcastResult(
|
||||
m_entityIconTextureId, &EditorRequests::GetIconTextureIdFromEntityIconPath, m_entityIconPath);
|
||||
m_entityIconTextureId = EditorViewportIconDisplay::Get()->GetOrLoadIconForPath(m_entityIconPath);
|
||||
}
|
||||
|
||||
return m_entityIconTextureId;
|
||||
|
||||
+1
-79
@@ -520,91 +520,13 @@ namespace AzToolsFramework
|
||||
return m_editorTransform.m_translate.GetZ();
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotation(const AZ::Vector3& eulerAnglesRadians)
|
||||
void TransformComponent::SetWorldRotationQuaternion(const AZ::Quaternion& quaternion)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "SetRotation is deprecated, please use SetLocalRotation");
|
||||
AZ::Transform newWorldTransform = GetWorldTM();
|
||||
newWorldTransform.SetRotation(AZ::ConvertEulerRadiansToQuaternion(eulerAnglesRadians));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationQuaternion(const AZ::Quaternion& quaternion)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "SetRotationQuaternion is deprecated, please use SetLocalRotation");
|
||||
AZ::Transform newWorldTransform = GetWorldTM();
|
||||
newWorldTransform.SetRotation(quaternion);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationX(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "SetRotationX is deprecated, please use SetLocalRotation");
|
||||
AZ::Transform newWorldTransform = GetWorldTM();
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationX(eulerAngleRadians));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationY(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "SetRotationY is deprecated, please use SetLocalRotation");
|
||||
AZ::Transform newWorldTransform = GetWorldTM();
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationY(eulerAngleRadians));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetRotationZ(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "SetRotationZ is deprecated, please use SetLocalRotation");
|
||||
AZ::Transform newWorldTransform = GetWorldTM();
|
||||
newWorldTransform.SetRotation(AZ::Quaternion::CreateRotationZ(eulerAngleRadians));
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByX(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "RotateByX is deprecated, please use RotateAroundLocalX");
|
||||
SetWorldTM(GetWorldTM() * AZ::Transform::CreateRotationX(eulerAngleRadians));
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByY(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "RotateByY is deprecated, please use RotateAroundLocalY");
|
||||
SetWorldTM(GetWorldTM() * AZ::Transform::CreateRotationY(eulerAngleRadians));
|
||||
}
|
||||
|
||||
void TransformComponent::RotateByZ(float eulerAngleRadians)
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "RotateByZ is deprecated, please use RotateAroundLocalZ");
|
||||
SetWorldTM(GetWorldTM() * AZ::Transform::CreateRotationZ(eulerAngleRadians));
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetRotationEulerRadians()
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "GetRotationEulerRadians is deprecated, please use GetWorldRotation");
|
||||
return GetWorldTM().GetRotation().GetEulerRadians();
|
||||
}
|
||||
|
||||
AZ::Quaternion TransformComponent::GetRotationQuaternion()
|
||||
{
|
||||
AZ_Warning("AzToolsFramework::TransformComponent", false, "GetRotationQuaternion is deprecated, please use GetWorldRotationQuaternion");
|
||||
return GetWorldTM().GetRotation();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationX()
|
||||
{
|
||||
return GetRotationEulerRadians().GetX();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationY()
|
||||
{
|
||||
return GetRotationEulerRadians().GetY();
|
||||
}
|
||||
|
||||
float TransformComponent::GetRotationZ()
|
||||
{
|
||||
return GetRotationEulerRadians().GetZ();
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetWorldRotation()
|
||||
{
|
||||
return GetWorldTM().GetRotation().GetEulerRadians();
|
||||
|
||||
+1
-16
@@ -99,22 +99,7 @@ namespace AzToolsFramework
|
||||
float GetLocalZ() override;
|
||||
|
||||
// Rotation modifiers
|
||||
void SetRotation(const AZ::Vector3& eulerAnglesRadians) override;
|
||||
void SetRotationQuaternion(const AZ::Quaternion& quaternion) override;
|
||||
void SetRotationX(float eulerAngleRadians) override;
|
||||
void SetRotationY(float eulerAngleRadians) override;
|
||||
void SetRotationZ(float eulerAngleRadians) override;
|
||||
|
||||
void RotateByX(float eulerAngleRadians) override;
|
||||
void RotateByY(float eulerAngleRadians) override;
|
||||
void RotateByZ(float eulerAngleRadians) override;
|
||||
|
||||
AZ::Vector3 GetRotationEulerRadians() override;
|
||||
AZ::Quaternion GetRotationQuaternion() override;
|
||||
|
||||
float GetRotationX() override;
|
||||
float GetRotationY() override;
|
||||
float GetRotationZ() override;
|
||||
void SetWorldRotationQuaternion(const AZ::Quaternion& quaternion) override;
|
||||
|
||||
AZ::Vector3 GetWorldRotation() override;
|
||||
AZ::Quaternion GetWorldRotationQuaternion() override;
|
||||
|
||||
+9
-4
@@ -21,6 +21,7 @@
|
||||
#include <AzToolsFramework/Viewport/ViewportTypes.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h>
|
||||
#include <AzToolsFramework/API/EditorViewportIconDisplayInterface.h>
|
||||
|
||||
AZ_CVAR(
|
||||
bool, ed_visibility_showAggregateEntitySelectionBounds, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
@@ -232,10 +233,14 @@ namespace AzToolsFramework
|
||||
return AZ::Color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}();
|
||||
|
||||
debugDisplay.SetColor(iconHighlight);
|
||||
// debugDisplay.DrawTextureLabel(
|
||||
// iconTextureId, entityPosition, iconSize, iconSize,
|
||||
// /*DisplayContext::ETextureIconFlags::TEXICON_ON_TOP=*/ 0x0008);
|
||||
EditorViewportIconDisplay::Get()->DrawIcon({
|
||||
viewportInfo.m_viewportId,
|
||||
iconTextureId,
|
||||
iconHighlight,
|
||||
entityPosition,
|
||||
EditorViewportIconDisplayInterface::CoordinateSpace::WorldSpace,
|
||||
AZ::Vector2{iconSize, iconSize}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user